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 64 bit arithmetic op codes in the Script interpreter #48

Closed
wants to merge 2,985 commits into from

Conversation

Christewart
Copy link

This PRs implements signed integer 64 bit arithmetic in the Script interpreter.

It corresponds to this PR on the bitcoin core repo and this delving bitcoin discussion: bitcoin#29221

It corresponds to this BIP pull req: bitcoin/bips#1538

This implementation purposefully avoids using CScriptNum, if you would like to see what a CScriptNum implementation looks like, please see this branch: https://github.com/Christewart/bitcoin/tree/64bit-arith-cscriptnum

If you would like to see usage of these op codes, please see my OP_INOUT_AMOUNT implementation and delving bitcoin discussion: https://github.com/Christewart/bitcoin/tree/op-inout-amount

kristapsk and others added 30 commits January 31, 2024 21:20
… transactions

b298242 test: sqlite, add coverage for dangling to-be-reverted db txns (furszy)
fc0e747 sqlite: guard against dangling to-be-reverted db transactions (furszy)
472d2ca sqlite: introduce HasActiveTxn method (furszy)
dca874e sqlite: add ability to interrupt statements (furszy)
fdf9f66 test: wallet db, exercise deadlock after write failure (furszy)

Pull request description:

  Discovered while was reviewing bitcoin#29112, specifically bitcoin#29112 (review).

  If the db handler that initiated the database transaction is destroyed,
  the ongoing transaction cannot be left dangling when the db txn fails
  to abort. It must be forcefully reverted; otherwise, any subsequent
  db handler executing a write operation will dump the dangling,
  to-be-reverted transaction data to disk.

  This not only breaks the isolation property but also results in the
  improper storage of incomplete information on disk, impacting
  the wallet consistency.

  This PR fixes the issue by resetting the db connection, automatically
  rolling back the transaction (per https://www.sqlite.org/c3ref/close.html)
  when the handler object is being destroyed and the txn abortion failed.

  Testing Notes
  Can verify the failure by reverting the fix e5217fe and running the test.
  It will fail without e5217fe and pass with it.

ACKs for top commit:
  achow101:
    ACK b298242
  ryanofsky:
    Code review ACK b298242. Just fix for exec result codes and comment update since last review.

Tree-SHA512: 44ba0323ab21440e79e9d7791bc1c56a8873c8bd3e8f6a85641b91576e1293011fa8032d8ae5b0580f3fb7a949356f7b9676693d7ceffa617aaad9f6569993eb
0bef104 net: enable v2transport by default (Pieter Wuille)

Pull request description:

  This enables BIP324's v2 transport by default (see bitcoin#27634):
  * Inbound connections will auto-sense whether v1 or v2 is in use.
  * Automatic outbound connections will use v2 if `NODE_P2P_V2` was set in addr gossip, but retry with v1 if met with immediate failure.
  * Manual outbound connections will default to v2, but retry with v1 if met with immediate failure.

  It remains possible to run with `-v2transport=0` to disable all of these, and make all outbound and inbound connections v1. It also remains possible to specify the `v2transport` argument to the `addnode` RPC as `false`, to disable attempting a v2 connection for that particular added node.

ACKs for top commit:
  stratospher:
    ACK 0bef104.
  josibake:
    reACK bitcoin@0bef104
  achow101:
    ACK 0bef104
  naumenkogs:
    ACK 0bef104
  theStack:
    ACK 0bef104
  willcl-ark:
    crACK 0bef104
  BrandonOdiwuor:
    utACK 0bef104
  pablomartin4btc:
    re ACK 0bef104
  kristapsk:
    utACK 0bef104

Tree-SHA512: 3f17a91e318b9304c40c74a7a5b231149f664ae684d13e9739a05be6c05ba9720f3c3c62da6a73ace0ae8ce733f1c8410b211f9fa15694e6a8d28999ab9882d8
ff9039f Remove GetAdjustedTime (dergoegge)

Pull request description:

  This picks up parts of bitcoin#25908.

  The use of adjusted time is removed from validation code while the warning to users if their clock is out of sync with the rest of the network remains.

ACKs for top commit:
  naumenkogs:
    ACK ff9039f
  achow101:
    ACK ff9039f
  maflcko:
    lgtm ACK ff9039f 🤽
  stickies-v:
    ACK ff9039f

Tree-SHA512: d1f6b9445c236915503fd2ea828f0d3b92285a5dbc677b168453276115e349972edbad37194d8becd9136d8e7219b576af64ec51c72bdb1923e57e405c0483fc
c11c404 tests: Test migration of blank wallets (Andrew Chow)
563b2a6 wallet: Better error message when missing LegacySPKM during migration (Andrew Chow)
b1d2c77 wallet: Check for descriptors flag before migration (Andrew Chow)
8c127ff wallet: Skip key and script migration for blank wallets (Andrew Chow)

Pull request description:

  Blank wallets (wallets without any keys are scripts) are being detected as already being descriptor wallets even though they are not. This is because the check for whether a wallet is already a descriptor wallet uses the presence of a `LegacyScriptPubKeyMan` which is only setup when keys or scripts are found. This PR resolves this issue by checking for the descriptor wallet flag instead and subsequently skipping the keys and scripts part of migration for blank wallets.

  Fixes the issue mentioned in bitcoin#28868 (comment)

ACKs for top commit:
  furszy:
    reACK c11c404. CI failure is unrelated.
  ryanofsky:
    Code review ACK c11c404

Tree-SHA512: 2466fdf1542eb8489c841253191f85dc88365493f0bb3395b67dee3e43709a9993c68b9d7623657b54b779adbe68fc81962d60efef4802c5d461f154167af7f4
…ng msg

987a1b5 init: settings, do not load auto-generated warning msg (furszy)

Pull request description:

  Fixes bitcoin#29144 (comment).

  The settings warning message is meant to be used only to discourage users from
  modifying the file manually. Therefore, there is no need to keep it in memory.

ACKs for top commit:
  achow101:
    ACK 987a1b5
  ryanofsky:
    Code review ACK 987a1b5. Seems like a clean, simple fix

Tree-SHA512: 3f2bdcf4b4a9cadb396dcff9b43155211eeed018527a07356970a341d139ad18edbd1a4d369377c8907b8ec1f19ee2ab8aacf85a887379e6d57a8a6db2403d51
…yresponse

9642aef test: fix intermittent failure in p2p_v2_earlykeyresponse (Martin Zumsande)

Pull request description:

  The test fails intermittently, see https://cirrus-ci.com/task/6403578080788480?logs=ci#L3521 and bitcoin#24748 (comment).
  I think it's because of a race between the python NetworkThread and the actual
  test, which will both call `initiate_v2_handshake`. I could reproduce it by adding a sleep into `initiate_v2_handshake` after the line `self.sent_garbage = random.randbytes(garbage_len)`.

  Fix this by waiting for the first `initiate_v2_handshake` to have finished before calling it a second time.

ACKs for top commit:
  stratospher:
    tested ACK 9642aef.
  achow101:
    ACK 9642aef
  theStack:
    Tested ACK 9642aef

Tree-SHA512: f728bbceaf816ddefeee4957494ccb608ad4fc912cb5cbf5f2acf09836df969c4e8fa2bb441aadb94fa39b3ffbb005d4132e7b6a5a98d80811810d8bd1d624e3
…CJDNS addresses

b851c53 fuzz: extend ConsumeNetAddr() to return I2P and CJDNS addresses (Vasil Dimov)

Pull request description:

  In the process of doing so, refactor `ConsumeNetAddr()` to generate the addresses from IPv4, IPv6, Tor, I2P and CJDNS networks in the same way - by preparing some random stream and deserializing from it. Similar code was already found in `RandAddr()`.

ACKs for top commit:
  achow101:
    ACK b851c53
  mzumsande:
    ACK b851c53
  brunoerg:
    utACK b851c53

Tree-SHA512: 9905acff0e996f30ddac0c14e5ee9e1db926c7751472c06d6441111304242b563f7c942b162b209d80e8fb65a97249792eef9ae0a96100419565bf7f59f59676
This deduplicates code for sending out the VERSION message
(if available and not sent yet), currently used at three
different places:

1) in the `connection_made` asyncio callback
   (for v1 connections that are not v2 reconnects)
2) at the end of `v2_handshake`, if the v2 handshake succeeded
3) in the `on_version` callback, if a reconnection with v1 happens
In the course of executing the asyncio data reception callback during a
v2 handshake, it's possible that the receive buffer already contains
data for after the handshake (usually a VERSION message for inbound
connections).
If we don't process that data immediately, we would do so after the next
message is received, but with the adapted protocol flow introduced in
the next commit, there is no next message, as the TestNode wouldn't
continue until we send back our own version in `on_version`. Fix this by
calling `self._on_data` immediately if there's data left in the receive
buffer after a completed v2 handshake.
The test framework's p2p implementation currently sends out it's VERSION
message immediately after an inbound connection (i.e. TestNode outbound
connection) is made. This doesn't follow the usual protocol flow where
the initiator sends a version first, and the responders processes that
and only then responds with its own version message. Change that
accordingly by only sending immediate VERSION message for outbound
connections (or after v2 handshake for v2 connections, respectively),
and sending out VERSION messages as response for incoming VERSION
messages (i.e. in the function `on_version`) for inbound connections.

Note that some of the overruled `on_version` methods in functional tests
needed to be changed to send the version explicitly.
fad74bb refactor: Mark prevector iterator with std::contiguous_iterator_tag (MarcoFalke)
fab8a01 refactor: Fix binary operator+ for prevector iterators (MarcoFalke)
fa44a60 refactor: Fix constness for prevector iterators (MarcoFalke)
facaa66 refactor: Add missing default constructor to prevector iterators (MarcoFalke)

Pull request description:

  Currently prevector iterators have many issues:

  * Forward iterators (and stronger) must be default constructible (https://eel.is/c++draft/forward.iterators#1.2). Otherwise, some functions can not be instantiated, like `std::minmax_element`.
  * Various `const` issues with random access iterators. For example, a `const iterator` is different from a `const_iterator`, because the first one holds a mutable reference and must also return it without `const`. Also, `operator+` must be callable regardless of the iterator object's `const`-ness.
  * When adding an offset to random access iterators, both `x+n` and `n+x` must be specified, see https://eel.is/c++draft/random.access.iterators#tab:randomaccessiterator

  Fix all issues.

  Also, upgrade the `std::random_access_iterator_tag` (C++17) to `std::contiguous_iterator_tag` (C++20)

ACKs for top commit:
  TheCharlatan:
    ACK fad74bb
  stickies-v:
    ACK fad74bb
  willcl-ark:
    ACK fad74bb

Tree-SHA512: b1ca778a31602af94b323b8feaf993833ec78be09f1d438a68335485a4ba97f52125fdd977ffb9541b89f8d45be0105076aa07b5726936133519aae832556e0b
25dc87e libconsensus: deprecate (Cory Fields)

Pull request description:

  This library has existed for nearly 10 years with very little known uptake or impact. It has become a maintenance burden. In several cases it dictates our code/library structure (for example necessitating LIBBITCOIN_CRYPTO_BASE), as well as build-system procedures (building multiple copies of object files especially for the lib).

  Several discussions have arisen wrt migrating it to CMake and it has become difficult to justify adding more complexity for a library that is virtually unused anyway.

  See for example the discussions:
  hebasto#41
  bitcoin#29123

  And here: bitcoin#29180
  Where it is pointed out that the libbitcoinconsensus functions are slower than those the internal bitcoind equivalents due to the missing sha2 implementations.

  Instead, we (fanquake, hebasto, TheCharlatan, and I) propose simply not migrating it to CMake and letting it end with v27. Any remaining use-cases could be handled in the future by libbitcoinkernel.

  If there are any users currently using libbitcoinconsensus, please chime in with your use-case!

  Edit: Corrected final release to be v27.

ACKs for top commit:
  TheCharlatan:
    ACK 25dc87e
  fanquake:
    ACK 25dc87e - this library has very little, if any impactful real world usage. It has been entirely broken (on various platforms) for long periods of its existence, where nobody even noticed. Pruning this out to save porting, and starting anew with the kernel, is the sane thing to do.

Tree-SHA512: baff2b3c4f76f520c96021035f751fdcb51bedf00e767660249e92a7bc7c5c176786bcf2c4cfe2d2351c200f932b39eb886bcfb22fbec824a41617590d6a1638
When migrating, we should also be writing the bestblock record to the
watchonly and solvable wallets to avoid rescanning on the reload as that
can be slow.
Migration will unload loaded wallets prior to beginning. It will then
perform some checks which may exit early. Such unloaded wallets should
be reloaded prior to exiting.
We want to make sure that all of the transactions are being copied to
the watchonly and solvable wallets as expected. The automatic rescanning
behavior can cause us to pass a test by finding the transaction
on loading rather than having it be copied as expected.
It is possible for a transaction that has an output that belongs to the
mgirated wallet, and another output that belongs to the watchonly
wallet. Such transaction should appear in both wallets during migration.
fad0faf refactor: Fix timedata includes (MarcoFalke)

Pull request description:

  Remove unused includes. Also, fixup comments, see https://github.com/bitcoin/bitcoin/pull/28956/files#r1464827885. Also, add missing includes to `chain.h` while touching it.

ACKs for top commit:
  achow101:
    ACK fad0faf
  dergoegge:
    utACK fad0faf
  stickies-v:
    ACK fad0faf

Tree-SHA512: 45e86f2eb90f0e37012bd83bf30259719e0e58ede18b31f51ca8a6f6d23e6ca4d060fc0f56f821a711cbdb45792b82cf780f5ae3226680d7a966471990f352bc
When initiating a v2 connection and being immediately disconnected,
a node cannot know if the disconnect happens because the peer only
supports v1, or because it has banned you, so it schedules to reconnect with v1.
If the test doesn't wait for that, the reconnect can happen at a bad time,
resulting in failure in a later connect_nodes call.
Also add the test with --v2transport to the test runner.
…nk wallets

3904123 tests: Test that descriptors flag is set for migrated blank wallets (Ava Chow)
072d506 wallet: Make sure that the descriptors flag is set for blank wallets (Ava Chow)

Pull request description:

  While rebasing bitcoin#28710 after bitcoin#28976 was merged, I realized that although blank wallets were being moved to sqlite, `WALLET_FLAG_DESCRIPTORS` was not being set so those blank wallets would still continue to be treated as legacy wallets.

  To fix that, just set the descriptor flags for blank wallets. Also added a test to catch this.

ACKs for top commit:
  epiccurious:
    Tested ACK 3904123.
  delta1:
    tested ACK 3904123
  ryanofsky:
    Code review ACK 3904123
  murchandamus:
    code review ACK 3904123

Tree-SHA512: 9f6fe9c1899ca387ab909b1bb6956cd6bc5acbf941686ddc6c061f9b1ceec2cc9d009ff472486fc86e963f6068f0e2f1ae96282e7c630193797a9734c4f424ab
…ave both spendable and watchonly outputs

4da76ca test: Test migration of tx with both spendable and watchonly (Ava Chow)
c62a8d0 wallet: Keep txs that belong to both watchonly and migrated wallets (Ava Chow)
71cb28e test: Make sure that migration test does not rescan on reloading (Ava Chow)
78ba0e6 wallet: Reload the wallet if migration exited early (Ava Chow)
9332c7e wallet: Write bestblock to watchonly and solvable wallets (Ava Chow)

Pull request description:

  A transaction does not necessarily have to belong to either the migrated wallet (with the private keys) and the watchonly wallet (with watchonly things), it could have multiple outputs with each isminetype. So we should be putting such transactions in one or the other wallet, but rather putting it in both.

  I've added a test for this behavior, however the test also revealed a few other issues. Notably, it revealed that `migratewallet` would have the watchonly wallet rescan from genesis when it is reloaded at the end of migration. This could be a cause for migration appearing to be very slow. This is resolved by first writing best block records to the watchonly and solvable wallets, as well as updating the test to make sure that rescans don't happen.

  The change to avoid rescans also found an issue where some of our early exits would result in unloading the wallet even though nothing happened. So there is also a commit to reload the wallet for such early exits.

ACKs for top commit:
  ryanofsky:
    Code review ACK 4da76ca. This looks great. The code is actually cleaner than before, two bugs are fixed, and the test checking for rescanning is pretty clever and broadens test coverage.
  furszy:
    Code review ACK 4da76ca

Tree-SHA512: 5fc210cff16ca6720d7b2d0616d7e3f295c974147854abc704cf99a3bfaad17572ada084859e7a1b1ca94da647ad130303219678f429b7995f85e040236db35c
The wallet decryption process (CheckDecryptionKey() and Unlock())
contains an arg 'accept_no_keys,' introduced in bitcoin#13926, that has
never been used.
Additionally, this also removes the unimplemented SplitWalletPath
function.
make check runs a bunch of other subtree tests that exercise code that
is hardly ever changed and have a comparatively long runtime. There
seems to be no target for running just the unit tests, so add one.
…ansactions

fa5cd66 test: Assumeutxo with more than just coinbase transactions (MarcoFalke)

Pull request description:

  Currently the AU tests only check that loading a txout set with only coinbase outputs works.

  Fix that by adding other transactions.

ACKs for top commit:
  jamesob:
    ACK bitcoin@fa5cd66
  glozow:
    concept ACK fa5cd66

Tree-SHA512: e090c41f73490ad72e36c478405bfd0716d46fbf5a131415095999da6503094a86689a179a84addae3562b760df64cdb67488f81692178c8ca8bf771b1e931ff
spicyzboss and others added 22 commits March 4, 2024 00:14
… connect to known prev block

a1fbde0 p2p: Don't consider blocks mutated if they don't connect to known prev block (Greg Sanders)

Pull request description:

  Followup to bitcoin#29412 to revert some of the behavior change that was likely unintentional.

  Based on comments from bitcoin#29412 (comment)

ACKs for top commit:
  0xB10C:
    utACK a1fbde0
  dergoegge:
    Code review ACK a1fbde0
  Sjors:
    ACK a1fbde0
  sr-gi:
    tACK bitcoin@a1fbde0

Tree-SHA512: be6204c8cc57b271d55c1d02a5c77d03a37738d91cb5ac164f483b0bab3991c24679c5ff02fbaa52bf37ee625874b63f4c9f7b39ad6fd5f3a25386567a0942e4
…tdown

b7aa717 refactor: gui, simplify boost signals disconnection (furszy)
f3a612f gui: guard accessing a nullptr 'clientModel' (furszy)

Pull request description:

  Fixing bitcoin#800.

  During shutdown, already queue events dispatched from the backend such
  'numConnectionsChanged' and 0networkActiveChanged' could try to access
  the clientModel object, which might not exist because we manually delete
  it inside 'BitcoinApplication::requestShutdown()'.

  This happen because boost does not clears the queued events when they arise
  concurrently with the signal disconnection (see https://www.boost.org/doc/libs/1_55_0/doc/html/signals2/thread-safety.html).
  From the docs:
  1) "Note that since we unlock the connection's mutex before executing its associated slot, it is possible a slot will still be executing after it has been disconnected by a [connection::disconnect](https://www.boost.org/doc/libs/1_55_0/doc/html/boost/signals2/connection.html#idp89761576-bb)(), if the disconnect was called concurrently with signal invocation."
  2)  "The fact that concurrent signal invocations use the same combiner object means you need to insure any custom combiner you write is thread-safe"

  So, we need to guard `clientModel` before accessing it at the handler side.

ACKs for top commit:
  hebasto:
    re-ACK b7aa717

Tree-SHA512: f1a21d69248628f6a13556a9438c9e4ea9f0a3678aab09ddfe836e78e4eee405a6730d37d39f1445068ada3a110b655b619cf0e090fc2d0cdf99bed061364aeb
6962c66 build, msvc: Do not compile redundant sources (Hennadii Stepanov)

Pull request description:

  The `test\util\setup_common.cpp` and `wallet\test\util.cpp` sources are already compiled and included in the `libtest_util` library, which is linked to the `test_bitcoin-qt.exe` binary. This PR follows the same logic as `Makefile.qttest.include`.

  Useful for comparing project files across the master branch and the developing [cmake-staging](https://github.com/hebasto/bitcoin/tree/cmake-staging) branch.

ACKs for top commit:
  sipsorcery:
    utACK 6962c66.

Tree-SHA512: 5c40f52f3c7df3fff994fb136d4b2779ade3857fa14cf167d3f8600f28e821294e3779ebd4f4ab10ad57bdc8e952f99f6eb211e746a986ec24e26c7d1a74c04f
632b69f qt: 27.0 translations update (Hennadii Stepanov)

Pull request description:

  This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool.

ACKs for top commit:
  stickies-v:
    ACK 632b69f , getting a zero-diff when running `update-translations.py` on fce53f1

Tree-SHA512: 1e2823451e9192e60dec9d50e801fca4cdc621e6acabdc15dbd88cab1624e05bd56de9ac818a1ff91002d62e24c0bab0ef1eaad3fd3cc6ef6cd044989d39734f
6e5eda8 doc: remove rel note fragments (fanquake)

Pull request description:

  These have been added to https://github.com/bitcoin-core/bitcoin-devwiki/wiki/27.0-Release-Notes-Draft, where they can be improved further.

ACKs for top commit:
  stickies-v:
    ACK 6e5eda8

Tree-SHA512: 66874fe9a64ac3a99a15a602ac68ae0a9e08f52a0fe732e48136b245c2127ed04e8217f86c44459696b03b01532a926ab8d41101c6e670902c1fc31e583b4dc9
e67ab17 test: fix flaky wallet_send functional test (Max Edwards)
3c49e69 test: fix weight estimates in functional tests (Max Edwards)

Pull request description:

  Fixes: bitcoin#25164

  The wallet_send functional test has been flaky due to a slightly overestimated weight calculation. This PR makes the weight calculation more accurate, although occasionally, due to how ECDSA signatures can be different lengths it might slightly over estimate. The assertion in the test can handle this slight variation and so should continue passing.

  Update:

  Because the signature can be shorter that is used in the weight estimation or the final transaction the estimate could be both slightly smaller or slightly larger.

ACKs for top commit:
  achow101:
    ACK e67ab17
  S3RK:
    Code review ACK e67ab17

Tree-SHA512: 3bf73b355309dce860fa1520afb8461e94268e4bcf0e92a8273c279b41b058c44472cf59daafa15a515529b50bd665b5d498bbe4d934f2315dbe810a05bc73f9
…nt/README.md

53ffd5a docs: Fix broken reference to CI setup in test/lint/README.md (naiyoma)

Pull request description:

  The current [reference](https://github.com/bitcoin/bitcoin/blob/master/test/ci/lint/04_install.sh
  ) for CI setup in /test/lint#readme returns a 404.

ACKs for top commit:
  fanquake:
    ACK 53ffd5a

Tree-SHA512: 813c19a145f09e7da11963598b70dc438acba784eb722e509d6af59dc3af8f5da97628c454bed2b03cc919689603e070796de2db8d784d9162ae34e7b85a77d9
…g-tutorial.md

990b348 doc: update signet faucet link in offline-signing-tutorial.md (Supachai Kheawjuy)

Pull request description:

  https://signet.bc-2.jp is broken and https://signetfaucet.com is the same as before.

  https://signet.bc-2.jp from archive.org
  <img width="1258" alt="image" src="https://github.com/bitcoin/bitcoin/assets/73651621/36817aa6-95ea-427d-8d1d-93e21af86dce">

  https://signetfaucet.com
  <img width="1242" alt="image" src="https://github.com/bitcoin/bitcoin/assets/73651621/e3248fb0-8a6d-45b3-9268-d883d2385c8f">

  reference: https://en.bitcoin.it/wiki/Signet#Faucets

ACKs for top commit:
  fanquake:
    ACK 990b348

Tree-SHA512: 482c931168a162cc666ecbe610e80d94ae433ebdc6bc52832bcc40c58592f9d9b8c7f1aea6faa2739873e80c6d4ea70c8a4f78d18067d1739e8070effce83062
d9f30b0 kernel: chainparams updates for 27.x (fanquake)
1611aa1 kernel: update chainTxData for 27.x (fanquake)
af78d31 kernel: update nMinimumChainWork & defaultAssumeValid for 27.x (fanquake)

Pull request description:

  Update chainparams pre `27.x` branch off.

  Note: Remember that some variance is expected in the m_assumed_* sizes.

ACKs for top commit:
  Sjors:
    ACK d9f30b0
  glozow:
    ACK d9f30b0 (checked mainnet locally, checked testnet/signet on block explorers and sanity checked the numbers)
  instagibbs:
    ACK d9f30b0

Tree-SHA512: 6ce65b964334b9d15fff4aa1af6d26fb3ef4eab50b8237fc2cda180230ae724a99d13c9f6b3c58105548d3520c0ca0810f354736132d11793d6c91ad3eeac4c7
…pression

217c0ce test: remove file-wide interpreter.cpp ubsan suppression (fanquake)

Pull request description:

ACKs for top commit:
  Sjors:
    utACK 217c0ce
  hebasto:
    ACK 217c0ce.
  dergoegge:
    ACK 217c0ce

Tree-SHA512: ae0c2ff4531fdb7b0296709f66b71d4065fe3f32cbd39a44e45934a975b5cf6cf01c2f136f110753efee8e301636f7700278aed1d995b463fc025c07d586a8fa
…in Windows GHA job

57e6e22 ci: Fix functional tests step for pull requests in Windows GHA job (Hennadii Stepanov)

Pull request description:

  This functionality has been broken since the Windows runner image version `20240128.1.0`.

  Fixes bitcoin#29534.

ACKs for top commit:
  fanquake:
    I can ACK 57e6e22 this only based on the fact that in this PR, the native Windows functional tests run: https://github.com/bitcoin/bitcoin/actions/runs/8119259315/job/22194887783#step:27:72, and that the native Windows functional tests are not currently running on master: https://github.com/bitcoin/bitcoin/actions/runs/8131828989/job/22239779585#step:27:63.
  hebasto:
    > I can ACK 57e6e22
  m3dwards:
    ACK bitcoin@57e6e22 as a way to get the tests running again quickly.

Tree-SHA512: 03e04fb96292e31ca0a8057e91b57f0812df92589f52f0602844e151ec5ec296badf5e549b1b606bab85607a3f9cd6abdfd328df80bf268501b537a596db0d96
Should fix the GCC compilation portion of bitcoin#29517:
bitcoin#29517 (comment).

See also:
https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html
but note that FreeBSD has supported this function since 11.x.
312f338 fuzz: restrict fopencookie usage to Linux & FreeBSD (fanquake)

Pull request description:

  Should fix the GCC compilation portion of bitcoin#29517 (comment).

  See also: https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html.

ACKs for top commit:
  m3dwards:
    ACK bitcoin@312f338
  TheCharlatan:
    utACK 312f338

Tree-SHA512: aa8ff20c3fa735415d05a93b8855877035c300f4d2dfd82f65fd9ed5b5c96ab619b4d84eef114ed0013dc5ff0800cb628ed3801e1efde0cfb0d426930d1673d5
Rework IsOpSuccess() to use SigVersion rather than leaf_version

Use switch based impl for IsOpSuccess()

Remove default in switch statement

Fix compiler warning

Move SigVersion to sigversion.h

Fix includes

try to fix compile

Add sigversion.h

Add include guards
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
@DrahtBot
Copy link
Collaborator

🐙 This pull request conflicts with the target branch and needs rebase.

@Christewart
Copy link
Author

Superseded by #49

@ajtowns
Copy link

ajtowns commented Mar 13, 2024

For future reference: You can use the "Edit" button at the top of a PR to target it for merging into a different branch (assuming the switch from 25.x to 26.x is why you closed this and opened 49)

@Christewart
Copy link
Author

For future reference: You can use the "Edit" button at the top of a PR to target it for merging into a different branch (assuming the switch from 25.x to 26.x is why you closed this and opened 49)

The other reason was I was re-using the same branch that I'm using to target bitcoin/bitcoin (christewart/64bit-arith). I hoped that I wouldn't have to maintain too separate branches, but I don't think that will be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet