Comments (10)
concept ACK on creating some sort of algebraic data type, but since types aren't interpreted until they are popped off the stack w/ the given op code in the script i'm not sure that is possible. Is there any specification on what OP_CHECKSIGFROMSTACK
does?
Does it verify the data one the stack hashes to the same value which we signed with the private key corresponding to the public key on the stack? What is the use case for this?
from elements.
@Christewart OP_CHECKSIGROMSTACK takes from the stack
- a pub key
- a message (arbitrary data)
- a signature
Then it hashes the message once with SHA256 and does an ECDSA digital signature verification with the pub key and the signature and the hashed message, and pushes the result of that verification.
This signature does not have a sighash-type tacked on the end, so it is one byte shorter than the singature that appears with CHECKSIG. The error is that the code still checks if the last byte of the signature is a valid sighash-type value.
I'm not sure what the principle use case is. Something about bonds.
from elements.
Another possible solution is just appending a hash type, and then replacing pubKey.verify
with a custom function that verifies signatures similar to how TransactionSignatureChecker.checkSig does.
from elements.
I think it's a question if the "good" solution is worth the squeeze. As this problem only affects policy, by far the least disruptive change is to simply turn off the strictenc flag for that call, which literally only turns off the sighash type check.
Better solutions require monkeying around with a lot more code. I did figure a one-line change that at least lets us add the signature check to the sigcache, but that's orthogonal to this.
Also, even if we add signature hash types to this type, we still can't simply use the normal calls because the API expects things like scriptCode, etc. It's not super clean and either means we duplicate code or touch consensus-critical API, which results in a HF regardless.
from elements.
It seems you mean CHECKSIGFROMSTACKVERIFY here, right?
from elements.
@instagibbs yes; I've corrected my comment.
from elements.
@instagibbs This is more of a meta question, but how concerned are we about hard forking this blockchain at this early stage? Are we committed to soft forks or can we make sweeping changes that would be easier as a HF. It's not like we have PoW to worry about yet and the system is extremely centralized with 7 functionaries.
from elements.
@Christewart Policy here is to not hard-fork an already-existing chain. Before starting a subsequent chain we can do any changes we like.
from elements.
this should be corrected by adding an exception in the policy in the current elements-0.13.1
codebase.
from elements.
Fixed long ago.
from elements.
Related Issues (20)
- Increase block size HOT 4
- Can sendmany be used to send assets? HOT 2
- Green wallet seed import can't compatible with sideswap wallet HOT 3
- Elements/Liquidv1 package for StartOS HOT 1
- How to use with bitcoinlib-js HOT 7
- Message signing only works with legacy addresses HOT 4
- Block proof invalid after block 431 HOT 16
- issueasset: issuance is always blinded HOT 2
- RPC example or tutorial opcodes enabled by liquid HOT 1
- Write and sign custom transaction code HOT 2
- Can´t mint tokens HOT 1
- Can't enable coin control features HOT 5
- Given claim_script does not match the given Bitcoin transaction. HOT 9
- signmessage HOT 1
- Wallet migration fails with confidential transactions HOT 8
- wallet managed by elements-cli receives tx with tokens but doesn't process them (not in the locally parsed TX, not in the balance) HOT 2
- Received funds appear in listreceivedbyaddress, but are not taken into account for the wallet balance and cannot be transferred
- Support for Jade hardware wallet HOT 3
- Confidential peg-in transaction HOT 11
- Sending transactions with 0.01 instead of 0.1 sats/vbyte
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elements.