Skip to content

fix(evm-nwo): stop cross-network chain reuse, add graphHiding and image overrides - #2418

Merged
AkramBitar merged 1 commit into
LFDT-Panurus:mainfrom
atharrva01:fix/2412-nwo-harness
Oct 6, 2026
Merged

AkramBitar merged 1 commit into
LFDT-Panurus:mainfrom
atharrva01:fix/2412-nwo-harness

Conversation

@atharrva01

@atharrva01 atharrva01 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2412 (items 7, 9, 10).

startNode returned the first entry with a running node regardless of which network it belonged to, so a suite standing up two independent EVM topologies (NewTopologyWithName) would silently settle the second one onto the first one's chain. Adds an Entry.Network field and a nodeForNetwork helper that checks it before reusing a node.

GraphHiding is now derived per TMS from its token driver (DeploySpec.GraphHiding was never populated, so every TMS deployed with graphHiding false). Both registered drivers are non graph-hiding today; an unknown driver fails loudly.

And makes BESU_IMAGE / FABRICX_EVM_IMAGE actually reach the suites. Before this, overriding them only changed which image the make targets pulled; the suite itself always booted the hardcoded default image name, and CheckImagesExist failed because that one was never pulled. StartBesu and startGatewayNode now fall back to the environment variable before the hardcoded default.

Test plan

  • go build ./nwo/... clean
  • go test ./nwo/token/evm/... green, including new tests for nodeForNetwork and the image resolution fallback

@Effi-S Effi-S 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.

Nit: network-key format duplicated across two call sites

integration/nwo/token/evm/nwo.go:132 and :245
tms.Network + ":" + tms.Channel is written in both GetEntry and startNode. If the format changes in one place only, reuse silently breaks; a keyOf(tms) helper would keep them in lockstep.

Nit: GraphHiding knob not settable from any topology

integration/nwo/token/evm/nwo.go:83
p.GraphHiding (like p.Image, p.ChainID, p.Threshold) is never wired from the factory/topology, so it's only enablable by direct field assignment. Intentional per PR description; noted for completeness.

@Effi-S
Effi-S force-pushed the fix/2412-nwo-harness branch from ac309c7 to 50abe65 Compare October 1, 2026 09:31
@Effi-S Effi-S added this to the Q4/26 milestone Oct 1, 2026
@atharrva01
atharrva01 force-pushed the fix/2412-nwo-harness branch from 50abe65 to 370c0c3 Compare October 2, 2026 07:11
@atharrva01

Copy link
Copy Markdown
Contributor Author

Pushed 370c0c3 (rebased on main). Added a networkKey(tms) helper so GetEntry and startNode derive the network key the same way. Left GraphHiding as a field knob as noted: nothing sets it non-default yet, so I'd rather wire it from the topology when a suite actually needs it.

@atharrva01
atharrva01 requested a review from Effi-S October 2, 2026 07:20
Comment thread integration/nwo/token/evm/nwo.go
Comment thread integration/nwo/token/evm/besu.go
Comment thread integration/nwo/token/evm/besu.go
Comment thread integration/nwo/token/evm/nwo.go Outdated
@atharrva01
atharrva01 force-pushed the fix/2412-nwo-harness branch from 370c0c3 to 07a5ae6 Compare October 4, 2026 13:35
@atharrva01

Copy link
Copy Markdown
Contributor Author

hi @Effi-S all the reviews are addressed

@atharrva01
atharrva01 requested a review from Effi-S October 4, 2026 13:41

@Effi-S Effi-S 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.

Some Low severity findings

Comment thread integration/nwo/token/evm/nwo.go Outdated
Comment thread integration/nwo/token/evm/nwo.go Outdated
Comment thread integration/nwo/token/evm/besu.go Outdated
Comment thread integration/nwo/token/evm/besu.go Outdated
@atharrva01
atharrva01 force-pushed the fix/2412-nwo-harness branch from 07a5ae6 to d563026 Compare October 5, 2026 07:32
@atharrva01
atharrva01 requested a review from Effi-S October 5, 2026 09:57
Effi-S

This comment was marked as outdated.

@Effi-S Effi-S 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
@AkramBitar - Any thoughts?

@Effi-S
Effi-S force-pushed the fix/2412-nwo-harness branch from d563026 to 36da93e Compare October 5, 2026 13:16
…our image overrides

startNode returned the first entry with a running node regardless of
which network it belonged to, so a suite standing up two independent
EVM topologies would silently settle the second one onto the first
one's chain. Adds an Entry.Network field and a nodeForNetwork helper
that checks it before reusing a node. The key is length-prefixed so a
colon in the network or channel cannot make two networks collide.

DeploySpec.GraphHiding was never populated, so every TMS deployed with
graphHiding false regardless of what the token driver needed. It is now
derived per TMS from the TMS's driver, so networks served by one handler
can differ and there is no knob to keep in sync. An unknown driver fails
loudly instead of deploying the wrong mode.

And makes BESU_IMAGE / FABRICX_EVM_IMAGE actually reach the suites.
Before this, overriding them only changed which image the make targets
pulled; the suite itself always booted the hardcoded default image
name, and CheckImagesExist failed because that one was never pulled.
The handler now resolves the image (environment, then configured, then
default) in one shared helper; StartBesu and startGatewayNode take the
image as given and only apply the default.

Signed-off-by: atharrva01 <atharvaborade568@gmail.com>
@AkramBitar
AkramBitar force-pushed the fix/2412-nwo-harness branch from 36da93e to ca88d63 Compare October 6, 2026 07:57
@AkramBitar
AkramBitar merged commit 733d67c into LFDT-Panurus:main Oct 6, 2026
309 of 313 checks passed
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.

3 participants