You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A specific sequence of events causes a restarting/reconnecting node to ISS:
Set addressBook.force=true in the config
Start the network; process transactions across a 15min boundary
Restart a node
The restarting node, which finds a config.txt present in its working directory, will generate synthetic node "overrides" and write them to state. The resulting node metadata is the same, but the entity counter is increased by the number of nodes in the network; thus the resulting state on the restarted node, for the round immediately following the loaded state, will have a different entity count and hash, resulting in an ISS.
We need to fix this in release 0.60+ by archiving the config.txt file as with the other network .json files after loading the network from disk during startup; an absent config.txt file will not trigger the extra overrides to be written to state.
Acceptance Criteria
Test is written simulating the bug conditions
Written test is passing
@tomzhenghedera's restart/reconnect tests on engnet1 don't result in an ISS
Dependencies
None
Definition of Ready (DoR) Checklist
Clear acceptance criteria
Clear and detailed description
Dependencies identified
Links to documentation
Should be completable in 2-3 Days
Initial draft of Low-level design document
At least high level test plan
Groomed/Estimated
Definition of Done (DoD) Checklist
Acceptance Criteria complete
No Codacy issues greater than minor (in new code)
JavaDocs updated/created
Code commented
Unit tests created/updated
80% test code coverage (in new code)
Happy Path and major negative cases in HAPI tests as applicable
The text was updated successfully, but these errors were encountered:
mhess-swl
added
Bug
An error that causes the feature to behave differently than what was expected based on design.
and removed
Bug
An error that causes the feature to behave differently than what was expected based on design.
labels
Mar 11, 2025
Archiving config.txt in this case doesn't actually fix this problem.
When a node calls AddressBookTransplantSchema#restart during startup migration, it uses the migration context to get the startup override network. If forceUseOfConfigAddressBook is enabled–which is true in current engnet tests–the override network will return the contents of config.txt as a network instead of an empty override. However, we can see in the ISS state differences that the state already has all needed node definitions at this point; therefore we're not really creating any new entities, yet we still increment the entity counter.
If we do archive config.txt then RosterTransplantSchema.super.restart(ctx, rosterStoreFactory) returns false because of the absence of config.txt (as the fallback override), ultimately resulting in an exception during the restart migration.
We can solve this issue instead by not inserting any "new" node definitions from config.txt in AddressBookTransplantSchema#restart. This can be a stopgap measure until we retire config.txt as a network fallback completely.
Finally, note that this issue shouldn't affect the startup sequence of networks where forceUseOfConfigAddressBook is not enabled.
Background
A specific sequence of events causes a restarting/reconnecting node to ISS:
addressBook.force=true
in the configThe restarting node, which finds a
config.txt
present in its working directory, will generate synthetic node "overrides" and write them to state. The resulting node metadata is the same, but the entity counter is increased by the number of nodes in the network; thus the resulting state on the restarted node, for the round immediately following the loaded state, will have a different entity count and hash, resulting in an ISS.We need to fix this in release 0.60+ by archiving the
config.txt
file as with the other network.json
files after loading the network from disk during startup; an absentconfig.txt
file will not trigger the extra overrides to be written to state.Acceptance Criteria
Dependencies
None
Definition of Ready (DoR) Checklist
Definition of Done (DoD) Checklist
The text was updated successfully, but these errors were encountered: