Repository navigation
Conversation
consensus.yaml only tolerates dropped acks (crash/omission); it has no Byzantine model, and the README explicitly disclaims byzantine_agents as not modeled. Add a grid_node role implementing Bracha reliable broadcast (propose/echo/ready/deliver, quorum n-f, amplify at f+1), which tolerates a Byzantine sender and Byzantine receivers at once. Three scenarios frame this as grid frequency regulation, n=4, f=1: - grid_bft_byzantine_voter: one substation lies; honest nodes still agree on the controller's real proposal. - grid_bft_byzantine_controller: the proposer itself lies, splitting substations; honest nodes still converge via ready-amplification. - grid_bft_double_fault: two Byzantine nodes at once, past f=1 on purpose; two honest nodes verifiably commit different actions, demonstrating the n>=3f+1 boundary rather than hiding it. A Byzantine node is defined purely by an `equivocation` config block (which peers get which value at every broadcast) - same protocol timing as an honest node, only the content differs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
consensus.yamlonly tolerates dropped acks (crash/omission); nandatown has no Byzantine model, and the README explicitly disclaimsbyzantine_agentsas "not modeled." This adds one.grid_noderole implementing Bracha reliable broadcast (propose → echo → ready → deliver; quorumn-f; amplify atf+1), which tolerates a Byzantine sender and Byzantine receivers at once, unlike the existing single-proposer consensus scenario.equivocationconfig block (which peers get which value, at every broadcast it makes) — identical protocol timing to an honest node, only the content it sends differs.n=4, tolerancef=1:grid_bft_byzantine_voter— one substation lies to everyone; the honest nodes still agree on the controller's real proposed action.grid_bft_byzantine_controller— the proposer itself lies, splitting the substations; honest nodes still converge via ready-amplification.grid_bft_double_fault— two Byzantine nodes at once, deliberately pastf=1; two honest nodes verifiably commit different actions. Itsagreementstage is expected to fail — that failure is the evidence then>=3f+1boundary was actually crossed, not a town malfunction.grid_bftvalidator: checks agreement/validity among honest nodes only (Byzantine-ness is read from scenario config, never inferred from behavior).tests/test_sim.py's closed-worldALL_SCENARIOS/FAILING_SCENARIOSlists updated accordingly.Test plan
pytest tests/test_lab_grid_bft.py— 12 new tests, all passingpytest tests/test_sim.py— updated scenario-presence lists, passingmain(Windows symlink/filesystem-permission tests), confirmed identical with this branch's changes stashed outrun_lab, including bundle export and HMAC signature verification (verify_bundle(...) == [])