forked from kallewoof/elements
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add federated block-signing server implementation #4
Open
maaku
wants to merge
28
commits into
dgarage:dvep
Choose a base branch
from
maaku:federation
base: dvep
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
c4d3a12
[BlockSigner] Add block signer thread initialization code.
maaku cdae6ed
[BlockSigner] Add utility function for fetching wallet to use for blo…
maaku a93c459
[BlockSigner] Parse federation and block signer configuration options.
maaku daf40f3
[BlockSigner] Use the wallet to generate blocks at fixed intervals.
maaku bf079d1
[BlockSigner] Add 'blocksign' p2p message, and handshake protocol.
maaku 0107ee1
[BlockSigner] Add peer-to-peer protocol for sharing block proposals, …
maaku 826ca7f
[BlockSigner] Add script demonstrating how to use the federated block…
maaku 79a9dcd
f '[BlockSigner] Parse federation and block signer configuration opti…
maaku b3a0ab9
f '[BlockSigner] Parse federation and block signer configuration opti…
maaku 1da1bbb
f '[BlockSigner] Parse federation and block signer configuration opti…
maaku bf28ee6
f '[BlockSigner] Add script demonstrating how to use the federated bl…
maaku 2817b6a
f '[BlockSigner] Parse federation and block signer configuration opti…
maaku fef2e4e
f '[BlockSigner] Parse federation and block signer configuration opti…
maaku 2722026
f '[BlockSigner] Use the wallet to generate blocks at fixed intervals.'
maaku c4500a8
f '[BlockSigner] Use the wallet to generate blocks at fixed intervals.'
maaku 910b875
f '[BlockSigner] Use the wallet to generate blocks at fixed intervals.'
maaku 0c5d845
f '[BlockSigner] Add 'blocksign' p2p message, and handshake protocol.'
maaku 6bb86db
f '[BlockSigner] Add 'blocksign' p2p message, and handshake protocol.'
maaku cb96642
f '[BlockSigner] Add peer-to-peer protocol for sharing block proposal…
maaku 45a9dbd
f '[BlockSigner] Add 'blocksign' p2p message, and handshake protocol.'
maaku 8efa38a
f '[BlockSigner] Add peer-to-peer protocol for sharing block proposal…
maaku 8862190
f '[BlockSigner] Parse federation and block signer configuration opti…
maaku 3c70538
[Mining] Explicitly record block height as part of CBlockTemplate str…
maaku cbae6d7
f '[BlockSigner] Use the wallet to generate blocks at fixed intervals.'
maaku 9c375ba
[BlockSigner] Verify and store ACK signature from block proposal.
maaku ba4cc36
[ElementsRegtest] Add public parameters for block-signer elementsregt…
maaku 8cc00bc
f '[ElementsRegtest] Add public parameters for block-signer elementsr…
maaku 8a98f08
[BlockSigner] Ignore empty block proposals, exept every 15 minutes.
maaku File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
0107ee1
I am assuming several things here, but does this define the current round as the block time in seconds divided by 5 modulo member count? If so, won't this have a pretty poor distribution when there are e.g. 12 peers and 1 minute per block, since the peer will tend to be the same one each time? (12*5 = 60 s = 1 min = block interval).
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.
This is a mistake. We should be dividing by the length of the period (60 seconds) to get the current round, of course. During development I had this shortened to 5 seconds so I didn't have to sit around waiting for blocks to be generated. Looks like I accidentally committed that constant change at this point.
We should make the round parameters configurable, but that's a larger issue.
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.
Fixed the constant. Not marking as resolved until we decide how to make this configurable.
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.
Ahh, that makes sense. Can't you use
Params().GetConsensus().nPowTargetSpacing
directly?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.
Well yes, that would be the obvious thing to do. Duh.