feat: add block time config in reward supplier#67
Conversation
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on @NirLevi-starkware)
src/reward_supplier/interface.cairo line 123 at r1 (raw file):
/// Configuration for block duration calculation. #[derive(Debug, Copy, Drop, Serde, PartialEq, starknet::Store)] pub struct BlockDurationConfig {
Do we prefer tuple?
7b07058 to
b29228c
Compare
ea1ad7f to
b28368c
Compare
b6dd1db to
313688c
Compare
b28368c to
37e67c7
Compare
1adf198 to
76687b8
Compare
37e67c7 to
d82b3d1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
==========================================
+ Coverage 95.78% 95.81% +0.02%
==========================================
Files 42 42
Lines 10299 10342 +43
==========================================
+ Hits 9865 9909 +44
+ Misses 434 433 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
remollemo
left a comment
There was a problem hiding this comment.
@remollemo reviewed 6 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on NirLevi-starkware and noa-starkware).
src/reward_supplier/interface.cairo line 123 at r1 (raw file):
Previously, noa-starkware wrote…
Do we prefer tuple?
i think a struct is good.
d82b3d1 to
fb344f6
Compare

This change is
Note
Medium Risk
Adds new on-chain configuration and a governor-only setter to the
RewardSupplier, changing contract storage/ABI and introducing new validation paths that could impact reward calculations if misconfigured.Overview
Adds configurable block-duration bounds to
RewardSupplier. Introduces a storedBlockDurationConfig(with defaults) plus newget_block_duration_configand governor-onlyset_block_duration_configentrypoints, including validation and a newINVALID_MIN_MAX_BLOCK_DURATIONerror.Updates deployment/test utilities to provision the app-governor role for the reward supplier, adds contract tests for the new getter/setter and their access-control/validation behavior, and documents the new API/types/errors in
docs/spec.md.Written by Cursor Bugbot for commit fb344f6. This will update automatically on new commits. Configure here.