-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: expire all previous epochs #5279
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5279 +/- ##
======================================
- Coverage 71% 71% -0%
======================================
Files 494 496 +2
Lines 85777 86262 +485
Branches 85777 86262 +485
======================================
+ Hits 61165 61474 +309
- Misses 21878 22018 +140
- Partials 2734 2770 +36 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@j4m1ef0rd I'll make the below changes.
Will wait for @acdibble and @marcellorigotti 's inputs re. api breakage before merging.
@@ -350,7 +350,7 @@ type RpcSuspensions = Vec<(Offence, Vec<(u32, state_chain_runtime::AccountId)>)> | |||
|
|||
#[derive(Serialize, Deserialize)] | |||
pub struct RpcAuctionState { | |||
blocks_per_epoch: u32, | |||
epoch_duration: u32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is a breaking change 🙈
We could keep the old name around and flag it as deprecated... or maybe just keep the old name with a comment explaining that the name is for historical reasons...
@acdibble how much of a pain is it for you to change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fine as long as we are aware ahead of time. thanks for pointing it out
state-chain/pallets/cf-validator/src/migrations/rename_blocks_per_epoch.rs
Outdated
Show resolved
Hide resolved
state-chain/pallets/cf-validator/src/migrations/rename_blocks_per_epoch.rs
Outdated
Show resolved
Hide resolved
981c9b0
to
b311f70
Compare
What's the status on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts need to be resolved, then it should be good.
b311f70
to
b345fa9
Compare
afa14c9
to
16bc7c7
Compare
Looks like it's hitting a migration issue @j4m1ef0rd |
…waps-close-accounts * origin/main: (44 commits) fix: expire all previous epochs (#5279) feat: add/update contract swaps parameters (#5343) chore: add address to solana logging (#5353) fix: ignore dust underflows in order fills rpc (#5352) chore: consistent naming prewitnessed (#5351) feat: engine-runner verifies gpg signature of old dylib when downloaded (#5339) feat: tainted transaction reporting (#5310) bug: change_utxo not always present (#5340) feat: structured error return types for rpcs (#5346) chore: unify dependencies to root cargo.toml (#5333) feat: Submit a slot number alongside nonce (#5297) chore: use node version from `.nvmrc` 📌 (#5336) chore: add engine account_info logging (#5347) chore: replace manual scale encoding for ts-scale (#5335) chore: more consistent params in Broker API (#5342) feat: broker can encode btc smart contract call (#5329) chore: localnet recreate script can use defaults (#5338) feat: witnessing btc smart contract swaps (#5331) feat: Solana CCM fallback (#5316) fix: scale types for pending ceremonies (#5286) ... # Conflicts: # Cargo.lock # state-chain/chains/src/sol/api.rs # state-chain/pallets/cf-broadcast/src/migrations.rs # state-chain/pallets/cf-environment/Cargo.toml
Pull Request
Closes: PRO-1613
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
expire_epoch
function to recursively expire all previous epochs that had not expired yet in chronological order. This should avoid the bug stated in the issue.BlocksPerEpoch
->EpochDuration
Non-Breaking changes
I think this is non breaking, i'll let you tag it @dandanlen