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

Provide easy access to specific consensus hashes when parsing #456

Merged
merged 3 commits into from Feb 14, 2017

Conversation

Projects
None yet
2 participants
@zathras-crypto
Copy link

zathras-crypto commented Feb 3, 2017

This PR adds a debug option to specify which blocks to generate a consensus hash for during parsing.

Previously to confirm a consensus hash for a particular block it was required to enable -omnidebug=consensus_hash_every_block during parsing to log the hash for every block which caused a significant slow down due to the extra work involved.

This leads to circumstances where to validate a single consensus hash it is neccessary to perform vastly more work than necessary.

This PR adds a -omnishowblockconsensushash startup option which can be used to generate consensus hashes for specific blocks.

For example, to validate the checkpoint for block 450,000 without using seed block filtering we can use:

./omnicored --startclean --omniseedblockfilter=false --omnishowblockconsensushash=450000

Which will then cause a consensus hash to be generated for the corresponding block and written to the log. Multiple instances of the parameter can be used to specify multiple blocks to generate consensus hashes for.

Provide easy access to specific consensus hashes when parsing
Note: previously to confirm a consensus hash for a particular block, it was required to enable --omnidebug=consensus_hash_every_block which significantly slowed down parsing.  With this PR it is now possible to supply a specific block (or blocks) to generate a consensus hash for during parsing.

@zathras-crypto zathras-crypto force-pushed the zathras-crypto:0.2-Z-EasyConsensusHash branch from 034cdbd to 9ca5080 Feb 3, 2017

@dexX7

This comment has been minimized.

Copy link
Member

dexX7 commented Feb 3, 2017

Nice!

Can you add a description for omnishowblockconsensushash please here?

https://github.com/OmniLayer/omnicore/blob/develop/src/init.cpp#L506

@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Feb 3, 2017

Sure will do :)

@dexX7 dexX7 added this to the Next release milestone Feb 8, 2017

zathras-crypto added some commits Feb 14, 2017

Add description to configuration.md
Note: also updates datacarriersize value (thanks @dexX7)
@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Feb 14, 2017

Sorry bud forgot all about this one, only realized I'd forgotten when I was going over my notes to prepare for tomorrows meeting d'oh!

Descriptions added as requested bud :)

@dexX7

This comment has been minimized.

Copy link
Member

dexX7 commented Feb 14, 2017

Thanks! :)

@dexX7 dexX7 merged commit 9c31fce into OmniLayer:develop Feb 14, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

dexX7 added a commit that referenced this pull request Feb 14, 2017

Merge #456: Provide easy access to specific consensus hashes when par…
…sing

9c31fce Add description to configuration.md (Zathras)
f82cfeb Add description to help messages (Zathras)
9ca5080 Provide easy access to specific consensus hashes when parsing (Zathras)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment