Skip to content

feat(upgrade): support hard fork to Dijkstra PV12 - #3748

Merged
mkoura merged 2 commits into
masterfrom
upgrade_to_dijkstra
Oct 8, 2026
Merged

mkoura merged 2 commits into
masterfrom
upgrade_to_dijkstra

Conversation

@mkoura

@mkoura mkoura commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make the target protocol version of node upgrade testing configurable, so the upgrade run can also hard fork from Conway PV11 to Dijkstra PV12, e.g. for feature branches.

Target protocol version

  • New upgrade_prot_ver input of the upgrade workflow (11 or 12, default 11), passed to the runner as UPGRADE_PROT_VER.
  • runner/node_upgrade_pytest.sh takes the target version from UPGRADE_PROT_VER. It defaults to BASE_PROT_VER, so nightly upgrade runs keep the 11 -> 11 behavior (no hard fork).
  • COMMAND_ERA follows the era the cluster is in. It switches to the target era after the hard fork unless the user sets it.
  • Step2 and step3 add DijkstraGenesisFile / DijkstraGenesisHash to the configs, reusing the original Dijkstra genesis when there is one.
  • The step2 and step3 dry runs use the base protocol version. Configs generated for PV12 would contain TestDijkstraHardForkAtEpoch = 0 while the cluster is still in Conway.
  • ExperimentalProtocolsEnabled / ExperimentalHardForksEnabled are enabled when the node version is lower than the target protocol version (e.g. PV12 with node < 12.0.0). test_hardfork uses the same rule when deciding to skip.
  • After step3's hard fork stage, the runner checks that the cluster really is at the target protocol version, so a skipped test_hardfork doesn't go unnoticed.

BLS keys after the hard fork

The cluster pools are registered in Conway, so they have no BLS keys after the hard fork to Dijkstra. The new test_register_pools_bls_keys runs in step3 when the target era is Dijkstra:

  • generates a BLS key pair for each pool and re-registers the pool with it, keeping the other pool parameters
  • puts the keys where the cardonnay start scripts pick them up and restarts the nodes
  • checks that every pool has its BLS key registered from the next epoch

reregister_cluster_pool moved from test_bls_rotation.py to tests_dijkstra/bls.py so the upgrade test can reuse it. A new allow_xfail arg turns off the xfail on the known VRFKeyHashAlreadyRegistered ledger issue (ledger#6102). That issue doesn't apply after a hard fork, because the Conway -> Dijkstra translation records the pools' VRF key hashes.

Docs

agent_docs/tag_testing.md now describes how to set the target protocol version.

mkoura added 2 commits October 8, 2026 15:10
Make the target protocol version of upgrade testing configurable via
the UPGRADE_PROT_VER env variable (workflow input `upgrade_prot_ver`).
It defaults to the base protocol version, i.e. a release upgrade with
no hard fork, while UPGRADE_PROT_VER=12 upgrades to Dijkstra for
feature branches.

- derive cluster and command eras from the protocol versions and
  switch COMMAND_ERA to the target era after the hard fork
- export the base PROTOCOL_VERSION at the start of step3
- enable experimental protocols and hard forks in step3 node configs
  when the node version is lower than the target protocol version
- use the original Dijkstra genesis in step2 and step3 node configs,
  falling back to the dry-run one when the cluster has none
- check the protocol version after the hard fork, so a skipped
  hard fork test doesn't go unnoticed
- apply the same experimental hard forks rule in test_hardfork
The cluster pools are registered before Dijkstra, so they have no BLS
keys after the hard fork to Dijkstra PV12. Add
`test_register_pools_bls_keys` that runs in step3 right after the hard
fork. It generates a BLS key pair for every pool, re-registers the
pools with them and puts the keys where the pool start scripts pick
them up on the next node start. The nodes are then restarted and the
registered keys are checked after the next epoch boundary.

Move `reregister_cluster_pool` from the BLS rotation tests to the
shared `tests_dijkstra/bls.py` module, so it can be reused.
@mkoura
mkoura requested a review from saratomaz as a code owner October 8, 2026 13:16
@mkoura
mkoura merged commit 5e58014 into master Oct 8, 2026
3 checks passed
@mkoura
mkoura deleted the upgrade_to_dijkstra branch October 8, 2026 13:20
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