Skip to content

fix(drift): report a codeless recorded contract per contract, not as rpc-unavailable - #71

Open
EgeCaner wants to merge 5 commits into
smartcontractkit:mainfrom
EgeCaner:fix/drift-per-contract-reachability
Open

EgeCaner wants to merge 5 commits into
smartcontractkit:mainfrom
EgeCaner:fix/drift-per-contract-reachability

Conversation

@EgeCaner

Copy link
Copy Markdown
Collaborator

Review after #69

Fixes finding 0b438802-f8e4-4941-abdb-8b9ce36f2127: a single unreachable recorded verifier disables the entire drift monitor and is reported as rpc-unavailable.

Issue

If any recorded verifier, resolver or factory had no code on the chain, DriftCheck reverted before comparing anything, and without the DRIFT_DETECTED marker. drift-check.sh then exited 2 (rpc-unavailable), so one stale record in config/deployments/<alias>.json switched off drift monitoring for the whole chain and looked like a network problem.

What changed

  • _assertReachable is replaced by checkReachability. Each recorded contract with no code is reported as
    DRIFT_DETECTED … has NO CODE at its recorded address and counted as drift (exit 1).
  • Every check skips only the codeless contract and still compares all the others.
  • A wrong --rpc-url still exits 2: run() checks the chainid against the chain config before reading anything, so a
    codeless address after that point is a bad record.

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.

1 participant