feat: decouple testnet and testing config#1109
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughAdds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@crates/types/src/config/consensus.rs`:
- Around line 803-806: The block_reward_config currently hard-codes
half_life_secs; change it to compute the value from the existing constants (e.g.
HALF_LIFE_YEARS and SECS_PER_YEAR) instead of the literal 126144000. Update the
BlockRewardConfig initialization (field half_life_secs) to compute
(HALF_LIFE_YEARS * SECS_PER_YEAR).try_into().unwrap() or the equivalent
conversion used elsewhere in mainnet/testing so the half-life stays in sync with
the project constants.
- Around line 808-812: The comment describing the testnet hardfork configuration
is stale (says "1 proof") while the code sets number_of_ingress_proofs_total: 3
in the IrysHardforkConfig -> FrontierParams block; update the comment to reflect
the actual configured value (3) or change number_of_ingress_proofs_total to 1 to
match the comment, and ensure the comment adjacent to FrontierParams /
IrysHardforkConfig mentions the chosen proof count consistently.
In `@crates/types/src/storage_pricing.rs`:
- Around line 1437-1447: The test computes bytes_to_store before updating
config.chunk_size, so bytes_to_store captures the old value (32) instead of the
intended 262144; move or recompute the bytes_to_store assignment to after the
config.chunk_size change (i.e., after setting config.chunk_size = 262144) so
that the variable used in the test (bytes_to_store) reflects the updated chunk
size in the ConsensusConfig used by the test functions like
number_of_ingress_proofs_total_at and any subsequent assertions.
- Around line 2161-2162: Remove the debug-only logging call dbg!(&config); from
the test code in storage_pricing.rs (delete the dbg!(&config); line); if you
need non-noisy diagnostics keep a proper logger call (e.g., tracing::debug!)
behind a feature or test-only flag, but otherwise simply remove dbg!(&config) so
tests no longer emit debug output.
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@crates/types/src/config/consensus.rs`:
- Around line 816-822: Replace the convoluted deserialization of the hardcoded
Aurora activation timestamp by constructing it directly with
UnixTimestamp::from_secs (use the same approach as testing()), i.e., set
Aurora.activation_timestamp via UnixTimestamp::from_secs(<seconds>) instead of
calling unix_timestamp_string_serde::deserialize with StringDeserializer; also
remove the now-unused StringDeserializer import if it’s no longer referenced.
3 tasks
This was referenced Mar 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the changes
Decouples the testnet and testing consensus configuration, and updates the testnet configuration to mirror the actual configuration used on testnet.
Related Issue(s)
Please link to the issue(s) that will be closed with this PR.
Checklist
Additional Context
Add any other context about the pull request here.
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.