Skip to content

Conversation

@theStack
Copy link
Contributor

This PR enables one more of the non-wallet functional tests (mempool_accept.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078.

It also includes some other minor changes that came up while working on the replacement:

  • [commit 1/4] replace magic number 0xffffffff for a tx's nSequence with a new constant SEQUENCE_FINAL
  • [commit 2/4] create CTransaction instances with the current nVersion=2 by default, in order to use BIP68 for tests
  • [commit 3/4] support default from_node parameter for creating txs (this is a stripped down version of PR test: MiniWallet: support default from_node for sending/creating txs #24025)

This enables testing of BIP68 without the need of explicitly
setting nVersion to 2. This is e.g. useful for transactions
created with MiniWallet.
If no `from_node` parameter is passed explicitely to the
`create_self_transfer` method, the test node passed in the course
of creating the MiniWallet instance is used.  This seems to
be the main use-case in most of the current functional
tests, i.e. in many instances the calls can be shortened.
@theStack theStack force-pushed the 202201-test-use_MiniWallet_for_mempool_accept_etc branch from 7127b08 to ebc3d51 Compare January 11, 2022 15:23
@DrahtBot DrahtBot added the Tests label Jan 11, 2022
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ebc3d51bf50fa88042bb2620c37206f0528a70b0 🕉

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK ebc3d51bf50fa88042bb2620c37206f0528a70b0 🕉
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUiyQgv/RaF3J1PaDgEOYs6oJ32aX+c/14xaYW5lzUWPzXT7qa/UzlZI1ZgiHpPM
/2aQ0cbjYwRHdDBNS0oE/V/N3DI28oxxOHzTVaCbQwqVeVcMLDsZhb43831NQcz1
otfqSomZZJineWtjZRaKcOB8b20qwy0uGvyVvKgvNmeFDMaZC8K1JKNnar4+UtAU
oJQoZBPbWzY5GHsj3v9B7HpJN+K3iIYHlbaBs+x9jOlLZHnJT896cKBycw4JrDXL
bw45hBwK4EdnK4+KJZWzC3l9OeZEZ4aubNFtX2MlANp5l+CUsaZVgnwi4UnJebUn
/fTef1W+Vg6B7pOvqa3iiMaIN1wBVEs3BLG+PjBvnVTDz9CMQryzHpZB13gk42O7
BO1gsOrB346P6zpGR5smobMWabyqZhbDH2I7/8qbCdQxKQ3VSUGlGh7r3y2BoW+j
3SrVsPFifDRMjqHZy697eFxFpjj/6SDwUrLEYfHrdBz1U8P/xReuJFh9eyjpHV5w
XnSV1rOS
=ULDi
-----END PGP SIGNATURE-----

@theStack theStack force-pushed the 202201-test-use_MiniWallet_for_mempool_accept_etc branch from ebc3d51 to ebd3b55 Compare January 12, 2022 12:10
@theStack
Copy link
Contributor Author

Thanks for the review @MarcoFalke, tried to address all of your comments (getting rid of wallet.scan_tx() calls, removing comments about skipping (re-)signing that don't apply anymore).

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK ebd3b552686a3333e06cb2e151ef5c99af327c03 🐘

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK ebd3b552686a3333e06cb2e151ef5c99af327c03  🐘
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUj1/Qv9H86e10i7hwNLo1kyCzTSTysj1Zv24M5ZpSF+L+A62IoPFsn0aDDM0DHY
ksIUKe2s32PHhM+/CPS4LYr1q+B3NuEEir1MTrnucfdEwpEyb05cWHGxFANr275o
Ztj2Nxvb4Qgdt6YS4lkxfmP0aKG8PTKzAPaIUbpjIbtfxE/i2piMIu0W5a8MxA7D
BKSC04U2L0te8k+aFBhKKcZUHBoj+ETk4te66xOrO30WTPyq5AmsuFufyplnAV7S
rd94vZ4her2/8WtRdkAAhyPEdfrS9n909PwPQkC8Twh0zJ2PxBhW9sByWPgDHpWC
ZqCU+ziyZXl1KENKaddQCaQKlJ9udCqVGDFGhxlZrjbS1EtqHAy2AgJKSdYOUiiO
Grk2Bd0FiRkuq6akZt3qyIEpq9RChFdhzUy9yhybZfF3RakPKtzv6g2kNLz4OhE8
7v8Jf3JQTbYBZ+Z6AlzxGSnd8zlb6yfOjHaSmg7zSed/djfsXtUGeYo+5gttWF12
n9YAaOLW
=gJ7h
-----END PGP SIGNATURE-----

@theStack theStack force-pushed the 202201-test-use_MiniWallet_for_mempool_accept_etc branch from ebd3b55 to 0dd28a7 Compare January 12, 2022 15:53
@theStack
Copy link
Contributor Author

Force-pushed again with two suggestions tackled (#24035 (comment) and #24035 (comment)). Thanks for your patience!

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK 0dd28a752f15df117c810123810729703c7c575c 🍢

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK 0dd28a752f15df117c810123810729703c7c575c 🍢
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUirgAv/Zcb5audGGnebIIxRH85LrU+UjCbmnBPH4iENA6AFzCUPRGkbigiGM1dq
5JqciQbgKy7ooOooat0gGntexJDQ7A42HVcCoXkEo9GtGUC4VjF8o0rF+J3CoSzQ
9IIeggEEgUWsC0Fuj4jtf45AA1YWxr2RlF1ztTCuIWNsa/AdDhSr+raGmwCsj8uR
vnrzNuCU16gBghLTS/ClU030mX2mjr4AcNkbEy1UIN/khyxsLN/XKEKrfMCpuWdB
mC/FDbbAFJcLu8ERe+V0PYjxsOqWC2lvM712iE5RwuBPaMAAms4rzc8AL28zUFQ0
AUokMsm71IbOHzGRFXV8sNLvcKACj23l8HS+0/6QdX7VThefClUS27T2ATi5NDgO
jbCnHT7Ea/zdzkNlOyOmdUmrJ8QiatwgsJ50ZIDqStMYjXP5mgABDASuLyZeCA7S
vGUjYZaTPY3giAgx3NV9TX8EOJVWflDYEXpx5y6+4Bi+5u7fCA7uuAYqQM8fER0Q
OzDTk3jT
=S1cB
-----END PGP SIGNATURE-----

This test can now be run even with the Bitcoin Core wallet disabled.
@theStack theStack force-pushed the 202201-test-use_MiniWallet_for_mempool_accept_etc branch from 0dd28a7 to aa8a65e Compare January 13, 2022 17:32
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK aa8a65e 📊

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK aa8a65e4a88bfbd83ac756a87bfb8faf52fb675d 📊
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUi3mgv/fsG1sHFrfTMhZoVxBbD6+vaKEU/xFzPRQZWnF1k+GN2EzwX5NdzpgTqu
+OPUKrlj61y4bHAJVtp2EccDdqMCvSgsBwKB5Td1tGFLTk81LZYFPUb1cvaO9y0N
lORWGlIiyePaUOOBTA1ahiHAiQvr7UfuU64kmfjSCOgtpQ+LgSoJgwoUMi6KY47a
I998bcENP130pfAX8LkUF2vNz86Vp7S/ej1rPSU8OHhImkjy8Ie0lY1pi+ZcHZ73
1yufp27fvleFRRd5WbcFQz/m0M53VM/VP+ZpeqH2Ka5cSHyZV7niLnXOMf/BLtWv
5MQP/08ZRx3Bt0xITD0bIolbf68be7mQKvBb8LrTCsT5isV7koTSPafQJ5f9lsae
ZfgiJkjv7DoHUzvia37r1AESOCVkmFcP5LBp9HTesaqa7pwhoZi5oXzEscmISyyl
A+RZIYazGUk4ZL8iK7jiM0uaZETvxeYWkYVXbSuz0GFahPncvbhQOwV2+5Zgmn23
UTiuj0qJ
=ZFWj
-----END PGP SIGNATURE-----

@maflcko maflcko merged commit 807169e into bitcoin:master Jan 13, 2022
@theStack theStack deleted the 202201-test-use_MiniWallet_for_mempool_accept_etc branch January 13, 2022 17:48
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 14, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants