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

Estimate sync progress more accurately (based on transaction count rather than block height) #42

Open
bitjson opened this issue Nov 24, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bitjson
Copy link
Member

bitjson commented Nov 24, 2021

When logging sync progress percentages, Chaingraph should use the GuessVerificationProgress algorithm from the Satoshi client. The source data should be provided in an environment variable like CHAINGRAPH_ESTIMATED_TRANSACTION_RATES, and rather than attempting to associate the proper estimate with each node/chain, we should just mark each estimate with the block hash. After Chaingraph completes the headers-first sync, it will typically see some block header hash it recognizes, and the better sync progress estimate will be used in agent logging.

We can copy ChainTxData from one of the Satoshi-client derived implementations for each chain/network. E.g. for BCH mainnet currently (hash : timestamp : transaction count : and per-second estimate after timestamp):

CHAINGRAPH_ESTIMATED_TRANSACTION_RATES=000000000000000000d7e938f43eb520468fc75dc626c54ec770f9cd1bd6bc1d:1628025092:1628025092:1.49

@bitjson bitjson added enhancement New feature or request good first issue Good for newcomers labels Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant