tx-engine 0.11.0__tar.gz → 0.11.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tx_engine-0.11.0 → tx_engine-0.11.2}/Cargo.lock +87 -45
- {tx_engine-0.11.0 → tx_engine-0.11.2}/Cargo.toml +1 -1
- {tx_engine-0.11.0 → tx_engine-0.11.2}/PKG-INFO +1 -1
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/README.md +1 -0
- tx_engine-0.11.2/docs/Regtest.md +150 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/Releases.md +2 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/rpc_interface.py +21 -2
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/interface/rpc_interface.rs +81 -14
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/authch.rs +2 -5
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/block.rs +4 -4
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/createstrm.rs +3 -3
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/filter_add.rs +2 -3
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/filter_load.rs +2 -3
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/merkle_block.rs +5 -4
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/message_header.rs +5 -3
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/protoconf.rs +4 -4
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/reject.rs +5 -7
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/tx.rs +7 -10
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/tx_in.rs +2 -3
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/tx_out.rs +2 -3
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/version.rs +3 -4
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/network/network.rs +1 -1
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/python/py_script.rs +2 -2
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/eval.rs +51 -73
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/rules.rs +14 -5
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/tests.rs +87 -1
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/stack.rs +17 -4
- tx_engine-0.11.2/src/util/bounded_read.rs +117 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/mod.rs +4 -1
- tx_engine-0.11.2/tests/hostile_lengths.rs +160 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/.github/dependabot.yml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/.github/workflows/CI.yml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/.github/workflows/on_push.yml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/.gitignore +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/LICENSE +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/LICENSE-rust-sv +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/README-chain-gang.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/README-pypi.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/README.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/BIP-32-Python.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/BIP-32.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/Chronicle-Python.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/Chronicle.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/Development.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/Python-API.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/README-chain-gang.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/Requirements +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/diagrams/keys.png +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/diagrams/keys.puml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/diagrams/overview.png +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/diagrams/overview.puml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/diagrams/python_classes.png +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/docs/diagrams/python_classes.puml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/pyproject.toml +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/README.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/lint.sh +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/requirements.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/README.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_bit_twiddling.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_bsv.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_chronicle_context.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_chronicle_opcodes.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_chronicle_tx_validate.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_debug.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_ec.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_fed.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_hd_wallet.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_if.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_interface.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_op.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_parse.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_rpc_interface.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_script.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_sighash.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_sign.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_tx.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_verify_script.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_wallet.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_wif_from_pw_nonce.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_woc.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tests/test_woc_interface.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/__init__.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/__init__.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/context.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/cryptography_utils.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/engine_types.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/op_code_names.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/op_codes.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/engine/util.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/__init__.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/blockchain_interface.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/interface_factory.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/mock_interface.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/verify_script.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/woc.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/interface/woc_interface.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/tx/__init__.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/src/tx_engine/tx/sighash.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/python/tests.sh +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/address/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/chronicle.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/interface/blockchain_interface.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/interface/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/interface/test_interface.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/interface/uaas_interface.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/interface/woc_interface.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/lib.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/addr.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/block_header.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/block_locator.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/blocktxn.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/cmpctblock.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/fee_filter.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/getblocktxn.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/headers.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/inv.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/inv_vect.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/message.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/node_addr.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/node_addr_ex.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/out_point.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/ping.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/send_cmpct.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/streamack.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/messages/tx_chronicle_validate.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/network/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/network/seed_iter.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/peer/atomic_reader.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/peer/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/peer/peer.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/python/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/python/py_hd_wallet.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/python/py_stack.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/python/py_tx.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/python/py_wallet.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/checker.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/format.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/multisig.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/push.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/interpreter/script_code.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/script/op_codes.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/test_util.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/transaction/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/transaction/p2pkh.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/transaction/sighash.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/bits.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/bloom_filter.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/errors.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/future.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/hash160.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/hash256.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/latch.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/rx.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/serdes.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/sha1.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/sha256.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/util/var_int.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/base58_checksum.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/extended_key.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/hd_wallet.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/hd_watch_wallet.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/mnemonic.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/mod.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wallet.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/chinese_simplified.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/chinese_traditional.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/english.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/french.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/italian.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/japanese.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/korean.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/src/wallet/wordlists/spanish.txt +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/tests/regtest_p2p.rs +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/tools/README.md +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/tools/dbg.py +0 -0
- {tx_engine-0.11.0 → tx_engine-0.11.2}/tools/generate_key.py +0 -0
|
@@ -80,6 +80,12 @@ version = "0.22.1"
|
|
|
80
80
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
81
81
|
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
82
82
|
|
|
83
|
+
[[package]]
|
|
84
|
+
name = "base64"
|
|
85
|
+
version = "0.23.1"
|
|
86
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
+
checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
|
|
88
|
+
|
|
83
89
|
[[package]]
|
|
84
90
|
name = "base64ct"
|
|
85
91
|
version = "1.8.3"
|
|
@@ -88,9 +94,9 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
|
|
|
88
94
|
|
|
89
95
|
[[package]]
|
|
90
96
|
name = "bitflags"
|
|
91
|
-
version = "2.13.
|
|
97
|
+
version = "2.13.2"
|
|
92
98
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
93
|
-
checksum = "
|
|
99
|
+
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
|
94
100
|
|
|
95
101
|
[[package]]
|
|
96
102
|
name = "block-buffer"
|
|
@@ -130,9 +136,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
|
130
136
|
|
|
131
137
|
[[package]]
|
|
132
138
|
name = "cc"
|
|
133
|
-
version = "1.4.
|
|
139
|
+
version = "1.4.6"
|
|
134
140
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
-
checksum = "
|
|
141
|
+
checksum = "a3eb0f42d6c360dc3f8a821f6bf2fdea7f72bfd36b3076eb0e6d1e9e0752fff4"
|
|
136
142
|
dependencies = [
|
|
137
143
|
"find-msvc-tools",
|
|
138
144
|
"jobserver",
|
|
@@ -165,7 +171,7 @@ dependencies = [
|
|
|
165
171
|
|
|
166
172
|
[[package]]
|
|
167
173
|
name = "chain-gang"
|
|
168
|
-
version = "0.11.
|
|
174
|
+
version = "0.11.2"
|
|
169
175
|
dependencies = [
|
|
170
176
|
"async-lock",
|
|
171
177
|
"async-trait",
|
|
@@ -251,6 +257,12 @@ version = "0.8.7"
|
|
|
251
257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
252
258
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
253
259
|
|
|
260
|
+
[[package]]
|
|
261
|
+
name = "core_detect"
|
|
262
|
+
version = "1.0.0"
|
|
263
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
264
|
+
checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"
|
|
265
|
+
|
|
254
266
|
[[package]]
|
|
255
267
|
name = "cpubits"
|
|
256
268
|
version = "0.1.1"
|
|
@@ -391,11 +403,17 @@ dependencies = [
|
|
|
391
403
|
|
|
392
404
|
[[package]]
|
|
393
405
|
name = "encoding_rs"
|
|
394
|
-
version = "0.8.
|
|
406
|
+
version = "0.8.41"
|
|
395
407
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
396
|
-
checksum = "
|
|
408
|
+
checksum = "7b5ef0006ac9ab233c38522f5ae99cae3625151de8f706cacee1cba4b8e2832a"
|
|
397
409
|
dependencies = [
|
|
398
410
|
"cfg-if",
|
|
411
|
+
"core_detect",
|
|
412
|
+
"multiversion",
|
|
413
|
+
"multiversion_no_op",
|
|
414
|
+
"rustversion",
|
|
415
|
+
"scopeguard",
|
|
416
|
+
"simdutf8",
|
|
399
417
|
]
|
|
400
418
|
|
|
401
419
|
[[package]]
|
|
@@ -625,9 +643,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
|
625
643
|
|
|
626
644
|
[[package]]
|
|
627
645
|
name = "hybrid-array"
|
|
628
|
-
version = "0.4.
|
|
646
|
+
version = "0.4.15"
|
|
629
647
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
630
|
-
checksum = "
|
|
648
|
+
checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
|
|
631
649
|
dependencies = [
|
|
632
650
|
"subtle",
|
|
633
651
|
"typenum",
|
|
@@ -676,7 +694,7 @@ version = "0.1.20"
|
|
|
676
694
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
677
695
|
checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
|
|
678
696
|
dependencies = [
|
|
679
|
-
"base64",
|
|
697
|
+
"base64 0.22.1",
|
|
680
698
|
"bytes",
|
|
681
699
|
"futures-channel",
|
|
682
700
|
"futures-util",
|
|
@@ -811,9 +829,9 @@ dependencies = [
|
|
|
811
829
|
|
|
812
830
|
[[package]]
|
|
813
831
|
name = "ipnet"
|
|
814
|
-
version = "2.12.
|
|
832
|
+
version = "2.12.2"
|
|
815
833
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
816
|
-
checksum = "
|
|
834
|
+
checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0"
|
|
817
835
|
|
|
818
836
|
[[package]]
|
|
819
837
|
name = "itoa"
|
|
@@ -932,9 +950,9 @@ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
|
|
|
932
950
|
|
|
933
951
|
[[package]]
|
|
934
952
|
name = "lru-slab"
|
|
935
|
-
version = "0.1.
|
|
953
|
+
version = "0.1.3"
|
|
936
954
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
937
|
-
checksum = "
|
|
955
|
+
checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f"
|
|
938
956
|
|
|
939
957
|
[[package]]
|
|
940
958
|
name = "memchr"
|
|
@@ -959,6 +977,33 @@ dependencies = [
|
|
|
959
977
|
"windows-sys 0.61.2",
|
|
960
978
|
]
|
|
961
979
|
|
|
980
|
+
[[package]]
|
|
981
|
+
name = "multiversion"
|
|
982
|
+
version = "0.9.0"
|
|
983
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
984
|
+
checksum = "b4ca4bea16ffc3f443cf7d866912118196bfef4c6a1556ca00f9f9b00bb43f7c"
|
|
985
|
+
dependencies = [
|
|
986
|
+
"multiversion-macros",
|
|
987
|
+
]
|
|
988
|
+
|
|
989
|
+
[[package]]
|
|
990
|
+
name = "multiversion-macros"
|
|
991
|
+
version = "0.9.0"
|
|
992
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
993
|
+
checksum = "0d416831a7317ef4b08bee00b69cbbb9c8763da7959a7026244d6266869f9c83"
|
|
994
|
+
dependencies = [
|
|
995
|
+
"proc-macro2",
|
|
996
|
+
"quote",
|
|
997
|
+
"rustversion",
|
|
998
|
+
"syn 3.0.5",
|
|
999
|
+
]
|
|
1000
|
+
|
|
1001
|
+
[[package]]
|
|
1002
|
+
name = "multiversion_no_op"
|
|
1003
|
+
version = "1.0.0"
|
|
1004
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1005
|
+
checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"
|
|
1006
|
+
|
|
962
1007
|
[[package]]
|
|
963
1008
|
name = "murmur3"
|
|
964
1009
|
version = "0.5.2"
|
|
@@ -1160,9 +1205,9 @@ dependencies = [
|
|
|
1160
1205
|
|
|
1161
1206
|
[[package]]
|
|
1162
1207
|
name = "quinn"
|
|
1163
|
-
version = "0.11.
|
|
1208
|
+
version = "0.11.12"
|
|
1164
1209
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1165
|
-
checksum = "
|
|
1210
|
+
checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11"
|
|
1166
1211
|
dependencies = [
|
|
1167
1212
|
"bytes",
|
|
1168
1213
|
"cfg_aliases",
|
|
@@ -1180,9 +1225,9 @@ dependencies = [
|
|
|
1180
1225
|
|
|
1181
1226
|
[[package]]
|
|
1182
1227
|
name = "quinn-proto"
|
|
1183
|
-
version = "0.11.
|
|
1228
|
+
version = "0.11.18"
|
|
1184
1229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1185
|
-
checksum = "
|
|
1230
|
+
checksum = "a9746dbde176634f4f2f1faf2404e30a31b2bc1e9cafb5329c95d8177a18c9fc"
|
|
1186
1231
|
dependencies = [
|
|
1187
1232
|
"aws-lc-rs",
|
|
1188
1233
|
"bytes",
|
|
@@ -1287,11 +1332,11 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
|
|
1287
1332
|
|
|
1288
1333
|
[[package]]
|
|
1289
1334
|
name = "reqwest"
|
|
1290
|
-
version = "0.13.
|
|
1335
|
+
version = "0.13.5"
|
|
1291
1336
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1292
|
-
checksum = "
|
|
1337
|
+
checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029"
|
|
1293
1338
|
dependencies = [
|
|
1294
|
-
"base64",
|
|
1339
|
+
"base64 0.23.1",
|
|
1295
1340
|
"bytes",
|
|
1296
1341
|
"encoding_rs",
|
|
1297
1342
|
"futures-core",
|
|
@@ -1375,9 +1420,9 @@ dependencies = [
|
|
|
1375
1420
|
|
|
1376
1421
|
[[package]]
|
|
1377
1422
|
name = "rustls"
|
|
1378
|
-
version = "0.23.
|
|
1423
|
+
version = "0.23.45"
|
|
1379
1424
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1380
|
-
checksum = "
|
|
1425
|
+
checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
|
|
1381
1426
|
dependencies = [
|
|
1382
1427
|
"aws-lc-rs",
|
|
1383
1428
|
"once_cell",
|
|
@@ -1472,6 +1517,12 @@ dependencies = [
|
|
|
1472
1517
|
"windows-sys 0.61.2",
|
|
1473
1518
|
]
|
|
1474
1519
|
|
|
1520
|
+
[[package]]
|
|
1521
|
+
name = "scopeguard"
|
|
1522
|
+
version = "1.2.0"
|
|
1523
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1524
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
1525
|
+
|
|
1475
1526
|
[[package]]
|
|
1476
1527
|
name = "sec1"
|
|
1477
1528
|
version = "0.8.1"
|
|
@@ -1630,9 +1681,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
1630
1681
|
|
|
1631
1682
|
[[package]]
|
|
1632
1683
|
name = "smallvec"
|
|
1633
|
-
version = "1.16.
|
|
1684
|
+
version = "1.16.1"
|
|
1634
1685
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1635
|
-
checksum = "
|
|
1686
|
+
checksum = "ba467056f1b547ed52077911161fc86985becbc60e8e1857c8a144dab0def891"
|
|
1636
1687
|
|
|
1637
1688
|
[[package]]
|
|
1638
1689
|
name = "socket2"
|
|
@@ -1699,13 +1750,13 @@ dependencies = [
|
|
|
1699
1750
|
|
|
1700
1751
|
[[package]]
|
|
1701
1752
|
name = "synstructure"
|
|
1702
|
-
version = "0.
|
|
1753
|
+
version = "0.14.0"
|
|
1703
1754
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1704
|
-
checksum = "
|
|
1755
|
+
checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02"
|
|
1705
1756
|
dependencies = [
|
|
1706
1757
|
"proc-macro2",
|
|
1707
1758
|
"quote",
|
|
1708
|
-
"syn
|
|
1759
|
+
"syn 3.0.5",
|
|
1709
1760
|
]
|
|
1710
1761
|
|
|
1711
1762
|
[[package]]
|
|
@@ -1767,18 +1818,9 @@ dependencies = [
|
|
|
1767
1818
|
|
|
1768
1819
|
[[package]]
|
|
1769
1820
|
name = "tinyvec"
|
|
1770
|
-
version = "1.13.
|
|
1821
|
+
version = "1.13.3"
|
|
1771
1822
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1772
|
-
checksum = "
|
|
1773
|
-
dependencies = [
|
|
1774
|
-
"tinyvec_macros",
|
|
1775
|
-
]
|
|
1776
|
-
|
|
1777
|
-
[[package]]
|
|
1778
|
-
name = "tinyvec_macros"
|
|
1779
|
-
version = "0.1.1"
|
|
1780
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1781
|
-
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
1823
|
+
checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
|
|
1782
1824
|
|
|
1783
1825
|
[[package]]
|
|
1784
1826
|
name = "tokio"
|
|
@@ -2190,13 +2232,13 @@ dependencies = [
|
|
|
2190
2232
|
|
|
2191
2233
|
[[package]]
|
|
2192
2234
|
name = "yoke-derive"
|
|
2193
|
-
version = "0.8.
|
|
2235
|
+
version = "0.8.3"
|
|
2194
2236
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2195
|
-
checksum = "
|
|
2237
|
+
checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78"
|
|
2196
2238
|
dependencies = [
|
|
2197
2239
|
"proc-macro2",
|
|
2198
2240
|
"quote",
|
|
2199
|
-
"syn
|
|
2241
|
+
"syn 3.0.5",
|
|
2200
2242
|
"synstructure",
|
|
2201
2243
|
]
|
|
2202
2244
|
|
|
@@ -2211,13 +2253,13 @@ dependencies = [
|
|
|
2211
2253
|
|
|
2212
2254
|
[[package]]
|
|
2213
2255
|
name = "zerofrom-derive"
|
|
2214
|
-
version = "0.1.
|
|
2256
|
+
version = "0.1.8"
|
|
2215
2257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2216
|
-
checksum = "
|
|
2258
|
+
checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a"
|
|
2217
2259
|
dependencies = [
|
|
2218
2260
|
"proc-macro2",
|
|
2219
2261
|
"quote",
|
|
2220
|
-
"syn
|
|
2262
|
+
"syn 3.0.5",
|
|
2221
2263
|
"synstructure",
|
|
2222
2264
|
]
|
|
2223
2265
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "chain-gang"
|
|
3
|
-
version = "0.11.
|
|
3
|
+
version = "0.11.2"
|
|
4
4
|
description = "This is a library that enables monitoring of multiple blockchains (BTC, BCH, BSV)."
|
|
5
5
|
repository = "https://github.com/nchain-innovation/chain-gang"
|
|
6
6
|
homepage = "https://github.com/nchain-innovation/chain-gang"
|
|
@@ -36,6 +36,7 @@ Index for **chain-gang** (Rust library) and **tx-engine** (Python bindings).
|
|
|
36
36
|
| [README-chain-gang.md](README-chain-gang.md) | Crate overview, feature flags, installation |
|
|
37
37
|
| [BIP-32.md](BIP-32.md) | HD wallets — BIP-32/39/44, `HdWallet`, watch-only `xpub`, Rust + Python |
|
|
38
38
|
| [Chronicle.md](Chronicle.md) | Same Chronicle spec; Rust examples use `chain_gang::chronicle` |
|
|
39
|
+
| [Regtest.md](Regtest.md) | **Regtest guide** — running a node, `RpcInterface`, P2P, and the constants |
|
|
39
40
|
| [docs.rs](https://docs.rs/chain-gang) | Generated Rust API (`chain_gang::chronicle`, `Tx::validate_at_height`, etc.) |
|
|
40
41
|
|
|
41
42
|
## Development and releases
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Regtest
|
|
2
|
+
|
|
3
|
+
Regtest is a private chain you run yourself: blocks are mined on demand at minimum
|
|
4
|
+
difficulty, coins are worthless, and nothing leaves your machine. It is the natural
|
|
5
|
+
place to test anything that spends, because the alternative is testnet coins,
|
|
6
|
+
outbound network access, and waiting on a public chain.
|
|
7
|
+
|
|
8
|
+
chain-gang reaches regtest through two independent paths:
|
|
9
|
+
|
|
10
|
+
| | type | what it needs |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| **Chain queries** — balances, UTXOs, broadcast | [`RpcInterface`](https://docs.rs/chain-gang/latest/chain_gang/interface/rpc_interface/struct.RpcInterface.html) | the node's JSON-RPC port, and credentials |
|
|
13
|
+
| **P2P** — messages, headers, blocks | [`Peer`](https://docs.rs/chain-gang/latest/chain_gang/peer/struct.Peer.html) with `Network::BSV_Regtest` | the node's P2P port |
|
|
14
|
+
|
|
15
|
+
`WocInterface` cannot: WhatsOnChain is a public explorer, and a private chain has
|
|
16
|
+
nothing for it to index. Asking it for regtest returns an error rather than
|
|
17
|
+
guessing.
|
|
18
|
+
|
|
19
|
+
## Starting a node
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
docker run -d --name regtest -p 18443:18443 -p 18444:18444 \
|
|
23
|
+
bitcoinsv/bitcoin-sv:latest \
|
|
24
|
+
bitcoind -regtest -server -listen=1 -bind=0.0.0.0:18444 \
|
|
25
|
+
-rpcbind=0.0.0.0 -rpcallowip=0.0.0.0/0 -rpcport=18443 \
|
|
26
|
+
-rpcuser=cguser -rpcpassword=cgpass \
|
|
27
|
+
-minminingtxfee=0.000005 -printtoconsole
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Two of those are easy to get wrong:
|
|
31
|
+
|
|
32
|
+
* **`-minminingtxfee` is mandatory.** Without it `bitcoind` refuses to start, with
|
|
33
|
+
`Mandatory policy parameter is not set`. The container exits and the only trace
|
|
34
|
+
is in `docker logs`.
|
|
35
|
+
* **`-listen=1` is needed for P2P.** RPC on 18443 works without it; a `Peer`
|
|
36
|
+
connection to 18444 will not.
|
|
37
|
+
|
|
38
|
+
Then mine enough blocks for a spendable coinbase — 101, since coinbase outputs
|
|
39
|
+
mature after 100:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
ADDR=$(bitcoin-cli -regtest getnewaddress)
|
|
43
|
+
bitcoin-cli -regtest generatetoaddress 101 "$ADDR"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Chain queries
|
|
47
|
+
|
|
48
|
+
```rust
|
|
49
|
+
use chain_gang::interface::{BlockchainInterface, RpcInterface};
|
|
50
|
+
use chain_gang::network::Network;
|
|
51
|
+
|
|
52
|
+
let node = RpcInterface::new("127.0.0.1:18443", "cguser", "cgpass", Network::BSV_Regtest);
|
|
53
|
+
|
|
54
|
+
node.status().await?; // getblockchaininfo
|
|
55
|
+
let balance = node.get_balance(&address).await?;
|
|
56
|
+
let utxos = node.get_utxo(&address).await?;
|
|
57
|
+
let txid = node.broadcast_tx(&tx).await?; // sendrawtransaction
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A bare `host:port` is treated as `http://`; pass a full URL for `https`. Credentials
|
|
61
|
+
go to whatever host is configured, as HTTP basic auth on every call, so point this
|
|
62
|
+
only at a node you control.
|
|
63
|
+
|
|
64
|
+
### The node must be watching the address
|
|
65
|
+
|
|
66
|
+
`get_balance` and `get_utxo` go through `listunspent`, which reports only what the
|
|
67
|
+
node's own wallet tracks. **An address the node knows nothing about reads as zero,
|
|
68
|
+
with no error** — the node is answering truthfully about a wallet that has never
|
|
69
|
+
heard of it. The symptom is an empty balance from a node that is plainly reachable,
|
|
70
|
+
which looks like a bug in your code.
|
|
71
|
+
|
|
72
|
+
Either ask the node to watch it:
|
|
73
|
+
|
|
74
|
+
```rust
|
|
75
|
+
node.import_address(&address, false).await?; // false: skip the rescan
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
or do the same from the command line:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
bitcoin-cli -regtest importaddress "<address>" "" false
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`rescan` asks the node to walk the chain for the address's history and blocks the
|
|
85
|
+
RPC connection until it finishes. Pass `false` when the address has no history yet —
|
|
86
|
+
which on a fresh chain is always — and `true` when importing an address that has
|
|
87
|
+
already been paid.
|
|
88
|
+
|
|
89
|
+
Nothing in `RpcInterface` imports for you. Doing so would mean the library managing
|
|
90
|
+
the node's wallet and deciding when to rescan, which belongs to whoever runs the
|
|
91
|
+
node.
|
|
92
|
+
|
|
93
|
+
## P2P
|
|
94
|
+
|
|
95
|
+
```rust
|
|
96
|
+
use chain_gang::messages::{Version, NODE_BITCOIN_CASH, PROTOCOL_VERSION};
|
|
97
|
+
use chain_gang::network::Network;
|
|
98
|
+
use chain_gang::peer::{Peer, SVPeerFilter};
|
|
99
|
+
use chain_gang::util::{rx::Observable, secs_since};
|
|
100
|
+
|
|
101
|
+
let version = Version {
|
|
102
|
+
version: PROTOCOL_VERSION,
|
|
103
|
+
services: NODE_BITCOIN_CASH,
|
|
104
|
+
timestamp: secs_since(std::time::UNIX_EPOCH) as i64,
|
|
105
|
+
user_agent: "my-app".to_string(),
|
|
106
|
+
..Default::default()
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
let peer = Peer::connect(ip, 18444, Network::BSV_Regtest, version, SVPeerFilter::new(0));
|
|
110
|
+
peer.connected_event().poll_timeout(Duration::from_secs(15))?;
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
There are no DNS seeds on a private chain, so `Network::BSV_Regtest.seeds()` is
|
|
114
|
+
empty by design: connect to an address you already know.
|
|
115
|
+
|
|
116
|
+
**A node bans a peer that sends a bad message start.** If the magic bytes are wrong
|
|
117
|
+
the first attempt is dropped and every later attempt is refused without being
|
|
118
|
+
looked at, whatever it sends — so a wrong constant looks identical to a network
|
|
119
|
+
problem. Clear it with `bitcoin-cli -regtest clearbanned`, or restart the node,
|
|
120
|
+
before trying again.
|
|
121
|
+
|
|
122
|
+
## What regtest is, in constants
|
|
123
|
+
|
|
124
|
+
| | value | note |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| P2P port | 18444 | RPC is 18443 |
|
|
127
|
+
| Magic bytes | `da b5 bf fa` | inherited from Bitcoin Cash, **not** Bitcoin Core's `fa bf b5 da` |
|
|
128
|
+
| Genesis hash | `0f9188f1…466e2206` | differs from testnet in `bits` and `nonce`: regtest mines at minimum difficulty |
|
|
129
|
+
| Address prefixes | `0x6f` / `0xc4` | the same as testnet |
|
|
130
|
+
| Extended keys | `tpub` / `tprv` | the same as testnet |
|
|
131
|
+
| WIF prefix | `0xef` | the same as testnet |
|
|
132
|
+
| DNS seeds | none | a private chain has nothing to discover |
|
|
133
|
+
| Chronicle activation | block 0 | as for STN, a private chain runs current rules from its first block |
|
|
134
|
+
|
|
135
|
+
Because the address and key prefixes are testnet's, anything you already have on
|
|
136
|
+
disk for testnet — addresses, WIFs, extended keys — works unchanged on regtest.
|
|
137
|
+
|
|
138
|
+
## The tests in this repository
|
|
139
|
+
|
|
140
|
+
`tests/regtest_p2p.rs` drives a real handshake against a node and is `#[ignore]`d,
|
|
141
|
+
because CI has no node to talk to:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
cargo test --test regtest_p2p -- --ignored --test-threads=1
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
It exists because a wrong `magic` value cannot be caught any other way: the magic
|
|
148
|
+
bytes are not part of the genesis hash, so every offline test passes while no node
|
|
149
|
+
will speak to you. That is not hypothetical — `BSV_Regtest` shipped with Bitcoin
|
|
150
|
+
Core's magic until this test was written.
|
|
@@ -57,3 +57,5 @@
|
|
|
57
57
|
* v0.10.0 - `Tx` and `Block` now implement `serde::Serialize`/`Deserialize`, encoding as their raw wire-format byte stream (matching `Serializable::write`/`read`); added a reusable `serde_bytes` helper in `util::serdes`
|
|
58
58
|
* v0.10.1 - crates.io publication: added package metadata (`repository`, `homepage`, `documentation`), a CI job that publishes to crates.io on tagged releases, README/rustdoc improvements (docs.rs readme, working links, MIT license), and full public-API documentation guarded by `#![warn(missing_docs)]`
|
|
59
59
|
* v0.11.0 - **Breaking.** Regtest support: `Network::BSV_Regtest` and a JSON-RPC `RpcInterface` for talking to a local node, verified against a bitcoin-sv regtest node. `Peer::id` is now `PeerId` rather than `snowflake::ProcessUniqueId`; `generate_wif` takes a `Network` instead of its name and returns `Result`, where an unrecognised name used to yield a mainnet key; `decode_base58_checksum`, `ExtendedKey::decode` and `WocInterface` return errors where they used to panic; unconfirmed UTXOs report `UNCONFIRMED_HEIGHT` (-1) through every interface, WhatsOnChain's own `height: 0` being translated on the way in; `Block::validate` enforces the Chronicle activation height it already had; `ChainGangError` no longer discards the message of `ResponseError`, `JSONParseError` and `InvalidOperation`. `serde` and `serde_json` are ordinary dependencies, so `--no-default-features` compiles. Dropped `typenum`, `lazy_static` and `snowflake`; moved `async-mutex` to `async-lock` and `base58` to `bs58`. CI gained clippy, a feature matrix and Python lint gates
|
|
60
|
+
* v0.11.1 - `RpcInterface::import_address` asks the node to watch an address, opt-in because whether to touch the node's wallet is the caller's decision; a JSON-RPC method answering `"result": null`, as `importaddress` does, is now success rather than "returned neither a result nor an error"; documented that balance and UTXO queries see only what the node's wallet tracks, so an unwatched address reads as zero with no error, in both the Rust and Python clients; added [Regtest.md](Regtest.md), a guide to running against a private chain; cleared the rustdoc warnings
|
|
61
|
+
* v0.11.2 - Two robustness fixes. Additive API only, so cargo treats this as a compatible upgrade: `util::read_exact_vec`, `util::bounded_capacity`, `util::MAX_PREALLOC_ELEMENTS` and `script::stack::pop_bigint_checked_minimal` are new, and nothing existing changes shape. Wire-format reads no longer size an allocation from a sender-controlled length prefix: 17 sites across `tx_in`/`tx_out`, `tx`, `block`, `merkle_block`, `filter_add`/`filter_load`, `protoconf`/`createstrm`, `version` and `reject` now grow a buffer as bytes arrive via `util::read_exact_vec`, or cap a speculative reserve with `util::bounded_capacity`, so a 27-byte transaction declaring a 2^48-byte script is an error rather than an allocation-failure `SIGABRT` that a consumer cannot catch. Script evaluation applies minimal *number* encoding only where a stack item is decoded as a number, not to every push: a 33-byte public key or a 20-byte hash ending `0x00` or `0x80` is ordinary data, and rejecting it as `Non-minimal push data` refused roughly 1 in 128 standard P2PKH spends. Minimal-*push* (BIP-62) is unchanged, and minimal-number enforcement now also covers the bigint arithmetic operands it previously missed
|
|
@@ -7,6 +7,17 @@ network -> main/test mapping in sync across both when either changes.
|
|
|
7
7
|
|
|
8
8
|
That includes the unconfirmed-UTXO height, reported as UNCONFIRMED_HEIGHT on
|
|
9
9
|
both sides.
|
|
10
|
+
|
|
11
|
+
The node must be watching the addresses you ask about. Balance and UTXO queries
|
|
12
|
+
go through listunspent, which reports only what the node's own wallet tracks, so
|
|
13
|
+
an address the node knows nothing about reads as zero with no error. On a fresh
|
|
14
|
+
node, import each address once:
|
|
15
|
+
|
|
16
|
+
bitcoin-cli -regtest importaddress "<address>" "" false
|
|
17
|
+
|
|
18
|
+
The false skips the rescan, which is what you want on a chain with no history.
|
|
19
|
+
This client does not import for you: that would mean managing the node's wallet
|
|
20
|
+
and deciding when to rescan, which belongs to whoever runs the node.
|
|
10
21
|
"""
|
|
11
22
|
from typing import Dict, List, Any
|
|
12
23
|
import logging
|
|
@@ -150,7 +161,11 @@ class RPCInterface(BlockchainInterface):
|
|
|
150
161
|
return self._get_history(address)
|
|
151
162
|
|
|
152
163
|
def get_utxo(self, address):
|
|
153
|
-
"""Return ordered list of UTXOs for this address
|
|
164
|
+
"""Return ordered list of UTXOs for this address
|
|
165
|
+
|
|
166
|
+
Empty for an address the node's wallet does not track; see the module
|
|
167
|
+
docstring.
|
|
168
|
+
"""
|
|
154
169
|
unspent_address = self.get_unspent(address)
|
|
155
170
|
block_count = self.get_block_count()
|
|
156
171
|
|
|
@@ -167,7 +182,11 @@ class RPCInterface(BlockchainInterface):
|
|
|
167
182
|
return response
|
|
168
183
|
|
|
169
184
|
def get_balance(self, address, confirmations=6):
|
|
170
|
-
"""Return the confirmed and unconfirmed balance associated with this address
|
|
185
|
+
"""Return the confirmed and unconfirmed balance associated with this address
|
|
186
|
+
|
|
187
|
+
Reads zero for an address the node's wallet does not track; see the
|
|
188
|
+
module docstring.
|
|
189
|
+
"""
|
|
171
190
|
unspent_address = self.get_unspent(address)
|
|
172
191
|
# Convert each amount before summing, so the total does not accumulate
|
|
173
192
|
# the float error of the individual amounts
|