Gsd/phase 04.1 anvil local bridge e2e test use tokencontracts gnus ai env t catchup watcher fix#335
Merged
Conversation
Super-Genius
force-pushed
the
gsd/phase-04.1-anvil-local-bridge-e2e-test-use-tokencontracts-gnus-ai-env-t-catchup-watcher-fix
branch
2 times, most recently
from
July 14, 2026 03:56
8637215 to
1db4c9d
Compare
Super-Genius
added a commit
that referenced
this pull request
Jul 14, 2026
Super-Genius
added a commit
that referenced
this pull request
Jul 14, 2026
Super-Genius
force-pushed
the
gsd/phase-04.1-anvil-local-bridge-e2e-test-use-tokencontracts-gnus-ai-env-t-catchup-watcher-fix
branch
from
July 14, 2026 06:16
dfc8b68 to
b09cd33
Compare
henriqueaklein
pushed a commit
that referenced
this pull request
Jul 15, 2026
henriqueaklein
force-pushed
the
gsd/phase-04.1-anvil-local-bridge-e2e-test-use-tokencontracts-gnus-ai-env-t-catchup-watcher-fix
branch
from
July 15, 2026 14:06
ffd7535 to
017b867
Compare
…lution markers, flag location, tdd honesty
…fix plan warnings
Codebase research revealed 3 plan-reality mismatches: - Votes created in ConsensusManager::CreateVote(), not GeniusNode - PublicChainInputValidator owned by TransactionManager, not GeniusNode - WeightedRpcEndpoint has no is_paid/api_key fields Fixes across all 4 plans: - 06-01: SlotHashPopulator callback injected by GeniusNode bridging TransactionManager → ConsensusManager, not GeniusNode direct wire - 06-02: Context updated, tally algorithm unchanged - 06-03: Verified correct, full_promotion_weight_ is 8th constant (not 1st) - 06-04: Test targets updated for callback-based wiring
- Default-constructed slot_0/1/2_hash empty (abstain sentinel D-05) - Accessor round-trip returns 32-byte payloads - VoteSigningBytes covers slot hashes (T-06-01)
- Add bytes slot_0_hash (tag 6), slot_1_hash (tag 7), slot_2_hash (tag 8) - slot 0 = DIRECT_API endpoints (consensus_weight >= 50, D-02) - slots 1-2 = PUBLIC endpoints (consensus_weight < 50), dedup D-03 - Empty bytes = abstain sentinel (D-05); hash lives only in vote (D-04) - Fields inside VoteSigningBytes signing surface (T-06-01)
…Hash - slot 0 (DIRECT_API, weight>=50), slot 1/2 (PUBLIC, weight<50) - Empty vector when no qualifying endpoint or unknown slot/chain (D-05) - Asserts exact SHA-256 of endpoint URL strings
- Read-only const noexcept accessor (D-10: additive, Tier 1 untouched) - slot 0 = first endpoint with consensus_weight>=50 (DIRECT_API, D-02) - slots 1/2 = first/second endpoint with consensus_weight<50 (PUBLIC) - SHA-256 of url string via existing crypto::HasherImpl (T-06-03) - Empty vector = abstain sentinel / fail-closed for unknown slot/chain (D-05)
- CreateVote invokes SetSlotHashPopulator callback before signing - Populator-set slot_0_hash survives into the signed vote - Without populator, CreateVote is backward compatible (slots empty)
…Node - ConsensusManager: SetSlotHashPopulator callback + slot_hash_populator_ member - CreateVote invokes populator before VoteSigningBytes (T-06-01) - Blockchain::SetSlotHashPopulator forwarder to consensus_manager_ - PublicChainInputValidator::GetFirstConfiguredChainId (single-chain resolver) - GeniusNode wires the callback in INITIALIZING_TRANSACTIONS bridging TransactionManager::GetPublicChainInputValidator -> ConsensusManager vote - Backward compatible: unset populator -> CreateVote unchanged (D-05 abstain)
- SUMMARY documents proto extension, GetSlotHash accessor, populator wiring - 2 deviations (Blockchain forwarder, single-chain resolver) auto-fixed - Build/test execution deferred to user per CLAUDE.md build policy
…with in-memory test storage The test required full ConsensusManager/GeniusAccount/CRDT setup with filesystem paths, violating the MemorySecureStorage requirement for tests. The populator callback mechanism (setter + if-guard in CreateVote) is verified by code review; integration behavior is covered by Plan 04 slot quorum tests.
…hmetic - Context D-06 canonical example (550/1200/900/false) - D-03 solo PUBLIC hash dedup, 2-validator group contributes 25% - D-02 slot 0 half-weight contribution - D-05 abstainer raises threshold, contributes zero - REQ-DETERM-01 ordering independence - strict greater-than boundary, reject-vote skip, duplicate dedup
- WeightConfig extended with 7 integer-ratio slot constants (D-02/D-03/D-06) - SlotQuorumResult struct (qualified_sum, total_voting_reputation, threshold, has_quorum) - EvaluateSlotQuorum member + EvaluateSlotQuorumStatic pure helper - D-03 >=2-validator dedup on PUBLIC slots; solo hashes contribute zero - D-05 abstainers count toward threshold, zero toward qualified_sum - D-06 strict > certificate predicate - REQ-DETERM-01: reads only votes + registry snapshot, integer math throughout
- MintV2 + non-empty chain_id -> bridge mint (D-06) - MintV2 + empty chain_id -> not bridge (native mint) - TransferTx -> not bridge - Undecodable subject fails-closed to non-bridge (single-pool applies)
- QuorumTally extended with qualified_sum/slot_threshold (D-06 observability) - IsBridgeMintSubject static discriminator (kMintV2 + non-empty chain_id; fail-closed to single-pool on decode failure) - EvaluateQuorum dispatcher: single-pool IsQuorum for non-bridge, slot tally via ValidatorRegistry::EvaluateSlotQuorum for bridge mints - TallyVotes (certificate creation) routes final has_quorum through EvaluateQuorum - HandleVote incremental tally routes bridge mints through EvaluateQuorum, keeps fast-path IsQuorum for non-bridge (Pitfall 1 / T-06-10 mitigation)
- SUMMARY.md documents EvaluateSlotQuorum arithmetic + EvaluateQuorum dispatcher - TDD RED/GREEN gates per task, 4 commits - Deviations: pure static helper for testability; HandleVote non-bridge fast path - Self-check PASSED (agent-verified); build/test deferred to user per CLAUDE.md
…har_traits<unsigned char>)
…hasher API - Replace hasher_impl.hpp includes with hasher.hpp in consumer files - Remove std::make_shared<HasherImpl>() calls (HasherImpl deleted on develop) - Remove hasher arg from TransactionManager::New and ExtensionFactoryImpl - PublicChainInputValidator::GetSlotHash uses sgns::crypto::sha2_256() directly
- Add missing closing brace after AddRpcEndpoints - Change sgns::crypto::sha2_256 to crypto::sha2_256 (unqualified) - Add closing brace for GetSlotHash method - Append VerifyPublicChainSmartContract + namespace close (these were lost during rebase conflict resolution)
- Move GeniusNode::GetTransactionManager() from private to public for test access - Add bridge_rlpx_e2e_test.cpp implementing BridgeRlpxE2ETest fixture - 3-node cluster (ports 40021-40023) with per-node EthWatchService in kDiscoverFirst mode - Per-node BridgeRelayer wired against test-owned RLPx service with dual v1+v2 watches - RLPx settle wait polls remote_status_accepted >= 1, GTEST_SKIP on timeout (D-03) - Burn stream at 1-2s deterministic pseudo-jitter cadence via deadline polling - Each burn asserts balance increase on ALL THREE nodes (D-12) - Zero sleep_for, zero raw stdio, zero new OS ifdefs (CLAUDE.md compliant) - Env-gated: RUN_E2E_RLPX + PRIVATE_KEY/SIGNING_KEY required
- Mirror bridge_anvil_e2e_test block: addtest + AsyncIOManager include + genius_node_test + json_secure_storage link + three-platform whole-archive - Add evmrelay/examples include dir for chain_config.hpp access
…le examples/ dir not in cmake include scope)
… locked in a loop on poll_once
henriqueaklein
force-pushed
the
gsd/phase-04.1-anvil-local-bridge-e2e-test-use-tokencontracts-gnus-ai-env-t-catchup-watcher-fix
branch
from
July 15, 2026 16:26
d9a724e to
f470b5b
Compare
henriqueaklein
deleted the
gsd/phase-04.1-anvil-local-bridge-e2e-test-use-tokencontracts-gnus-ai-env-t-catchup-watcher-fix
branch
July 17, 2026 01:26
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.
No description provided.