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

Make the transaction-cache initialization faster #5355

Closed
5 tasks done
lurais opened this issue Jul 17, 2023 · 11 comments · Fixed by #5394
Closed
5 tasks done

Make the transaction-cache initialization faster #5355

lurais opened this issue Jul 17, 2023 · 11 comments · Fixed by #5394
Assignees

Comments

@lurais
Copy link
Contributor

lurais commented Jul 17, 2023

Rationale

At present, it takes about 35s to start the node, and it takes 25 to 30s to load the transaction cache in the node start period.
And the bloom filter is used as the transaction cache actually.
So it is expected to shorten the node start time by loading the bloom filter faster.

Why should this feature exist?
1.To make the node start faster.

Implementation

1.The node writes the bloom filter to the disk when the kill -15 signal is received.
2.Load the bloom filter into the ram if the bloom filter file is existed and can be opened normally,
or build the transaction cache from recent 65536 blocks like before.

Additional information

kill -15 is required

Related PRs

@halibobo1205 halibobo1205 added the type: Enhancement minor enhancement label Jul 17, 2023
@sunflower-sun
Copy link

Looking forward for its implementation.

@halibobo1205
Copy link
Contributor

halibobo1205 commented Jul 17, 2023

@lurais Sounds great. I am not sure if it's faster to start. but I guess maybe if you implement it.
Can you please open a PR with the above solution?

@lurais
Copy link
Contributor Author

lurais commented Jul 19, 2023

@lurais Sounds great. I am not sure if it's faster to start. but I guess maybe if you implement it. Can you please open a PR with the above solution?

@halibobo1205 yes, a pr about the solution will be proposed subsequently。

@Shuo613
Copy link

Shuo613 commented Jul 26, 2023

Hi

@halibobo1205 halibobo1205 changed the title Make the node start faster Make the transaction-cache initialization faster Jul 27, 2023
@lurais
Copy link
Contributor Author

lurais commented Jul 27, 2023

Hi

@Shuo613 Hello, do you have any questions ?

@lurais
Copy link
Contributor Author

lurais commented Jul 28, 2023

@lurais Sounds great. I am not sure if it's faster to start. but I guess maybe if you implement it. Can you please open a PR with the above solution?

@halibobo1205 yes, a pr about the solution will be proposed subsequently。

@halibobo1205 A draft of that is here : #5377

@Shuo613
Copy link

Shuo613 commented Jul 28, 2023

兄弟哪裡

@tomatoishealthy
Copy link
Contributor

兄弟哪裡

English please dear, and also please do not post worthless content

@lvs007
Copy link
Contributor

lvs007 commented Aug 9, 2023

@halibobo1205 Can you take care of the development of this feature?
And give data on how much of an improvement the optimization will bring.

@halibobo1205
Copy link
Contributor

@halibobo1205 Can you take care of the development of this feature? And give data on how much of an improvement the optimization will bring.

@lvs007 We're ready for review #5394 . Expected to take less than 1s

@lvs007
Copy link
Contributor

lvs007 commented Aug 9, 2023

If it goes from 20+ seconds down to about 1 second, that would be a big improvement; a very good improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants