-
Notifications
You must be signed in to change notification settings - Fork 287
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
blockchain/standalone: Implement a new module. #1808
blockchain/standalone: Implement a new module. #1808
Conversation
|
Is the plan to migrate some of the standalone funcs from the stake package in the future? |
I wasn't planning on doing that before the initial release, but yeah, I would like to do that eventually. |
11ff3d8
to
b32dd61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified there were no changes on the PoW code when compared to the current implementation in the blockchain package.
This implements a new module named blockchain/standalone which aims to provide several of the standalone functions currently available in blockchain and ultimately replace them in the next major version. The primary goal of offering these functions via a separate module is to reduce the required dependencies to a minimum as compared to the blockchain module. It will be ideal for applications such as lightweight clients that need to ensure basic security properties hold and calculate appropriate vote subsidies and block explorers. For example, some things an SPV wallet needs to prove are that the block headers all connect together, that they satisfy the proof of work requirements, and that a given transaction tree is valid for a given header. The new module currently only provides functions related to proof of work, however, future commits will provide functions for merkle root calculation, subsidy calculation, and coinbase transaction identification. It is being done in stages to help ease review since it is consensus critical code. Finally, it also includes comprehensive tests, full package documentation, and basic usage examples.
b32dd61
to
2c7d204
Compare
This implements a new module named
blockchain/standalone
which aims to provide several of the standalone functions currently available inblockchain
and ultimately replace them in the next major version.The primary goal of offering these functions via a separate module is to reduce the required dependencies to a minimum as compared to the
blockchain
module. It will be ideal for applications such as lightweight clients that need to ensure basic security properties hold and calculate appropriate vote subsidies and block explorers.For example, some things an SPV wallet needs to prove are that the block headers all connect together, that they satisfy the proof of work requirements, and that a given transaction tree is valid for a given header.
The new module currently only provides functions related to proof of work, however, future commits will provide functions for merkle root calculation, subsidy calculation, and coinbase transaction identification. It is being done in stages to help ease review since it is consensus critical code.
It will not be released until the remaining functions have been implemented.
Finally, it also includes comprehensive tests, full package documentation, and basic usage examples.