Skip to content

fix: fall back to Sourcify when an explorer refuses the submission - #401

Merged
thedavidmeister merged 2 commits into
mainfrom
2026-09-29-verify-sourcify-fallback
Sep 29, 2026
Merged

thedavidmeister merged 2 commits into
mainfrom
2026-09-29-verify-sourcify-fallback

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Chain 4663 fails every run: Robinhood's Blockscout serves a Cloudflare challenge, which forge reads as a JSON error. Sourcify carries 4663.

A chain the explorer rejects now retries through Sourcify, failing only if that fails too. No chain is named.

The retry needs two things:

  • Keys blanked. forge takes the Etherscan path whenever the chain's key holds a value, ignoring --verifier sourcify. Blank, not unset — unset, it errors resolving the table.
  • --watch. Without it forge prints a job ID and exits 0, reporting a verification that has not happened.

QA

  • Discriminating tests: n/a — a workflow, no harness. Evidence is the failing run: 8 of 9, failed verification on: 4663.
  • Mutations applied: all three key states on 4663 — unset (environment variable CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY not found), x (Cloudflare 403), blank (Status: match). Dropping --watch returns a job ID and exit 0 without waiting.
  • Oracle: Sourcify, independent of forge and this repo — GET /v2/contract/4663/0xEc632ea4D04A6D72F87E60FEb4C6B6813cda59bd returns "match"; /server/chains lists 4663.
  • Category check: covers the chain that cannot verify through its explorer. Not covered: Sourcify's onward pushes to Blockscout and Etherscan, which fail and are not this workflow's business.

🤖 Generated with Claude Code

`Manual sol verify` on rain.math.float.deploy fails on 4663 every run and
always will: Robinhood's Blockscout serves a Cloudflare challenge, forge
reads the interstitial as a JSON error, and no retry count outlasts it. That
is a workflow that cannot be green while a contract is fully verifiable —
Sourcify carries 4663, as it does all nine of that repo's chains.

A chain the explorer rejects now retries through Sourcify, and only counts as
failed if that fails too. Generic: no chain is named, and any explorer that
starts refusing gets the same treatment.

Keys are blanked for the retry because forge picks the verifier from the
`[etherscan]` entry and goes to Etherscan whenever the chain's key holds a
value, `--verifier sourcify` notwithstanding. Blank rather than unset,
because forge resolves the whole table before honouring `--verifier` and
errors on a name with no value at all. Both were established against the
live explorer.

`--watch --retries 40 --delay 15` on the retry, matching the first attempt.
Without `--watch` forge prints a job ID and exits 0, which would report a
verification that had not happened — the failure the rest of this workflow
is built to avoid. Confirmed `--watch` is honoured by the Sourcify path:
polls, then `Status: match`.

Verified end to end by hand on 0xEc632ea4D04A6D72F87E60FEb4C6B6813cda59bd at
chain 4663, which Sourcify now records as `"match"`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: rainlanguage/rainix/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 57da5a70-e21e-4204-a652-69ae92ffc12c

📥 Commits

Reviewing files that changed from the base of the PR and between 9cd55f1 and f98cfd9.

📒 Files selected for processing (1)
  • .github/workflows/rainix-manual-sol-verify.yaml
 ____________________________________________
< 99 little bugs in the code... I filed 100. >
 --------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeister
thedavidmeister merged commit 5f6cc89 into main Sep 29, 2026
17 of 18 checks passed
@linear

linear Bot commented Sep 29, 2026

Copy link
Copy Markdown

RAI-2740

@github-actions

Copy link
Copy Markdown

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

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