Repository navigation
Conversation
|
You're right. The verifier detects an unaccounted transfer and sets I reproduced this with a regression test: def test_confirmed_violation_survives_allowance_rpc_failure(self):
ledger = make_mock_ledger()
ledger["project_wallets"]["bob"] = bob
code, output = run_main(ledger, latest_block=202)
self.assertEqual(code, 1, msg=output)Expected: exit code Actual: exit code Relevant output: The regression confirms that an infrastructure failure can override an already-confirmed accounting violation. Regression commit: |
|
Thanks @Chandain — your regression captures the finding-versus-outage priority issue precisely. The current PR head (
The existing 119-test offline run covers these checks; I have not run your new branch unchanged against this head. You can run the current suite with |
|
Thanks for your contribution. Both tests passed, confirming these scenarios:
Test exit 0 : PASS Commit HEAD: ea3004c |
|
I haven’t pulled gjwang’s PR into this branch yet. I tested the current implementation separately on my fork. Branch: Command: The following cases pass:
All three unit tests pass, so the unittest command itself exits with code Branch: https://github.com/Chandain/sourcemint/tree/test/no-unaccounted-and-outage |
|
@gjwang — thank you, and sorry for the wait on this one too. Your analysis is right on both counts. The nonce index could never see a Two things I had to change before it could run outside the tests, both mine to have caught in review and not criticisms of the work:
A live run failed on the first page, covered zero blocks, and reported itself inconclusive. Correct behaviour, but it would never have verified anything. It's 1000 now.
Neither shows up offline, which is exactly why you flagged that you hadn't run it live. That was the right thing to say and it's what made them quick to find. I also went looking for the same mistake elsewhere and found it: Live results on Base mainnet:
On landing it: your commit carries One limit I'd rather state than let someone discover: a complete pass is ~16,300 requests today and Base adds ~317,000 blocks a day, so it grows about eight minutes a week and passes the six-hour CI limit within a year. It's written up in Last thing: this qualifies for a contributor reward under REWARDS.md. If you want one, reply with a Base address — the address only, never a key. No obligation, and it changes nothing about the fix landing. SRCMNT is recognition within this project; it has no market value and isn't payment for work. |
main's branch protection requires two checks: "Verify on-chain accounting" and "Foundry project". Nothing has produced the second since c11b779 on 2026-10-28, which removed .github/workflows/test.yml as a duplicate of ci.yml. The two did run the same forge commands under the same workflow name, but test.yml's job was named "Foundry project" and ci.yml's is named "test", so deleting it took a required context with it. Every pull request since has been unmergeable. #9 and #12 were closed rather than merged; #11 could not have merged either, whatever its CI status. ci.yml's job now carries the name the rule asks for. Protection is unchanged and no setting was touched — the check it requires simply exists again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012mggwNhgEyvfn1q6Lrdk3Q
main's branch protection requires two checks: "Verify on-chain accounting" and "Foundry project". Nothing has produced the second since c11b779 on 2026-10-28, which removed .github/workflows/test.yml as a duplicate of ci.yml. The two did run the same forge commands under the same workflow name, but test.yml's job was named "Foundry project" and ci.yml's is named "test", so deleting it took a required context with it. Every pull request since has been unmergeable. #9 and #12 were closed rather than merged; #11 could not have merged either, whatever its CI status. ci.yml's job now carries the name the rule asks for. Protection is unchanged and no setting was touched — the check it requires simply exists again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012mggwNhgEyvfn1q6Lrdk3Q
|
Landed on One thing I told you above was wrong, and it was wrong in a way that blamed your commit for something that wasn't its fault. I said your PR couldn't merge because of The fix is Two more things came out of running your scan for real rather than offline, both yours by implication and worth saying plainly: The budget reserved requests for the canonical head re-check, but not time. A full pass spends an hour and runs the clock to the deadline, so the re-check was unaffordable the moment the scan ended and a complete, clean history still reported itself unverified. Against mainnet it came back:
The full scan was running on every pull request — eighty minutes to check five entries, growing with the chain. A PR now confirms every entry is a real successful transfer and that balances reconcile (eight requests, under a second); the complete scan runs on With the full scan on Complete coverage, deployment block to head, nothing skipped. Closing this as merged-via-#13 rather than as rejected — the work is yours. The reward offer stands whenever you want to reply with a Base address; no rush and no obligation. |
The verifier can miss a delegated transfer and its return when the project wallet's nonce and final balance do not expose either movement. In the reported approve → transferFrom → return → revoke scenario, the current verifier reads blocks 1, 100 and 202, skips 200–201, and returns 0.
This update scans the configured token's Transfer logs continuously from deployment through a fixed head, with no nonce-sampling fallback. It checks both RPC endpoints' chain IDs and head identity, validates and deduplicates event identities across pages, and pins balance/supply reads to that canonical block hash. A final head check prevents receipts or state from a later fork creating a finding.
Request attempts, response size, retained events and elapsed time have explicit budgets. An unfinished range is inconclusive (2), while an already-confirmed unledgered movement remains a finding (1). Pending/post-snapshot ledger entries cannot create false balance violations. Live allowances no longer veto complete historical coverage: they describe future spending authority. The README documents configuration and the trusted-RPC boundary; successful log responses are not independent cryptographic receipt proofs or provider-capacity guarantees.
The existing Ledger job now discovers all script Python tests, including the history regressions. Its triggers, permissions and existing 0/1/2 workflow handling remain intact.
Validation:
Refs #10