HotShot icon indicating copy to clipboard operation
HotShot copied to clipboard

Make BlockPayload::from_transactions async and pass ValidatedState

Open imabdulbasit opened this issue 9 months ago • 0 comments

The BlockPayload::from_transactions function takes an Instance parameter, which contains ChainConfig on the sequencer side. To support updates to ChainConfig, we need to add it to a mutable ValidatedState. This requires the function to accept an additional ValidatedState parameter. When the chainconfig commitment does not match the instance chainconfig, this function on the sequencer side will do catchup from the peers (GET request) to get the updated ChainConfig so it needs to be async.

This PR:

  • adds ValidatedState parameter to BlockPayload::from_transactions
  • makes the from_transactions fn async

https://github.com/EspressoSystems/espresso-sequencer/issues/1475 https://github.com/EspressoSystems/espresso-sequencer/pull/1492#issuecomment-2127412305

imabdulbasit avatar May 24 '24 00:05 imabdulbasit