https://github.com/uncomputable/asset-gen
Generator of QA assets for Simplicity testing.
https://github.com/uncomputable/asset-gen
Last synced: 3 months ago
JSON representation
Generator of QA assets for Simplicity testing.
- Host: GitHub
- URL: https://github.com/uncomputable/asset-gen
- Owner: uncomputable
- License: cc0-1.0
- Created: 2023-10-26T13:45:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-21T21:40:01.000Z (about 1 year ago)
- Last Synced: 2025-02-04T19:46:38.142Z (5 months ago)
- Language: Rust
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simplicity QA Asset Generator
## Generate the assets
Run the main method to generate the file `script_assets_test.json`.
```bash
cargo run
```## Build Elements Core
Clone [Elements Core](https://github.com/ElementsProject/elements) and switch to the [Simplicity branch](https://github.com/ElementsProject/elements/tree/simplicity).
```bash
git clone [email protected]:ElementsProject/elements.git
cd elements
git checkout simplicity
```[Configure your development environment](https://github.com/ElementsProject/elements/blob/master/doc/build-unix.md). Cough, there is an [easy way using nix](https://github.com/uncomputable/bitcoin-nix-tools), cough.
Then build Elements Core.
```bash
./autogen.sh
./configure
make # use "-j N" for N parallel jobs
```## Use the assets
First, [build Elements Core for testing](https://github.com/uncomputable/asset-gen/tree/master#build-elements-core).
Then run the unit test assets using the test runner.
```bash
DIR_UNIT_TEST_DATA=../asset-gen ./src/test/test_bitcoin --log_level=warning --run_test=script_tests
```The variable `DIR_UNIT_TEST_DATA` selects the directory in which the file `script_assets_test.json` is located.