Skip to content

Conversation

@joroshiba
Copy link
Member

@joroshiba joroshiba commented May 29, 2024

Summary

Updates the execution api to have celestia base height as a part of commitment instead of genesis, requiring rollups to track the base celestia height as it increases. This enables conductor on resync to move much faster.

astriaorg/astria-geth#22 contains an implementation which works with this PR.

Background

Conductor resync needs to grab all data from genesis for the rollup currently, even if much of that data is previously executed.

Changes

  • Change execution API to have celestia base height on commitment
  • Update conductor logic to update celestia base height to that of most recent firm commitment found in.

Testing

Manually tested running linked PR in dev cluster, updated blackbox tests.

Breaking Changelist

  • Execution API breaking change, rollout will require a new image for any rollup utilizing.

@github-actions github-actions bot added conductor pertaining to the astria-conductor crate proto pertaining to the Astria Protobuf spec labels May 29, 2024
@joroshiba joroshiba changed the title feat(conductor, proto)!: update celestia base heights in commitment s… feat(conductor, proto)!: celestia base heights in commitment state May 30, 2024
@joroshiba joroshiba marked this pull request as ready for review May 30, 2024 02:25
@joroshiba joroshiba requested review from a team as code owners May 30, 2024 02:25
@joroshiba joroshiba requested a review from SuperFluffy May 30, 2024 02:25
Copy link
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is not strictly necessary, but I think I would like to set the first Celestia heright that is fetched on startup to celestia_base_height.saturating_sub(celestia_variance).

Also, given that this is a breaking change anyway, can you also bump the celestia base height (and variance) to uint32/u64? It turns out that when interacting with most of their RPCs u64 is the expected width, and not u32.

@joroshiba joroshiba requested a review from a team as a code owner May 31, 2024 21:01
@joroshiba joroshiba requested a review from quasystaty1 May 31, 2024 21:01
@github-actions github-actions bot added the cd label May 31, 2024
@joroshiba
Copy link
Member Author

Looks good. This is not strictly necessary, but I think I would like to set the first Celestia heright that is fetched on startup to celestia_base_height.saturating_sub(celestia_variance).

@SuperFluffy This is intentionally not the behavior here. The base is the lowest height to look, the variance defines how far above you can go. Long term we need better logic in conductor on setting the base height. Right now this is acceptable because we never post out of order.

@joroshiba joroshiba added the docker-build used to trigger docker builds on PRs label May 31, 2024

use self::state::StateSender;

type CelestiaHeight = u64;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: doing this because it makes the update enums much more clear or what is being passed in.

Comment on lines +87 to +88
// The lowest block number of celestia chain to be searched for rollup blocks given current state
uint64 base_celestia_height = 3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this equal to the celestia height the firm block was in? it seems so from the code but want to double check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now yes, long term not necessarily. This is ok right now because sequencer relayer posts such that astria blocks are in order in celestia blocks and we have a single relayer. Long term need to add more complex logic into conductor with timestamps and acceptable time smear.

@joroshiba joroshiba added this pull request to the merge queue Jun 1, 2024
Merged via the queue into main with commit 106a81b Jun 1, 2024
@joroshiba joroshiba deleted the joroshiba/celestia-height-committment branch June 1, 2024 03:21
steezeburger added a commit that referenced this pull request Jun 5, 2024
* main:
  fix(charts): conductor configmap fix (#1146)
  feat(sequencer): add `allowed_fee_asset_ids` abci query and `sequencer_client` support (#1127)
  chore(conductor): release conductor 0.17 (#1139)
  feat: use macro to declare metric constants (#1129)
  refactor(merkle): remove source of panics in audit API (#1137)
  feat(conductor): skip outdated block metadata (#1120)
  refactor(sequencer): remove mint module (#1134)
  feat(bridge-withdrawer): add justfile (#1135)
  chore(chart): change evm back to latest on dev (#1132)
  feat(conductor, proto)!: celestia base heights in commitment state (#1121)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cd conductor pertaining to the astria-conductor crate docker-build used to trigger docker builds on PRs proto pertaining to the Astria Protobuf spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants