bitcoin-dev-project / warnet

Monitor and analyze the emergent behaviors of Bitcoin networks
https://warnet.dev
MIT License
83 stars 35 forks source link

Handling test_framework's initial state assumptions #358

Open mplsgrant opened 4 months ago

mplsgrant commented 4 months ago

Issue

When I run scenarios that were built for Bitcoin Core's functional test framework, I get errors relating to wallet balance issues.

Cause

Core's functional test framework has a non-empty initial state. For example, it begins by populating the blockchain by default. This means that users of the framework write code that relies on the existence of blocks and wallets that already have coins.

Possible solutions

Recreate the functional test's initial state in Warnet, and then ... A. ...allow users to explicitly run scenarios within that initial state by using command line flags. B. ...implicitly create the state for any scenarios that live a specified folder. C. ...scenario authors explicitly create the state by providing a hook that they manually add to any scenario that needs it.

josibake commented 4 months ago

Related: https://github.com/bitcoin-dev-project/warnet/issues/29