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

[0.17] Signed blocks feature #478

Merged

Conversation

instagibbs
Copy link
Collaborator

@instagibbs instagibbs commented Dec 11, 2018

Squashed and rebased version of: #452 on my own repo.

Adds -con_signed_blocks which enables signed block mode with -signblockscript defining the encumbrance, which replaces pow-based data in block headers with that script. -con_max_block_sig_size is a novel argument compared to elements-0.14.1, which caps the total size of the signature in the block header. This avoids all number of DoS concerns and simplifies the miner code.

This also creates signed block RPCs, as well as compact block RPCs for blocksigner use.

@instagibbs
Copy link
Collaborator Author

I'll pull in Blockstream/liquid#8 too

@instagibbs
Copy link
Collaborator Author

And Blockstream/liquid#6

@instagibbs
Copy link
Collaborator Author

Actually going to defer those to someone else's task, as they require rebase, and I'd rather let the original author do that :)

@instagibbs
Copy link
Collaborator Author

rebased

@instagibbs
Copy link
Collaborator Author

bitcoin_functional:wallet_listsinceblock.py failure. Can't reproduce locally and the logs aren't helpful in figuring out what was wrong. Restarting that job.

src/chainparams.cpp Show resolved Hide resolved
src/chainparamsbase.cpp Outdated Show resolved Hide resolved
src/consensus/params.h Show resolved Hide resolved
src/primitives/block.cpp Show resolved Hide resolved
src/chain.h Show resolved Hide resolved
src/rpc/mining.cpp Outdated Show resolved Hide resolved
src/rpc/mining.cpp Outdated Show resolved Hide resolved
src/rpc/mining.cpp Show resolved Hide resolved
src/wallet/rpcwallet.cpp Show resolved Hide resolved
test/functional/mempool_packages.py Show resolved Hide resolved
@instagibbs
Copy link
Collaborator Author

instagibbs commented Dec 19, 2018

Addressed comments

@stevenroose
Copy link
Member

tACK ff32b17

@stevenroose stevenroose merged commit ff32b17 into ElementsProject:elements-0.17 Dec 19, 2018
stevenroose added a commit that referenced this pull request Dec 19, 2018
ff32b17 elements style genesis block commits to signblockscript in CommitToArguments (Gregory Sanders)
3169d38 added blocksign functional test (Gregory Sanders)
d78f076 Signed blocks by default for custom chains (Gregory Sanders)
8723deb RPC support for signed blocks, compact blocks infrastructure (Gregory Sanders)
5877da8 Expose signed block information over RPC when active (Gregory Sanders)
0d7e0f9 Miner support for signed blocks (Gregory Sanders)
0e47322 Expose signed blocks in validation.cpp (Gregory Sanders)
cd4e553 CProof (re)setting and validation helper functions (Gregory Sanders)
2a3dcde Set genesis block CProof to signblockscript if signed blocks active (Gregory Sanders)
6ad13bb Signed blocks have work of 1 each (Gregory Sanders)
6856beb Have chainstate store CProof for each block header (Gregory Sanders)
60f7062 Define block signatures, active IFF g_signed_blocks active (Gregory Sanders)
f7c5cf7 Add not yet enforced chainparam arguments for signed blocks (Gregory Sanders)
7bc578a Add SimpleSignatureChecker, SCRIPT_NO_SIGHASH_BYTE validation flag (Gregory Sanders)
6c91446 Expose check_pow for compact blocks, helper to get available Tx list (Gregory Sanders)

Pull request description:

  Squashed and rebased version of: #452 on my own repo.

  Adds `-con_signed_blocks` which enables signed block mode with `-signblockscript` defining the encumbrance, which replaces pow-based data in block headers with that script. `-con_max_block_sig_size` is a novel argument compared to `elements-0.14.1`, which caps the total size of the signature in the block header. This avoids all number of DoS concerns and simplifies the miner code.

  This also creates signed block RPCs, as well as compact block RPCs for blocksigner use.

Tree-SHA512: af2624ff8d456673c40fba283f3cdbd2559b528b87ff9b10335f5fb893ff7d7b286655c9856bb23f84b5722c7ad0091e77208c89c18a6f71b1cbd18076841071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants