Commit graph

22569 commits

Author SHA1 Message Date
Byron Hambly
49c3ea309e
fix: getnewaddress - don't blind bech32 addresses
fixes #1245
2023-07-19 12:40:22 +02:00
Pablo Greco
cfc10a5dd6
Merge pull request #1232 from delta1/script-assets-test
test: re-enable and fix script assets test
2023-06-05 14:14:27 -03:00
Byron Hambly
5cbd44f1c8
test: re-enable and fix script assets test
Re-enables and fixes the script_assets_test by changing feature_taproot.py to include the genesis block hash when dumping the json tests.

Requires the json file from https://github.com/ElementsProject/qa-assets/pull/1

Co-authored-by: Andrew Poelstra <apoelstra@wpsoftware.net>
2023-06-05 16:43:06 +02:00
Andrew Poelstra
ccffeba3b2
testmempoolaccept: feed genesis hash into sighash computation 2023-05-04 20:30:06 +00:00
Andrea Bonel
f104e4bcf8 Elements-qt: Show correct default asset name 2023-04-19 15:32:48 -03:00
Andrea Bonel
8d844c79e3 Fix dynamic_parameters root in getblockheader rpc 2023-04-03 18:02:24 -03:00
Byron Hambly
6b826d5004
Merge pull request #1225 from psgreco/master-fix-assert-trim-rpc
RPC: Avoid assert by keeping a flag to identify trimmed dynafed blocks
2023-03-17 16:09:39 +02:00
Andrea Bonel
7a98c29c6e
Elements-qt: Use available balance from the currently selected asset 2023-03-17 13:44:56 +02:00
Pablo Greco
8f16e00ee2 Avoid reloading the block before calling blockheaderToJSON, the loaded block is incomplete and makes it crash 2023-03-16 09:21:50 -03:00
Pablo Greco
3c8d3a2a7d RPC: Avoid assert by keeping a flag to identify trimmed dynafed blocks 2023-03-16 09:21:49 -03:00
Andrea Bonel
cfb7565520 Elements-qt: Avoid mixing assets when using all the available balance 2023-03-15 09:37:55 -03:00
Jeff Frontz
1b0424530a Remove erroneous PAK-checking info from testproposedblock help 2023-03-05 09:05:38 -03:00
Pablo Greco
e7fea1d50b Fix underflow when blocks are ahead of headers 2023-02-21 06:22:25 -03:00
Pablo Greco
4cbe3d4322 Allow starting regtest networks with p2wsh peg-in addresses 2023-02-07 18:16:43 -03:00
Pablo Greco
07a45ba058 Avoid regenerating the full parameters when dynafed is always active 2023-02-07 18:16:43 -03:00
Pablo Greco
ae4a990985 Obscure mainchain rpc fields in the logs, just like the local ones 2023-01-30 16:49:14 -03:00
Philippe McLean
0936031b9a Correct help for getsidechaininfo RPC
- described order of current_fedpegscripts array was incorrect
2023-01-26 17:54:48 -08:00
Glenn Willen
15dbe64100 Remove stray comment 2023-01-25 09:31:03 -08:00
Glenn Willen
e62215628c Update documentation 2023-01-24 22:34:37 -08:00
Glenn Willen
e8475e7edd Fix stuck IBD when discarding unwanted headers from peers.
When receiving unwanted headers from a peer, first check whether we have
recent "best known block" state for that peer. If not, accept one batch
of headers to refresh it. Otherwise, we can become stuck in a state where
we need blocks, but we don't know which peers have those blocks available.
This especially happens during startup, when we don't have this information
for any peers until we start processing header messages.
2023-01-24 22:05:36 -08:00
Glenn Willen
8cad8cda44 Further fixes from code review 2023-01-04 16:33:35 -08:00
Glenn Willen
b9b7f6543a Apply suggestions from code review
Co-authored-by: Byron Hambly <byron@hambly.dev>
2023-01-04 15:32:04 -08:00
Glenn Willen
29345e9e12 pgreco's startup crash fix 2022-12-12 09:53:44 -08:00
Glenn Willen
fba37b74b4 Move enough-headers check up, rejecting excess headers when received. 2022-12-12 09:53:44 -08:00
Glenn Willen
394e59d38d Politely and safely refuse getheaders requests for headers we have trimmed. 2022-12-12 09:53:44 -08:00
Glenn Willen
763d29895f Fix deserialization issues in certain functional tests 2022-12-12 09:53:44 -08:00
Glenn Willen
7e6fe4a5ba Don't let header syncing get too far ahead of block syncing 2022-12-12 09:53:44 -08:00
Glenn Willen
f5c79950a1 When people ask us for headers we do not have (over REST or RPC), do something reasonable. 2022-12-12 09:53:42 -08:00
Glenn Willen
4f0da3ce3d Trim headers when flushing to disk, and reduce flush interval from 1h to 5min. 2022-12-12 09:46:07 -08:00
Glenn Willen
eff6be337f Trim headers when loading block index from disk. 2022-12-12 09:46:07 -08:00
Glenn Willen
7c555578b7 Add a flag for header-trimming; clear P2P network feature bits when enabled. 2022-12-12 09:46:07 -08:00
Glenn Willen
68eb0864cb Refactor CBlockIndex to make proof and dynafed fields optional. 2022-12-12 09:46:04 -08:00
Pablo Greco
2c7335fecc Remove duplicated code from merge 2022-11-25 12:54:09 -03:00
Steven Roose
30f02624c7
Have testproposedblock return RPC_VERIFY_ALREADY_IN_CHAIN
Instead of RPC_VERIFY_ERROR when the block is already in the chain.
2022-11-24 14:08:51 +00:00
James Dorfman
5c82e351a9
Merge pull request #1194 from andreabonel/add_back_missing_field_in_getblock
Add missing field 'signblock_challenge' back to getblock
2022-11-23 11:23:54 -05:00
Andrew Poelstra
1339dae913
Merge ElementsProject/elements#1167: Add native support for liquidtestnet
c6e074e25b liquidtestnet: Fix chain name in windows installer (Pablo Greco)
d0f391cfdb liquidtestnet: Add style for Elements-Qt (Pablo Greco)
48ddfbf8d7 liquidtestnet: Add fixed seeds (Pablo Greco)
3b34c8e927 liquidtestnet: Add seed nodes (Pablo Greco)
0d1964766f liquidtestnet: Accept multi OP_RETURN (Pablo Greco)
f955cb3d9c liquidtestnet: Add chainparams (Pablo Greco)
0fa20d006d CCustomParams: Move some defaults away from UpdateFromArgs (Pablo Greco)
e9df51121f Add text version of the fixed seeds for liquidv1 and liquidtestnet (Pablo Greco)

Pull request description:

  Currently using liquidtestnet requires a big config file, which is error-prone and uncomfortable for users, this MR adds support for just using `-chain=liquidtestnet`.

  There are a few things that need to be discussed/addressed

  1. Main port (currently set to 18891 because that's the one used originally, and the one that's configured in `liquidtestnet.com`)
  1. RPC and extra ports, I just chose some non-overlapping ports that are "close" to the ones in the other liquid/elements networks.
  1. Icon color, I just used something different than `liquidv1` and `elementsregtest`, suggestions accepted 😉
  1. `liquid-testnet.blockstream.com` is still using port 18892, it will be changed to 18891 soon.
  1. both seeds are just CNAME dns records at the moment, they should be changed to real seed nodes (no changes in code required, but important for review)

ACKs for top commit:
  delta1:
    ACK c6e074e
  wintercooled:
    ACK c6e074e25b
  apoelstra:
    utACK c6e074e25b

Tree-SHA512: 48c17b8b90ba5a33ae987935ffb368737167f6ca5ae772f6dd8c0c5e7efb39355d81e2677cd02d3e22984f2592fdd67caaf838003902b3c827f6ade01f18a040
2022-11-23 15:31:39 +00:00
Andrea Bonel
5d496b81f7 Add missing field 'signblock_challenge' back to getblock 2022-11-22 18:12:41 -03:00
Pablo Greco
58b5fa0dbf
Merge pull request #1186 from achow101/createfunded-explicit-value
Add include_explicit to walletcreatefundedpsbt
2022-11-21 17:15:58 -03:00
Andrew Chow
9dbf0b6f55 wallet, rpc: Add include_explicit to walletcreatefundedpsbt 2022-10-18 16:52:31 -04:00
Andrew Chow
a584133bd6 wallet: Add include_explicit to FillPSBT 2022-10-18 16:52:31 -04:00
Andrew Chow
462c873639 blindpsbt: Expose CreateBlind{Asset,Value}Proof
Make these two functions available to external callers.
CreateBlindValueProof is a wrapper around the static function to avoid
requiring callers to parse things into secp256k1 objects.
2022-10-18 16:52:31 -04:00
Pablo Greco
816585db1a
Merge pull request #1182 from jgriffiths/fix_blind_reissuance_amount_proof_output
rpc: decodepsbt: fix check for blind_reissuance_amount_proof output
2022-10-18 09:32:07 -03:00
Pablo Greco
eca4cd9259
Merge pull request #1169 from andreabonel/fix_windows_elements_company
Fix company for Windows exes
2022-10-15 18:09:44 -03:00
Glenn Willen
6b4228e3a5 Preserve blinding key when parsing taproot address. 2022-10-11 15:30:04 -07:00
Pablo Greco
285a18dbe9
Merge pull request #1173 from andreabonel/fix_issue_1120
Fix location for default cookie path
2022-10-05 22:57:29 -03:00
Jon Griffiths
e2348dadf3
PSET: VerifyBlindValueProof: fail verification if the value or asset commitment is missing
It is arguable whether attempting a value proof without an asset
commitment should be treated as incomplete or incorrect blinding. Since
the asset commitment is required to produce the value proof in the first
place, failing to provide it in the source PSET and thus at this call
site is treated as an error.

This does not change the existing behaviour since a missing asset
or value commitment in this function would already cause it to fail.

Future work on the blinding iterface should likely return the blinding
state directly from the verify calls and remove the duplicated mapping of
blinding error codes to transaction blinding error codes, instead of the
verify functions returning just true/false.
2022-10-06 09:12:02 +13:00
Jon Griffiths
5895fb10bb
rpc: decodepsbt: fix check for blind_reissuance_amount_proof output 2022-10-05 23:38:54 +13:00
Andrea Bonel
86db1b70e9 Fix location for default cookie path 2022-09-27 18:56:20 -03:00
Andrew Poelstra
e5e3ec2700
wallet: account for issuances during coin selection
Prior to coin selection we need to indicate that the issuances will take
extra space, otherwise we may fail to select enough coins to cover our
fees, triggering the new "fee needed exceeds fees available" assertion.
2022-09-22 13:20:29 +00:00
Andrew Poelstra
79fd90f064
wallet: extend fix to "dropped change is the last blinded output" case 2022-09-20 21:17:47 +00:00