[BUG]: EVM settlement does not validate an overridden chain_id against the configured CAIP-2 network
Maintainers usually reply within 6 days
@AyushSrivastava1818 is already working on this.
Since Nov 14, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, typescript
- Domain
- blockchain, payments
Research direction
The payload names no files, so start from the chain registry lookup and the place where the chain_id workflow input overrides it before the EVM driver is constructed. Find the driver verification path that checks the configured CAIP-2 network, then add a check that rejects a registered network paired with a conflicting chain ID before signing. Done when a mismatch is rejected, matching and unregistered-network configurations still pass, and regression tests cover all three cases.
Written by the indexing model from the issue text.
Description
Bug Description
GitPay derives the expected EVM chain ID from the chain registry but allows the chain_id workflow input to override that value without validating it against the configured CAIP-2 network.
The driver verification path validates the configured network identifier, but does not establish that the overridden numeric chain ID represents the same network.
This allows an inconsistent configuration to proceed into transaction preparation and signing.
Steps to Reproduce
Configure a real settlement with:
network:eip155:11155111chain_id:1rpc_url: A valid Sepolia RPC endpoint.- Other required inputs: Valid Sepolia settlement configuration.
The configured network and numeric chain ID now refer to different chains.
Expected Behaviour
For networks present in the chain registry, an explicitly supplied chain_id should be validated against the registry's expected chain ID.
A mismatch should be rejected before transaction signing or ledger recording.
Actual Behaviour
The supplied chain ID is accepted and used when constructing the EVM driver.
The transaction can consequently be signed for a different chain than the configured network.
The RPC endpoint may reject the transaction during broadcast. Since GitPay records the broadcasting receipt before broadcasting, this can leave the payout in an unconfirmed state requiring manual intervention.
Suggested Fix
- Resolve the expected chain ID from the chain registry.
- If the network is registered and an explicit
chain_idis supplied, reject any mismatch. - Preserve custom chain ID configuration for unregistered networks where explicitly supported.
- Verify the RPC endpoint's reported chain ID before signing.
- Add regression tests covering matching IDs, mismatched IDs and unregistered networks.
Testing
Add tests proving that a registered network cannot be paired with a conflicting chain ID, and that valid custom-network configurations remain supported.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 4
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/GitPay
-
[BUG]: Receipt ledger trusts comments from any installed bot, bypassing write permission checksMay be free again @AyushSrivastava1818 claimed this 8 days ago, and no pull request is open. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
StabilityNexus/GitPay#92 · 1 comment ·
Maintainers usually reply within 6 days
-
[BUG]: Receipt lookup stops at the first page containing a broadcasting record, missing later settlement confirmationsPossibly taken @AyushSrivastava1818 claimed this 8 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
StabilityNexus/GitPay#90 · 1 comment ·
Maintainers usually reply within 6 days
All issues in StabilityNexus/GitPay
Similar issues
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPossibly taken @anshulchikhale30-p claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comment ·
Maintainers usually reply within 1 day
-
Add: GTrekkerOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
Maintainers usually reply within 1 day
-
area: ui Bug Payload OSS
Difficulty 1/5 Under an hour Newbie friendliness 88/100
payloadcms/payload#19839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day