Commit graph

13713 commits

Author SHA1 Message Date
Glenn Willen
8a73f5d242 When decoding or signing a PSBT, check blinded values.
When we decode or sign a PSBT given to us via RPC, first check that, if
it contains blinded output values, they verifiably match the unblinded
output values contained in the original transaction proposal. Otherwise fail.
2020-10-05 02:21:25 -07:00
Glenn Willen
3386cae45b Make error messages distinct at each failure location. 2020-07-24 09:09:01 -07:00
Glenn Willen
a4c279e29a Fix logic issues with randomization of outputs in [re]issueasset_base; minor refactoring. 2020-07-15 01:39:15 -07:00
Steven Roose
f0d97cdf70
Merge #861: Make issuance fail for invalid addresses
425691623 Add test to make sure issuances to wrong addresses fail (Steven Roose)
1b8bf85d8 Make issuance fail for invalid addresses (Steven Roose)

Pull request description:

  Fixes https://github.com/ElementsProject/elements/issues/853.

Tree-SHA512: fd4e8dbede4c08a52c081abd57d2609ee7057b952b6de60ddc296574400f7488dd5ec33ac4874211cd029b8902a64741e52f1ed40b4a1e565274bacfd67e5075
2020-04-16 22:53:23 +01:00
Steven Roose
18fadbafcc
Merge #863: Fix HasValidFee potential overflow
98e42a0db Fix HasValidFee potential overflow (Steven Roose)

Pull request description:

  Dmitry pointed out this potential overflow. They can't really happen
  because of the `CheckTransaction` check on explicit amounts that
  happens earlier in the verification chain. But it's a good idea to
  add the check here as well so that a potential relaxing of other rules
  cannot accidentally introduce an overflow risk.

Tree-SHA512: 0c6abb7719d4cf84596da5cb31e700bee53d26d6ffc6da0ba8f1300b3357ca3d29fb46e2754d182e64cb5794fd58fa1efed5ebf9c1bd58d08e2fb7841725ca66
2020-04-16 17:51:43 +01:00
Steven Roose
98e42a0db1
Fix HasValidFee potential overflow
Dmitry pointed out this potential overflow. They can't really happen
because of the `CheckTransaction` check on explicit amounts that
happens earlier in the verification chain. But it's a good idea to
add the check here as well so that a potential relaxing of other rules
cannot accidentally introduce an overflow risk.
2020-04-14 20:58:16 +01:00
Steven Roose
1b8bf85d8b
Make issuance fail for invalid addresses
Without his change, invalid addresses are converted into fee outputs.
2020-04-13 15:20:27 +01:00
Allen Piscitello
45fb119783 Changing Elements Icon to just the graphic without text, fixing issue with gitian builds on icon, removing color change based on testnet for Elements, and compatible svg with build script. 2020-04-10 12:50:22 -05:00
Steven Roose
1427dfd6e7
Merge #855: Remove another mention of Liquid-Qt
607cfc3df Remove another mention of Liquid-Qt (Steven Roose)

Pull request description:

  This should be the last mention of `#if LIQUID` and `Liquid-Qt` that my grep can find.

Tree-SHA512: 75c3675c075787de076fbb3f191b779e9db4afee872aaef229f03eb419ec1fdc0393b41728cf8e3baf5730271f2e76b0fab9000c37a4932bbc439cd7725849ec
2020-04-08 07:15:46 +01:00
Steven Roose
607cfc3df7
Remove another mention of Liquid-Qt 2020-04-07 23:31:55 +01:00
Steven Roose
9f10f78d28
Change the logo file from Liquid to Elements 2020-04-07 20:37:10 +01:00
Philippe McLean
5e3019570f
Add parameter for chain name in initial download string 2020-04-06 17:05:41 +01:00
Steven Roose
f5aa08f530
Replace some Bitcoin mentions with Elements 2020-04-02 17:42:51 +01:00
Steven Roose
51f62dcbbf
Merge #846: [RFC] Remove GetNumIssuance from BlindTransaction assert
34ef25072 Move GetNumIssuances to issuance.cpp (Steven Roose)
f9925853c Remove the GetNumIssuances in the assertion (Steven Roose)

Pull request description:

  This is in response to @dgpv 's https://github.com/ElementsProject/elements/issues/842.

  I'm not 100% confident this is correct, but it seems so. It also passed all tests on my machine.

Tree-SHA512: 65206ac5e464a222b379043ca7943e9764382d25db6afc3ade89a1c637404c9f902d9ac21e1671722f1a29592a135b69c2c9164932958929d6a6588a12a14ac2
2020-04-01 16:46:32 +01:00
Steven Roose
34ef250721
Move GetNumIssuances to issuance.cpp 2020-03-31 12:28:34 +01:00
Steven Roose
f9925853c5
Remove the GetNumIssuances in the assertion 2020-03-31 12:28:15 +01:00
Steven Roose
8aab8a24c8
Optimize size estimation in FundTransaction 2020-03-30 23:53:56 +01:00
Steven Roose
6939a7248f
Support fee estimation for fees lower than 1 sat/byte 2020-03-30 21:28:26 +01:00
Steven Roose
3c029f42bd
Merge #840: Remove the min(max( construction for the ct_exponent argument
edfa40eb6 Remove the min(max( construction for the ct_exponent argument (Steven Roose)

Pull request description:

  As per @dgpv's suggestion here: https://github.com/ElementsProject/elements/pull/834#discussion_r396333202

  @dgpv could you review?

Tree-SHA512: 6c91a0a86a593f22ff42fb617aa96aeb97e2e5225e2b5b6980aa470f45ee613dab53de49dbbae20aecf7a4bf21cc005839be770917d55cfb2c9afd821c2d0231
2020-03-25 14:39:12 +00:00
Steven Roose
edfa40eb69
Remove the min(max( construction for the ct_exponent argument
We removed the similar construction for ct_bits in an earlier commit.
The construction is to keep the value between -1 and 18. This kind of
means that a user that inputs a value outside that range will not get an
error, but will use the value on the edge of the range instead.

It's probably better to return an error (generated by secp256k1) in the
case of invalid input.
2020-03-24 14:15:15 +00:00
Steven Roose
ac9966f655
Index the genesis block with txindex 2020-03-23 18:02:01 +00:00
Steven Roose
95602ec21f
Merge #834: Switch default bits of hiding to 52
c780a5186 nit: Comment in blind_tests.cpp was wrong (Steven Roose)
e87b39040 Some readability improvements in blind.cpp (Steven Roose)
26e5490e8 Switch default bits of hiding to 52 (Gregory Sanders)

Pull request description:

  Replaces https://github.com/ElementsProject/elements/pull/793 and is basically that MR but rebased. (I can't rebase on Greg's branch.)

Tree-SHA512: 2c321d7f50d1c16f73e9eafc905b3a21a1aa7a4c44a2da39b1adda7f7c12d74c0f49379c7995afe605b5c07410e8e2f0e3468826e4d246c91c8a1c2c8a03e5dc
2020-03-17 17:40:05 +00:00
Steven Roose
71d00ba8df
Merge #835: Reduce mintxfee to 0.1 sat/vbyte and fallback fee to 2 sat/vb
bfb77ad44 Reduce mintxfee to 0.1 sat/vbyte and fallback fee to 2 sat/vb (Steven Roose)

Pull request description:

  This follows the reduction of the `minrelaytxfee` in the previous release to the same value. Using this value, the wallet will be able to make transactions with a 0.1 sat/vbyte fee by default.

Tree-SHA512: a8a977e48abdb103f4514cfe92014be4e7d720d7d1626c4648d021f0cdad55ff839d0bb146158186676f4d72515b7b6112140b041de2d86f765c8f443e567560
2020-03-17 17:35:24 +00:00
Steven Roose
c780a51864
nit: Comment in blind_tests.cpp was wrong 2020-03-17 17:32:41 +00:00
Steven Roose
f6748b39a6
Merge #795: Remove outdated information about peg-in address creation pre-HD
e2a5d8adf Remove outdated information about peg-in address creation pre-HD (Gregory Sanders)

Pull request description:

  resolves https://github.com/ElementsProject/elements/issues/794

Tree-SHA512: e7d94779f9cc7a41b1300c977b4f6dc125cb7b00abdf85b77f99fdeaeabe0ca463105aaaeb56ba8ad2f6cd799e0d813d8f84136e307d240a9c04251aacb5a4ba
2020-03-17 16:08:49 +00:00
Steven Roose
ad27fddd1f
Merge #796: Trivial: fix typo in error message when mainchain daemon is unavailable
5489e602f Trivial: fix typo in error message when mainchain daemon is unavailable (Philippe McLean)

Pull request description:

Tree-SHA512: 84c00897122e67305f6147266eca92d9794662bb386fc957a2dbe92ac044db781993fe65a8f8b5d69e0aba87d40184678e535c1364210fd8c0f729b56675e731
2020-03-17 16:07:40 +00:00
Steven Roose
bfb77ad44d
Reduce mintxfee to 0.1 sat/vbyte and fallback fee to 2 sat/vb 2020-03-17 12:47:03 +00:00
Steven Roose
e87b390409
Some readability improvements in blind.cpp 2020-03-16 20:55:42 +00:00
Gregory Sanders
26e5490e83
Switch default bits of hiding to 52 2020-03-16 20:55:37 +00:00
Gregory Sanders
a7b41e1f7e initpegoutwallet: check for hardened derivation steps early 2020-03-03 09:52:57 -05:00
Gregory Sanders
c0e0e0a9d5
Merge #818: Place the mainchain RPC warmup message in a better place
c5cb71484 Place the mainchain RPC warmup message in a better place (Steven Roose)

Pull request description:

  Now it also shows with `-validatepegin=0`.

Tree-SHA512: 7e04ab1b5b853fc6896245cb735e1fbfeb2c94950afdf4e2a40ad1c1d59ed06f578c1f491686caa88fa0432a02078ad4c04f338500b34812503e06570e988d52
2020-02-26 10:07:21 -05:00
Gregory Sanders
171540429f
Merge #819: Include deque to fix build
08b41e65d Include deque to fix build (Steven Roose)

Pull request description:

  Upstream: https://github.com/bitcoin/bitcoin/pull/17249/files

Tree-SHA512: ab0151356814e5bcaa85d16d6de16397bf1a10d12b43b28cfb09d682ca53c08243fbff53175753036fc56a7c4fbccbb0ea11437dd600c388ef1489cf0bb51258
2020-02-26 10:04:09 -05:00
Steven Roose
a2fa6ba736
Merge #825: Create witness outputs for (re)issueasset RPC
91583b6e0 Create witness outputs for (re)issueasset RPC (Gregory Sanders)

Pull request description:

  Band aid for https://github.com/ElementsProject/elements/issues/824

Tree-SHA512: 275056e075796513527382ab2c8164433267839c709d28fc197a250a98f6e1096761ff6ec9840723e7095f4027ca2fcdfa18990ed426c4e5d091efe7bc698253
2020-02-24 15:46:56 +00:00
Gregory Sanders
91583b6e0a Create witness outputs for (re)issueasset RPC 2020-02-24 09:32:21 -05:00
Steven Roose
08b41e65db
Include deque to fix build 2020-02-18 15:34:23 +00:00
Steven Roose
c5cb714847
Place the mainchain RPC warmup message in a better place 2020-02-18 15:15:52 +00:00
Glenn Willen
fc841c8047 Fix claimpegin and createrawpegin support for multiwallet.
Fix multiple issues with claimpegin and createrawpegin support for
multiple loaded wallets:

- Failure to call EnsureWalletIsAvailable would cause a crash when multiple
  wallets were loaded, but one was not specified in the RPC call.
- Failure to propagate the request URL from claimpegin when making an
  internal call to another RPC would result in failure when multiple
  wallets were loaded, by failing to specify one for that call.

Add a regression test to the feature_fedpeg.py test: at a critical point,
create a second wallet on the sidechaind, and set up the RPC client to
use the first one, to check that it still works correctly.
2020-02-06 23:08:56 -08:00
Steven Roose
719662d3f0
Make elements-cli also use DEFAULT chain by default 2020-01-30 17:57:45 +00:00
Steven Roose
7a5a412a18
Remove unused ArgsManager::GetUnrecognizedSections 2020-01-30 17:29:42 +00:00
Steven Roose
02b3cf6aee
Some Elements/Liquid fixes for Qt GUI 2020-01-30 17:29:41 +00:00
Steven Roose
1bdda5e0a9
Add DEFAULT chain and set to liquidv1
This fixes f.e. that when arguments are set in CLI or the config file
without a network attached (`port` instead of `liquidv1.port`), they
will now be assigned to the liquidv1 instead of Bitcoin mainnet.
2020-01-30 17:29:39 +00:00
Gregory Sanders
76fbb4bad5 getwalletpakinfo: Use offline counter when reporting lookahead 2020-01-13 09:29:50 -05:00
Gregory Sanders
7754cd3848
Merge #797: Fix VerifyScript calls in fuzz/script_flags
ee068ef07 Fix VerifyScript calls in fuzz/script_flags (Gregory Sanders)

Pull request description:

  Only is compiled with clang/fuzzer setups I suppose.

Tree-SHA512: 3e4b7a1fc96a684cb1b56565830f9f343a23a77677ddde3b18c86cc18d745bbc98c69bdefe985a0f29b3002f05bfc956d2b2b9b6574a4b48615a89dd70f6e468
2020-01-13 09:11:07 -05:00
Steven Roose
5196b881af
Add current_params_root key to getblockchaininfo 2019-12-17 16:00:23 +01:00
Gregory Sanders
ee068ef075 Fix VerifyScript calls in fuzz/script_flags 2019-12-05 10:18:47 -05:00
Philippe McLean
5489e602ff Trivial: fix typo in error message when mainchain daemon is unavailable 2019-12-04 18:22:09 -08:00
Andrew Chow
1ce74e07f3 Be able to fund transactions with peg-ins 2019-12-04 11:36:28 -05:00
Andrew Chow
c25874672b allow fundtx rpcs to work with external inputs 2019-12-04 11:29:33 -05:00
Andrew Chow
9486cdf549 Give a better error when tx size estimation fails 2019-12-04 11:28:02 -05:00
Andrew Chow
8258aaa733 Allow Coin Selection be able to take external inputs 2019-12-04 11:28:00 -05:00