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

Integration tests against Epoch3.0 #1763

Open
zone117x opened this issue Dec 11, 2023 · 4 comments
Open

Integration tests against Epoch3.0 #1763

zone117x opened this issue Dec 11, 2023 · 4 comments
Assignees
Labels

Comments

@zone117x
Copy link
Member

zone117x commented Dec 11, 2023

PR #1762 boots the stacks-node into epoch2.5 (where pox-4 activates) and refactors all pox integration tests to pox-4.

Epoch3.0 is when NakamotoBlocks come online. The script that boots up the stacks-node needs some new logic to trigger this transition, those changes will be done in the regtest-env repo https://github.com/hirosystems/stacks-regtest-env

Then the integration tests here need to start specifying and confirm epoch3.0 is activated, and test the NakamotoBlock+TenureChange ingestion.

@github-project-automation github-project-automation bot moved this to 🆕 New in API Board Dec 11, 2023
@andresgalante andresgalante moved this from 🆕 New to 📋 Backlog in API Board Dec 11, 2023
@zone117x zone117x mentioned this issue Dec 13, 2023
@zone117x zone117x self-assigned this Dec 13, 2023
@zone117x zone117x moved this from 📋 Backlog to 🏗 In Progress in API Board Dec 13, 2023
@zone117x
Copy link
Member Author

Running against an epoch3 node is pretty complicated. Duplicate efforts are on-going between the stacks-regtest and Clarinet projects. Ideally the API could use an epoch3 image from Clarinet. That is still in discussion. cc @hugocaillard

@zone117x
Copy link
Member Author

Increased priority for this now that we need epoch3.0 for integration tests for new Nakamoto signer event data implemented in stacks-network/stacks-core#4269

@smcclellan
Copy link
Contributor

Aiming for mid-Feb for epoch to be ready.

@zone117x
Copy link
Member Author

zone117x commented Mar 15, 2024

Update: the latest signer branch in the regtest-env repo (hirosystems/stacks-regtest-env#33) is able to boot epoch3 when using the full docker-compose workflow.

The orchestration required is significantly more complicated than epoch2.x..

  • A new "stacking" script is required to run in the background and submit txs in order to keep signer-keys registered
  • A new "signing" service is required to run in the background
  • A new "tx-broadcaster" script is required to run in the background in order produce Stacks blocks on an interval
  • The bitcoin mining script is more complicated and runs significantly slower in order to avoid other components breaking

In order to implement integration tests in this repo so they work similar to epoch2.x, we need to:

  1. Combine all the above new services and scripts into the single regtest docker image -- possible but it's going to be ugly.
  2. Increase the stability of the above epoch3 booting, because it is still flaky and sometimes fails to boot or will stall out (underlying causes are either still not known or are WIP).
  3. Ideally increase the bootup time, block production speed, and pox cycle speed, because these are all significantly slower now, and making the integration tests event slower would be pretty painful.

Of the above action items, only the first one is actionable right now. But it's unclear how useful that will be by itself, and also unclear if right now is a good time to divert attention away from feature development and manual testing.


In the meantime, we are working around this with a different development and testing workflow, which @janniks and @rafaelcr are helping with:

  • Write scripts to issue different stacking workflows (extends, increases, delegation, revokes, etc), manually boot the regtest env to epoch3, run the scripts, then dump the raw events csv (e.g. event-reply export).
  • Use these sets of raw events inside API for unit tests, and for the development of the signer features.

@smcclellan smcclellan moved this from 🏗 In Progress to 📋 Backlog in API Board Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants