-
Notifications
You must be signed in to change notification settings - Fork 3
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
Split MainchainService into ValidatorService and WalletService, update ValidatorService #5
Conversation
rpc GenerateBlocks(GenerateBlocksRequest) | ||
returns (GenerateBlocksResponse); |
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.
I think this can be axed. Generating blocks currently happens through the contrib/signet/miner
script provided by Bitcoin Core, with minor tweaks by us. I'm currently working on a tweak here where we pass in CLI args for extra OP_RETURN messages that we want to add, which will let us do sidechain management. If we instead do generation through the wallet service, I think it'll end up being very hairy and complex
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 only for Regtest mode, so the signet script is irrelevant
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.
So what I'm thinking for signet is:
- The validator exposes an endpoint for constructing the correct M{1-6} OP_RETURN messages
- The signet miner script takes in these OP_RETURN messages, adding them to the coinbase vouts
For mining on regtest, the signet miner script could be modified to remove the signet parts, but keep the rest. Sidechain management on signet needs to be implemented anyways, and we need not too-cumbersome ways of doing this on regtest as well. I.e. not re-implement the block construction logic.
The way bitcoin-cli
does it with -generate
does not work for us. Under the hood that defers to generatetoaddress
, and there's no way of specifying coinbase outputs there.
d2a3a92
to
788ef35
Compare
@@ -233,8 +178,8 @@ message GetSidechainProposalsRequest { | |||
message GetSidechainProposalsResponse { | |||
message SidechainProposal { | |||
uint32 sidechain_number = 1; | |||
bytes data = 2; | |||
bytes data_hash = 3; | |||
google.protobuf.BytesValue data = 2; |
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.
Would it make sense to decode this data into a meaningful message? I.e. version
, title
, description
and the two hashes
https://github.com/bitcoin/bips/blob/master/bip-0300.mediawiki#m1----propose-sidechain
No description provided.