-
Notifications
You must be signed in to change notification settings - Fork 404
Comments
NOMERGE: Support signet as parent chain#414
NOMERGE: Support signet as parent chain #414jtimon wants to merge 6 commits intoElementsProject:elements-0.14.1 from
Conversation
91059bf to
4380518
Compare
jtimon
commented
Sep 22, 2018
fwiw, this seems to be working in the explorer, see jtimon/elements-explorer@df65994
But it would still be good to reuse the feature_peg.py modifying it a little bit to test this, even if it's only locally like when the parent chain is regtest before merging this.
src/pow.cpp
Outdated
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 guess we don't need or want this here.
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.
You would need to provide the signature for the genesis block otherwise, no?
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.
No, this is used to validate the parent chain. The sidechain doesn't validate the parent chain's genesis block (in fact, not even the parent chain should validate the genesis block, the genesis block is a consensus rule in itself and thus doesn't need to be validated, not when it's pow nor when it's blocksigned).
0fd6752 to
1e8648a
Compare
jtimon
commented
Sep 27, 2018
This can now be tested with:
python3 ./qa/pull-tester/rpc-tests.py feature_fedpeg --parent_type=signet --parent_binpath=/home/user/code/bitcoin/src/bitcoind
Assuming you're building https://github.com/kallewoof/bitcoin/commits/signet ( b4c9e78 ) on /home/user/code/bitcoin/.
The changes to feature_fedpeg shouldn't break other ways to call the tests:
python3 ./qa/pull-tester/rpc-tests.py feature_fedpeg
python3 ./qa/pull-tester/rpc-tests.py feature_fedpeg --parent_type=bitcoin --parent_binpath=/home/jt/data/programs/binaries/bitcoin-0.16.3/bin/bitcoind
python3 ./qa/pull-tester/rpc-tests.py feature_fedpeg --parent_type=bitcoin --parent_binpath=/home/jt/data/programs/binaries/bitcoin-0.17.0/bin/bitcoind
qa/rpc-tests/feature_fedpeg.py
Outdated
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.
Is this magic value related to the one in -signet_blockscript? Perhaps define them as variables somewhere earlier then together so that it's clear they are related.
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 will eventually go away, I assume, unless we agree on a global default signet (seems unlikely, at least for upstream to bitcoin/bitcoin).
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.
yeah, we could generate the block signing script and the wif dynamically by starting a node, getnewaddress, dumpprivkey, etc beforehand and then starting the actual testing nodes with the resulting script.
This is just the wif for the public key corresponding to the script.
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 what I was using for generating the p2pk sript and the corresponding wif to import:
qa/rpc-tests/feature_fedpeg.py
Outdated
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.
Is there an upstream issue to track for this?
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.
No, all we have for now is bitcoin/bitcoin@master...kallewoof:signet where I'm commenting directly on the code.
Pinging @kallewoof since I can't remember if I suggested this to him.
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 intend to make a PR against bitcoin core. For now there is a PR against my repo here: kallewoof/bitcoin#4
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.
Is this supposed to be like a global cache? It doesn't seem to get emptied ever.
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.
An in-memory cache that, most importantly, doesn't inflate memory usage when signet feature is off.
This does mean an ever-growing set when on, yes. Wonder what cane be done with this.
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.
@kallewoof thoughts?
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.
It's ever growing, yep. It could be cached since header sigs are stored along with headers. I haven't thought too much about it, as even a 1 million block chain (that's 2x the lifetime of bitcoin right now) would only have ~100 MB of RAM use.
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.
Also when it's a 11-of-15 multisig? Or even larger if this script doesn't have the same script limits as normal tx scripts.
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.
Right you would basically store siglen + alpha per block. For a 15 multisig over ECDSA it'd get big quicker, I suspect, but I assume we will eventually switch to Schnorr multisigs long term.
jtimon
commented
Oct 6, 2018
Now we can review signet more easily with kallewoof/bitcoin#4
1e8648a to
9dcf7dd
Compare
jtimon
commented
Oct 6, 2018
Needed rebase. Also, removed one TODO and its workaround in the tests since now generate works directly with signet.
bbc58b9 to
4d9ad55
Compare
jtimon
commented
Oct 6, 2018
Moved to kallewoof/bitcoin#5 and removed the special case for the p2sh test for signet.
4d9ad55 to
f95af12
Compare
signed has simpler signed blocks but no CT or any other extra feature
f95af12 to
1518f6e
Compare
jtimon
commented
Oct 9, 2018
Updated, now it doesn't have the wif and blockscript hardcoded but generated aumotatically
1518f6e to
23cb9ae
Compare
jtimon
commented
Oct 9, 2018
Fixed travis.
stevenroose
commented
Oct 10, 2018
instagibbs
commented
Oct 12, 2018
Could we get travis testing against a signet parent binary?
stevenroose
commented
Oct 16, 2018
That would be ideal of course. Could be as simple as the Bitcoin extra Travis thing. But then there need to be some kind of "stable" signet release..
instagibbs
commented
Oct 16, 2018
@stevenroose I'm simply reticent to merge something we can't be confident of stability of the protocol itself.
@kallewoof any plans on "finalizing" this, whatever that means to you? :) We clearly can adapt implementation later to later upgrades.
stevenroose
commented
Oct 16, 2018
Maybe when the elements-0.17 work is done, signet is "released" and we can download a stable binary. I wouldn't mind to keep this open. Or either way just have a custom-compiled signet binary in Travis.
6ba0d07 to
cc7d24f
Compare
Added a commit (not squashed yet) supposedly adapting the test to #433 as parent chain binary.
(削除) But even though everything else should have stayed the same, travis seems to be failing. (削除ここまで)
(削除) ...it's not the first time assetdir.py randomly fails for me in elements-0.14, let me ask travis to try again... (削除ここまで)
instagibbs
commented
Mar 28, 2019
@kallewoof have you or do you have intentions of releasing binaries for signet? We could at least get this ported to master for support/iteration.
@instagibbs Sorry for lack of activity. I am intending on proposing a BIP for signet in the near future. Things will be switched around a bit, I suspect, so no binaries yet.
Edit: to actually answer your question, I think having binaries for signet would be useful and will see about making those available. No timeframe at this point in time.
instagibbs
commented
Mar 28, 2019
Ok just curious. Still interested at least in supporting as parent chain.
Uh oh!
There was an error while loading. Please reload this page.
signet has simpler signed blocks but no CT or any other extra feature from elements.
Suggestion to test this: #433
Dependencies: