Skip to content

ci: smart contracts in the robustness suite - #69

Merged
EnzinoBB merged 5 commits into
masterfrom
ci/contracts-robustness
Oct 23, 2026
Merged

EnzinoBB merged 5 commits into
masterfrom
ci/contracts-robustness

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Step 2 of the plan for testing smart contracts and sizing the test machine. It builds on #68; the base will become master once #68 is merged.

run.sh

  • A SIGKILLed node no longer leaves its executor JVM running, in the crash test and in the power cut. Before, the orphan kept the port its successor needed.

  • With contracts, the power cut waits for the first contract calls.

  • The calls after the restart start only when both are true:

    • the restarted nodes, and the whole network after a power cut, are 30 blocks past the fault;
    • the lowest node has reached CONTRACTS_AFTER_AT.

    This now also works without a restart test.

  • Contract states are compared once every node has reached TARGET_SEQ, including a node that joined later. The wait is bounded by the run's deadline.

  • An executor that cannot bind its port fails the run.

contracts.py

  • New options --check-nodes and --final-file.
  • A transaction that n1 refuses as "not syncronized" (after a power cut) is sent again for up to 120 s. Nothing was accepted, so the resend is safe.

.github/actions/contract-executor

  • The release executor and its JDK, now shared by testnet.yml and robustness.yml.

New robustness scenarios

Scenario What it does
contracts-crash six SIGKILLs of n6 and its executor
contracts-power-cut every node and executor killed between the calls
contracts-net-loss 15 % packet loss on n3 and n5
contracts-pruned-term-kill a pruned node killed four times, quick-starting from checkpoints that hold the contract states
contracts-pruned-join a pruned node joining from block 0 after the deploys
contracts-db-convert block databases converted with contract records in them

Scenarios that never kill n1 are the only ones paired with contracts, because contracts.py sends everything through n1.

Validation

  • Robustness dispatch with the six scenarios, plus rocksdb-crash and mixed-power-cut, to check that nothing changes without contracts.
  • Testnet dispatch with contracts=1 at 7 nodes.

🤖 Generated with Claude Code

EnzinoBB and others added 2 commits October 22, 2026 11:59
… packet loss, pruning and conversion

- run.sh: a SIGKILLed node's executor JVM is killed too (crash test and power cut), or it keeps
  the port its successor needs; a power cut with contracts waits for the first calls; the calls
  after go once the restarted nodes and the network after a power cut are 30 blocks past it and
  the lowest node reached CONTRACTS_AFTER_AT (also without a restart test); the states are
  compared once every node, a joining one too, reached TARGET_SEQ (contracts-final), bounded by
  the run's deadline; an executor that could not bind its port fails the run.
- contracts.py: --check-nodes (a joining node is compared too), --final-file, and a transaction
  n1 refuses as not synchronized is sent again for up to 120 s.
- .github/actions/contract-executor: the release executor and JDK, shared by testnet.yml and
  robustness.yml.
- robustness.yml: contracts-crash, contracts-power-cut, contracts-net-loss,
  contracts-pruned-term-kill, contracts-pruned-join, contracts-db-convert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EnzinoBB added a commit that referenced this pull request Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EnzinoBB
EnzinoBB changed the base branch from ci/resource-sampler to master October 23, 2026 00:05
@EnzinoBB
EnzinoBB merged commit 25add63 into master Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant