Comments (5)
If tx
is spending multiple inputs in txin
, you have to select the input index you want to look at using the -s
(--select
) flag. Otherwise btcdeb will derive the first input being spent and pick that.
from btcdeb.
Some explorers allow you to see the raw hex value of a transaction, rather than seeing its "decoded" form.
Bitcoin-cli has a getrawtransaction command which lets you do this as well. If you know the block hash as well, you can use this to get the transaction hex value by doing
bitcoin-cli getrawtransaction <TXIN TXID> <TXIN CONTAINED BLOCK HASH>
from btcdeb.
Some explorers allow you to see the raw hex value of a transaction, rather than seeing its "decoded" form.
Bitcoin-cli has a getrawtransaction command which lets you do this as well. If you know the block hash as well, you can use this to get the transaction hex value by doing
bitcoin-cli getrawtransaction <TXIN TXID> <TXIN CONTAINED BLOCK HASH>
Thanks, my confusion was that --txin=<reftx hex>
is the hex of the entire referenced transaction, that the input is referencing. Perhaps it should be clarified in btcdeb.md, it was unclear.
I still do not understand, if the --tx=<hex>
has more than one input that reference the same --txin=<reftx hex>
, which tx's input script btcdeb is going to debug?
from btcdeb.
Perhaps it's worth adding an example with all three --tx=<hex> --txin=<hex> --select=<input no>
into btcdeb.md. I can look for a representative transaction and submit a PR, if you think it's useful. I also did a screen grab illustrating how btcdeb works for a non-trivial script.
Another question:
A script verification (most often) involves verification of (pubKey, signature) pairs, given the sighash. Is there an API to btcdeb that allows to return all (pubKey, signature) pairs, that have been successfully verified for a given input script (regardless of the script logic)?
Or, in the absence of a btcdeb API, perhaps linking to Bitcoin Core libraries and calling its C++ functions is a way to get the verified (pubKey, signature) pairs, given tx, txin and the input number?
This is the screenshot from btcdeb of what I am looking for:
from btcdeb.
Perhaps it's worth adding an example with all three
--tx=<hex> --txin=<hex> --select=<input no>
into btcdeb.md. I can look for a representative transaction and submit a PR, if you think it's useful. I also did a screen grab illustrating how btcdeb works for a non-trivial script.
Yeah, sounds like a good thing to have.
Another question:
A script verification (most often) involves verification of (pubKey, signature) pairs, given the sighash. Is there an API to btcdeb that allows to return all (pubKey, signature) pairs, that have been successfully verified for a given input script (regardless of the script logic)? Or, in the absence of a btcdeb API, perhaps linking to Bitcoin Core libraries and calling its C++ functions is a way to get the verified (pubKey, signature) pairs, given tx, txin and the input number?
This is the screenshot from btcdeb of what I am looking for:
Nope, no such functionality at the moment.
from btcdeb.
Related Issues (20)
- make fails HOT 11
- glibtoolize: error: One of these is required: glibtoolize: gm4 gnum4 m4 glibtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'.
- Doc Tapscript Example with Tap - Error: Invalid Script HOT 2
- Script pubkey version 1 not supported when debugging taproot transaction in v0.3.20 HOT 2
- Need a correction in Read.me - docker commands HOT 1
- Docker container fails to run HOT 2
- .
- how can i use lib on testnet HOT 3
- .
- .
- Problems compiling btcdeb tools into JavaScript using emscripten. HOT 1
- P2TR transaction Signature checking error HOT 4
- error: Using OP_CODESEPARATOR in non-witness script HOT 3
- Alomado
- Napolitano
- Linux installation issue HOT 5
- Hi
- Would this gonna fix the transaction?
- c
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 btcdeb.