Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not verify signatures for nw transactions that was already processed #4949

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

andll
Copy link
Contributor

@andll andll commented Oct 3, 2022

When handling user transaction coming from narwhal we currently do two things before setting shared locks:

(1) Verify signatures on the transactions
(2) Verify if transaction were already processed

If you compare consensus utilization and txn verification utilization in consensus you can see that essentially 99% of the consensus task is spent in signature verification. (Details on how utilization counters work are in #4584)

This PR swaps those two steps - we simply do not verify signatures on the transaction that was already processed.

Because signature verification dominates time in consensus task, this change will significantly increase consensus task throughput.

Given that currently each node submits transaction to consensus this effect will be massive - for example for private testnet this will increase shared txn throughput by 20x. (We can confirm this by looking at consensus utilization after deploying this fix)

We should still look into not submitting txn from each node to consensus, but this fix is still useful regardless of that.

When handling user transaction coming from narwhal we currently do two things **before setting shared** locks:

(1) Verify signatures on the transactions
(2) Verify if transaction were already processed

If you compare [consensus utilization](http://grafana.shared.internal.sui.io:3000/goto/e9vXAbV4k?orgId=1) and [txn verification utilization in consensus](http://grafana.shared.internal.sui.io:3000/goto/OeXu0x44z?orgId=1) you can see that essentially 99% of the consensus task is spent in signature verification. (Details on how utilization counters work are in #4584)

This PR swaps those two steps - we simply do not verify signatures on the transaction that was already processed.

Because signature verification dominates time in consensus task, this change will significantly increase consensus task throughput.

Given that currently each node submits transaction to consensus this effect will be massive - for example **for private testnet this will increase shared txn throughput by 20x**. (We can confirm this by looking at consensus utilization after deploying this fix)

We should still look into not submitting txn from each node to consensus, but this fix is still useful regardless of that.
@andll andll enabled auto-merge (squash) October 3, 2022 20:45
@andll andll merged commit cb38e07 into main Oct 3, 2022
@andll andll deleted the andrey-28 branch October 3, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants