Ivan Paljak
c21dabb824
Expose serialized data for transaction signatures
2020-10-08 01:21:10 +02:00
Andrew Poelstra
c94295c3a9
Revert "Added hash Preimages to psbt"
2020-09-11 11:31:10 +00:00
Andrew Poelstra
3f33bd74e4
Merge pull request #465 from sanket1729/psbt_updates
...
Added hash Preimages to psbt
2020-09-11 11:30:27 +00:00
Andrew Poelstra
49e97cca65
Merge pull request #387 from pandoracore/builder-p2wildcard
...
Refactoring script generating functions into a single place
2020-09-11 11:29:09 +00:00
sanket1729
c1eafff9ef
Added Sighash calculation for psbt
2020-09-11 01:01:33 -05:00
Andrew Poelstra
bcf2c5981d
Merge pull request #475 from apoelstra/2020-09--0.24.0
...
Increase version to 0.24
2020-09-10 19:58:03 +00:00
Andrew Poelstra
440005b16e
Merge pull request #464 from TheBlueMatt/2020-08-pow-clarification
...
Set Params::pow_limit to an attainable value not a theoretical one
2020-09-10 16:46:40 +00:00
Andrew Poelstra
05f3451b10
un-deperate contracthash during testing
...
Avoids a rust test runner bug, see https://github.com/rust-lang/rust/issues/47238
2020-09-10 16:40:31 +00:00
Matt Corallo
cf45a61070
Set Params::pow_limit to an attainable value not a theoretical one
...
`cloudhead` on IRC was asking how to properly use
`BlockHeader::validate_pow()` on genesis (or similar) when the
pow_limit field isn't expressible as a compact target (and, thus,
does not actually represent the PoW limit/genesis target). We
swap it for the actual PoW limit by truncating the way a compact
encoding round-trip would.
Note that, in Bitcoin Core, the original value is only ever used
once in its original form:
```
if (bnNew > bnPowLimit) // Note: bnPowLimit is params.powLimit
bnNew = bnPowLimit;
return bnNew.GetCompact();
```
Thus, even if Core adopted our change, as long as there exist no
256-bit integer x which satisfies
`x <= powLimit && x > encoding_roundtrip_truncated(powLimit)` and
`enoding_roundtrip_truncated(x) != powLimit`, the change would have
no impact on consensus.
It is trivial to show that there are no values which are between
the new value
(0x00000000ffff0000000000000000000000000000000000000000000000000000)
and the original value
(0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
which can be encoded in compact form, but it is also critically, no
such values will encode to a compact form of anything different than
the new value as the encoding always truncates the low bits, never
rounding up.
2020-09-10 12:03:51 -04:00
Andrew Poelstra
4e737f708a
Merge pull request #461 from TheBlueMatt/2020-08-mut-sighash
...
Expose the witnesses of the tx being hashed in SigHashCache
2020-09-10 13:04:51 +00:00
Dr Maxim Orlovsky
38a412c4d5
Fixing review comments for script generators refactoring
2020-09-10 14:44:44 +02:00
Dr Maxim Orlovsky
e33cdcca14
OP_RETURN script initializer
2020-09-10 12:09:04 +02:00
Dr Maxim Orlovsky
9143fd3888
All script generation functionality moved to standalone methods in Script
2020-09-10 12:09:04 +02:00
sanket1729
e97dda0ffe
Add tests for psbt serde
2020-09-09 12:53:09 -05:00
Andrew Poelstra
addb54ffc7
Merge pull request #458 from braydonf/version
...
Transaction and header version is signed int
2020-09-09 17:06:31 +00:00
Andrew Poelstra
5fd91ca2d8
Merge pull request #451 from stevenroose/deprecate-contracthash
...
Deprecate the util::contracthash module
2020-09-09 17:02:19 +00:00
Andrew Poelstra
c8633b5bce
Merge pull request #436 from LNP-BP/feat-u256u8
...
Big integers (Uint*) from byte slice array with `from_be_bytes`
2020-09-09 16:42:32 +00:00
Andrew Poelstra
45da3add10
Merge pull request #428 from stevenroose/no-witness-uncompressed
...
Don't allow uncompressed pks in witness addresses
2020-09-09 16:37:06 +00:00
Elichai Turkel
a44ba2d878
Merge pull request #397 from stevenroose/script-iter
...
Improve the Instructions iterator for scripts
2020-09-09 19:06:05 +03:00
Dr. Maxim Orlovsky
42bf893d8b
Update big int from_be_bytes with iterators
...
Co-authored-by: Sebastian <geisler.sebastian@googlemail.com>
2020-09-03 16:42:00 +02:00
sanket1729
c5204c001f
Added Hash Preimages to psbt
...
Added hash preimages to psbt as per updated bip174
2020-08-31 17:22:40 -05:00
Alexis Sellier
5017b33326
Add `Clone` instance to `RawNetworkMessage`
2020-08-31 19:21:29 +02:00
Matt Corallo
3d80a0c962
Expose the witnesses of the tx being hashed in SigHashCache
...
See docuemntation of the new method for more, but this allows
certain use patterns which were broken with the introduction of
SigHashCache.
2020-08-26 11:18:14 -04:00
Braydon Fuller
945db009b2
Add test for transaction and block version serialization
2020-08-19 14:12:03 -07:00
Braydon Fuller
e9f1f11c2c
Transaction and header version is signed int
2020-08-17 10:28:51 -07:00
Dr Maxim Orlovsky
2fd353d5ab
Big integers (Uint*) from byte slice array with `from_be_bytes`
2020-08-09 18:00:00 +02:00
Elichai Turkel
e8bcde4d38
Merge pull request #403 from LNP-BP/fix-macro-ns
...
Hygiene/single code style for all existing macros
2020-08-09 18:16:36 +03:00
Steven Roose
c03d2d59c6
Merge pull request #445 from elichai/2020-07-divmod
...
Use the remainder from div_rem instead of recomputing it
2020-08-09 16:59:39 +02:00
Roman Zeyde
0a25d87f2e
Remove empty code block
2020-08-07 14:48:46 +02:00
Steven Roose
1ffdce99ed
Deprecate the util::contracthash module
2020-08-06 12:24:08 +02:00
Jake Rawsthorne
e47fcae435
feefilter message
2020-07-30 17:25:21 +01:00
Elichai Turkel
478e091af6
Merge pull request #443 from sgeisler/2020-06-bip32-derive-more
...
Derive more traits to use for bip32 Types
2020-07-23 11:24:50 +03:00
Elichai Turkel
c20d356d7e
Use the remainder from div_rem instead of recomputing it
2020-07-22 12:39:32 +03:00
Dr Maxim Orlovsky
257ca8e504
Using :: for std namespaces in macro
2020-07-21 22:28:05 +02:00
Dr Maxim Orlovsky
f6aa8853a0
Namespace hygiene for macros.rs
2020-07-21 22:28:05 +02:00
Dr Maxim Orlovsky
3a5e8d8504
Namespace hygiene for internal macros
2020-07-21 22:25:59 +02:00
Dr Maxim Orlovsky
7588b211ff
Adding Rem op (%) to Uint128 & Uint256 types
2020-07-21 14:37:21 +02:00
Sebastian Geisler
a3bb03eeb9
Derive more traits to use DerivationPath in rust-miniscript
2020-07-20 16:52:18 +02:00
Alexis Sellier
9cb5d2e711
Link type in rustdoc
2020-07-09 21:17:02 +02:00
Alexis Sellier
e8cecfe1d3
Add `BlockHeader::u256_from_compact_target` function
...
This implements the counterparty to BlockHeader::compact_target_from_u256,
to convert a compact u32 to a Uint256.
2020-07-09 21:17:02 +02:00
Tao Wei
ed76e0823b
Remove duplicate code
...
Duplicated with L38
2020-06-03 17:17:13 +08:00
Elichai Turkel
f4e26caa94
Merge pull request #415 from shesek/merkleblock-txids
...
Allow to construct MerkleBlock using the header and txids
2020-05-24 16:32:17 +03:00
Steven Roose
ed9bf41ff5
Don't allow uncompressed pks in witness addresses
2020-05-23 23:20:46 +01:00
Steven Roose
59b5a73a55
Fix typo and minor formatting in address::Error
2020-05-23 23:20:19 +01:00
Andrew Poelstra
7efde3ae47
Merge pull request #419 from elichai/2020-03-description
...
Deprecate Error::description
2020-05-23 17:26:38 +00:00
Elichai Turkel
1c88be4df5
Merge pull request #422 from rust-bitcoin/2020-04-remove-alloc
...
Remove some needless allocations
2020-05-19 13:20:34 +03:00
Elichai Turkel
af31017eb1
Remove the cursor overhead, write is implemented on vec these days
2020-05-19 12:57:39 +03:00
Andrew Poelstra
c44bad87b2
Merge pull request #424 from jrawsthorne/wtxid-inv
...
Fix: Change WitnessTransaction inv type to use txid
2020-05-14 13:51:16 +00:00
Steven Roose
a9173d61d3
Merge pull request #375 from canndrew/fix-serde-struct-macros
...
Fix serde struct macros deserialization impls
2020-04-19 19:56:27 +01:00
Jake Rawsthorne
81c061a68c
Change WitnessTransaction inv type to use txid
2020-04-14 14:11:44 +01:00