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

eth: skip transaction handling during fast sync #2574

Merged
merged 1 commit into from
May 17, 2016

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented May 17, 2016

This PR's meant to address a transaction handling issue that became a bit more emphasized with the high transaction count of the DAO. During synchronization, nodes do accept, try to process and propagate good transactions to other nodes. This is desirable to prevent DOS attacks.

However, during initial fast sync all the transactions propagated to a node are essentially useless since it cannot do anything with them, and by the time the node finishes syncing, most will be integrated into the chain either way. However, by keeping them in the active pool, it puts a burden on the node to constantly recheck the cached transactions if they should be dumped or still kept around.

This PR disables accepting new transactions while fast sync is in progress, hence taking quite a computational and networking burden off a node's shoulder.


Performance wise with this PR + the concurrent headers a sync from 0 to 1533536 took 24 minutes for me, down from 27 mins a few weeks ago (with less blocks back then). Seems that sync is also a lot more stable, probably due to all that junk transaction traffic not being pushed over network links.


PS: The PR does make one slight change in behavior compared to the old code: if a private network is booted up with every node configured to fast sync, then the network will not forward transactions until the first block is mined and fast sync disabled. Given however that nodes should never assume any timing guarantees about transaction incorporation, this should be a fully negligible scenario.

@robotally
Copy link

robotally commented May 17, 2016

Vote Count Reviewers
👍 0
👎 0

Updated: Tue May 24 07:41:36 UTC 2016

@fjl fjl mentioned this pull request May 17, 2016
7 tasks
@obscuren obscuren merged commit c8a8ad9 into ethereum:develop May 17, 2016
@obscuren obscuren removed the review label May 17, 2016
@bmscardoso
Copy link

Please can someone help me? I just cant sync!
I see everyone with this problem but i cant find a solution

I see the update (gethasaurus v1.4.4) who fix it but im new and i dont know how to install it on ubunto server.

Thank you very much for any help

maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Aug 1, 2024
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.

4 participants