Skip to content

fix: add era replay guard for rewards submissions#477

Merged
stiiifff merged 6 commits into
mainfrom
fix/replay-reward-submission
Apr 17, 2026
Merged

fix: add era replay guard for rewards submissions#477
stiiifff merged 6 commits into
mainfrom
fix/replay-reward-submission

Conversation

@ahmadkaouk
Copy link
Copy Markdown
Contributor

@ahmadkaouk ahmadkaouk commented Mar 18, 2026

Summary

  • guard DataHavenServiceManager.submitRewards by (startTimestamp, duration, token) so each reward window can only be submitted once per token
  • expose the replay-guard state and error in the interface, add Foundry coverage, wire the missing runtime std features, and regenerate the Wagmi/storage/state-diff artifacts
  • fix the local slash E2E path by aligning the anvil Snowbridge messageOrigin with stagenet-local, refreshing the tracked anvil deployment metadata, and waiting for ServiceManager.SlashingComplete

Testing

  • cargo fmt --all -- --check
  • forge test --match-contract RewardsSubmitterTest
  • forge test --match-contract StorageLayoutTest -vvv
  • ./scripts/check-storage-layout.sh
  • ./scripts/check-storage-layout-negative.sh
  • bun ./scripts/check-generated-state.ts
  • bun generate:wagmi
  • bun test ./e2e/suites/slash.test.ts --timeout 1200000 --test-name-pattern "verify we have the agent origin set|Activate slashing|use sudo to slash operator"

Notes

  • Slash E2E verification reran the previously failing sudo slash path; the long liveness scenario was not rerun end to end.

…mission

# Conflicts:
#	contracts/deployments/state-diff.checksum
#	contracts/deployments/state-diff.json
#	test/contract-bindings/generated.ts
@ahmadkaouk ahmadkaouk added B9-contractsnoteworthy Changes should be noted in any contracts-upgrade release notes not-breaking Does not need to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Apr 15, 2026
@ahmadkaouk ahmadkaouk marked this pull request as ready for review April 16, 2026 09:21
@ahmadkaouk ahmadkaouk requested review from a team as code owners April 16, 2026 09:21
@stiiifff stiiifff merged commit edcb13d into main Apr 17, 2026
22 checks passed
@stiiifff stiiifff deleted the fix/replay-reward-submission branch April 17, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B9-contractsnoteworthy Changes should be noted in any contracts-upgrade release notes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited not-breaking Does not need to be mentioned in breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants