Skip to content

fix(iota-core): select the fullnode submission driver per request from the current epoch store (#12520) - #12663

Open
filipdulic wants to merge 3 commits into
developfrom
core/fix/12520-fullnode-driver-follows-pcool-flag
Open

fix(iota-core): select the fullnode submission driver per request from the current epoch store (#12520)#12663
filipdulic wants to merge 3 commits into
developfrom
core/fix/12520-fullnode-driver-follows-pcool-flag

Conversation

@filipdulic

@filipdulic filipdulic commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description of change

The fullnode's TransactionOrchestrator picked its submission driver (QuorumDriver vs TransactionDriver) once, at process start; validators check enable_pcool_flow per request. A fullnode not restarted after the flip epoch kept submitting on the rejected path.

Enabling P-COOL is seamless. Disabling it again is not planned for mainnet/testnet, so a node that booted under P-COOL requires a restart to serve the certificate flow (team decision).

  • The epoch's P-COOL flag selects the flow serving a request, mirroring the validator-side checks.
  • The TransactionDriver always exists, with its reconfig observer running from boot, so it tracks epochs before the flag enables it. Its latency-ping and health-check rounds are skipped while the flow is disabled (pings go through the real submission path, which validators reject) and resume when the flag returns; both tasks hold weak references and exit on teardown.
  • The QuorumDriver is built only on a flag-off boot (Option), together with its effects/pending-log cleanup loop and WAL recovery. On a node that booted under P-COOL, submissions selecting it fail with an internal error whose detail says a restart is required (also logged by the fullnode), and the effects subscription is unavailable.
  • Driver accessors are test-only; production code reaches a driver only through per-request selection.
  • Driver metrics register up front regardless of boot mode.
  • TransactionDriver::new takes Option<ValidatorClientMonitorConfig> instead of Option<&NodeConfig>, plus a P-COOL predicate.
  • New test util AuthorityState::reconfigure_for_testing_with_protocol_config lets tests change the protocol config at an epoch boundary.

A stale-committee first attempt right after the flip epoch is covered by the existing retry machinery: epoch mismatches are retriable and the TransactionDriver reloads its aggregator on every attempt, the same as any epoch boundary.

Links to any relevant issues

fixes #12520

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

New tests:

  • e2e: OFF→ON flip via a real v31→v32 protocol upgrade; the same fullnode submits on both sides of the boundary.
  • Unit: a flag-off boot builds the quorum driver and runs WAL recovery at construction; a node booted under P-COOL rejects quorum-driver selection after a rollback and returns no effects receiver.

Unit tests and clippy verified locally; simtests run in CI.

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes): Full nodes now follow the P-COOL enablement at the epoch boundary without a restart, and stop sending latency pings and health checks while the P-COOL flow is disabled. Full nodes that started while P-COOL was enabled require a restart before serving the certificate flow after a rollback; until then their submissions fail and the fullnode log states that a restart is required.
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • gRPC:

@iota-ci iota-ci added consensus Issues related to the Core Consensus team core-protocol labels Aug 13, 2026
@filipdulic
filipdulic force-pushed the core/fix/12520-fullnode-driver-follows-pcool-flag branch 4 times, most recently from 39612dc to 2f244fc Compare August 14, 2026 13:02
@filipdulic
filipdulic marked this pull request as ready for review August 14, 2026 13:26
@filipdulic
filipdulic requested review from a team as code owners August 14, 2026 13:26
Comment thread crates/iota-core/src/validator_client_monitor/monitor.rs Outdated
Comment thread crates/iota-core/src/transaction_orchestrator.rs Outdated
Comment thread crates/iota-core/src/authority.rs Outdated
@filipdulic
filipdulic force-pushed the core/fix/12520-fullnode-driver-follows-pcool-flag branch from 2f244fc to 7094106 Compare August 17, 2026 07:40
@filipdulic
filipdulic marked this pull request as draft August 17, 2026 08:53
@filipdulic
filipdulic force-pushed the core/fix/12520-fullnode-driver-follows-pcool-flag branch from 7094106 to 63d4211 Compare August 17, 2026 09:07
@filipdulic
filipdulic requested a review from bingyanglin August 17, 2026 09:36
@filipdulic
filipdulic marked this pull request as ready for review August 17, 2026 09:36
@filipdulic
filipdulic force-pushed the core/fix/12520-fullnode-driver-follows-pcool-flag branch from 63d4211 to 1959ff2 Compare August 18, 2026 09:40
@filipdulic
filipdulic requested review from a team as code owners August 18, 2026 09:40
@filipdulic
filipdulic force-pushed the core/fix/12520-fullnode-driver-follows-pcool-flag branch 2 times, most recently from fe60453 to 30b3b02 Compare August 18, 2026 10:35

@bingyanglin bingyanglin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only a small lint.

Comment thread crates/iota-core/src/transaction_orchestrator.rs
@filipdulic
filipdulic force-pushed the core/fix/12520-fullnode-driver-follows-pcool-flag branch from 30b3b02 to 9829b63 Compare August 20, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus Issues related to the Core Consensus team core-protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pcool: Fullnode submission flow is frozen at process start; the enabling epoch breaks non-restarted fullnodes

3 participants