-
Notifications
You must be signed in to change notification settings - Fork 21
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
Policy: limit witness stack size #52
Conversation
Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier.
Includes simplifications by Eric Lombrozo.
Includes support for pushkeyhash wit v0 by Alex Morcos.
Includes fixup by Thomas Kerin.
... why? There are use cases for witnesses that do things other than sigops. |
@maaku Can you give an example? |
@maaku that's why I left 200byte free space. Actually, the same policy could be applied to non-segwit tx too |
@sipa near-term: multiple HLTC. long-term: two-way peg, lamport signatures, script extensions. |
All the long term ones require new script functionality first, so this doesn't apply to them. What is HLTC? |
I am not fond of it, it complicate the code for no good reason. Can you explain what this is trying to achieve ? |
Joseph Poon recently proposed supporting escrow with lightning via revealing 2-of-3 hash preimages. http://lists.linuxfoundation.org/pipermail/lightning-dev/2016-January/000403.html By my rought count, the untested demo scripts come out to about 190 or 240 bytes I think (depending on whether they're 20B hash values or 32B), with two sig operations (in different OP_IF branches), and there would be an additional 113 or 137 bytes of signature data to spend it, for a total of 303 bytes or 377 bytes. I haven't looked at how nAccurateSigOpCount handles if branches, but the formula works out to 273 bytes if it only counts taken branches which isn't enough for either approach, or 346 bytes if it counts both, which would work okay, though only allows for 160 bit security rather than 256 bit. I don't see why a limit here in addition to the standard transaction size limit is desirable? |
61a90de
to
2a16578
Compare
909fb25
to
99c8d54
Compare
a88b686
to
38a8b36
Compare
0d624261ef Merge bitcoin-core/crc32c-subtree#2: Merge upstream cac7ca830b Merge commit 'fa5ade41ee480003d9c5af6f43567ba22e4e17e6' into bitcoin-fork fa5ade41ee Fix compilation warnings on ARM64 with old GCC versions. (#52) db08d22129 Updated Travis-CI configuration. (#51) e31619a5b7 Fix GitHub links. (#50) 7fa4c263e8 Update Travis CI config. (#49) a3d9e6d1a4 Updated third_party/ and Travis CI config. (#48) git-subtree-dir: src/crc32c git-subtree-split: 0d624261ef83ab08c953c196540ed18f355add4c
per input total witness stack size limit <= 73 * sigop + 200
briefly tested