Skip to content

Commit

Permalink
Gj/fix ob initial sync (#975)
Browse files Browse the repository at this point in the history
## Describe your changes

Working state keep track of LMP epochs causing checkpoint based initial
sync to not work.
This PR removes LMP epoch from working state.
  • Loading branch information
Gauthamastro authored Jul 9, 2024
2 parents 4186d4e + ae20b78 commit 071b1f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pallets/ocex/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,14 +658,17 @@ impl<T: Config> Pallet<T> {
return Err("Invalid egress message for withdraw trading fees");
}
},
IngressMessages::NewLMPEpoch(epoch) => Self::start_new_lmp_epoch(state, epoch)?,
IngressMessages::NewLMPEpoch(_epoch) => {
// Self::start_new_lmp_epoch(state, epoch)?
},
_ => {},
}
}
state_info.last_block = blk.saturated_into();
Ok(verified_egress_messages)
}

#[allow(dead_code)]
/// Reset the offchain state's LMP index and set the epoch
fn start_new_lmp_epoch(state: &mut OffchainState, epoch: u16) -> Result<(), &'static str> {
let mut config = if epoch > 1 {
Expand Down
2 changes: 1 addition & 1 deletion runtimes/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 369,
spec_version: 370,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down

0 comments on commit 071b1f9

Please sign in to comment.