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

Implement raw transaction RPC calls #1456

Merged
merged 4 commits into from
Jul 5, 2012

Conversation

gavinandresen
Copy link
Contributor

Implement listunspent / getrawtx / createrawtx / signrawtx, to support
creation and signing-on-multiple-device multisignature transactions.

See https://secure.bettermeans.com/projects/4180/wiki/Raw_Transaction_RPC_Test_Plan for the test plan.

See https://gist.github.com/2839617 for the API design.

@luke-jr
Copy link
Member

luke-jr commented Jun 19, 2012

Breaks Bitcoin-Qt without this:

diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index 9885e1e..b562560 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -217,6 +217,7 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
     src/qt/walletmodel.cpp \
     src/bitcoinrpc.cpp \
     src/rpcdump.cpp \
+    src/rpcrawtx.cpp \
     src/qt/overviewpage.cpp \
     src/qt/csvmodelwriter.cpp \
     src/crypter.cpp \

@gavinandresen
Copy link
Contributor Author

Rebased to master and added rpcrawtx.cpp to bitcoin-qt.pro.

But I'm having second thoughts on how to specify previous outputs; especially with @sipa's compression work I think maybe specifying them as [txid,n,hex_scriptPubkey] might be better than just "hex_serialized_complete_transaction"

@jgarzik
Copy link
Contributor

jgarzik commented Jun 27, 2012

ACK latest revision

This PULL reworks new (post-0.6.*) features of the
gettransaction/getblock RPC calls as follows:

It removes the 'decompositions' object argument from getblock,
replacing it just a list of transaction hashes; equivalent
(I believe) of passing the {"tx":"hash"} decomposition.

It replaces the 'decompositions' object argument of
gettransaction with a boolean flag; if true, returns
the same stuff that the {"script":"obj"} decomposition
would return (txins/txouts as hex, disassembled, and bitcoin
addresses).

It adds a "rawtx" field to the output of gettransaction,
that is the entire transaction serialized and hex-encoded.

It removes the "size" field from gettransaction, since the size
is trivial to compute from the "rawtx" field (either take the
length after hex-decoding, or just compute it as hex-length/2).
Minor refactor to support signrawtx signing/verifying transactions
when it might only have the previous transaction's txid and
txOut.
Implement listunspent / getrawtransaction / createrawtransaction /
signrawtransaction, to support creation and
signing-on-multiple-device multisignature transactions.
@gavinandresen gavinandresen merged commit a2709fa into bitcoin:master Jul 5, 2012
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
* Improve DecodeBase58 performance

* Improve EncodeBase58
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
These are random minor improvements to the test framework that I made when preparing my ZCF talk.
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
b8f3277 [Trivial] Cleaning not used pCheckpointCache. (furszy)

Pull request description:

  Auto-descriptive PR.

ACKs for top commit:
  random-zebra:
    utACK b8f3277

Tree-SHA512: 7c3e86b0d513b8e57c7396a384b7d78ac88c15647df768c88bd21e949ca6863440a4d259678fe1c09df570adb8c597a12d2e7fa5dc235e0056ae58561c6840c6
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants