Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/evm-rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.24.0
version: 0.25.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.13.0"
appVersion: "0.14.0"

dependencies:
- name: celestia-node
Expand Down
2 changes: 1 addition & 1 deletion charts/evm-rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ images:
geth:
repo: ghcr.io/astriaorg/astria-geth
tag: 0.13.0
devTag: latest
devTag: pr-38
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double-checking -- is this tag for all of development intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was intentional since this PR is dependent on astria-geth #38. @joroshiba suggested waiting until this PR merges, updating geth PR with latest protos and merging, then making a monorepo cleanup PR to update devTag to latest.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, because we have proto changes here that needs geth update, it gets a little weird here:

  1. get this pr submitted which pushes prod proto changes
  2. update pr-38 of geth to utilize new main proto libraries, update and submit.
  3. update mono repo back to latest.

A bit of chicken/egg problem here. My preference is to keep astria-geth main from relying on non-main protos. We should wait to submit PR here until pr-38 is reviewed and approved though so we don't end up out of sync.

conductor:
repo: ghcr.io/astriaorg/conductor
tag: "0.18.0"
Expand Down
6 changes: 3 additions & 3 deletions charts/evm-stack/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: evm-rollup
repository: file://../evm-rollup
version: 0.24.0
version: 0.25.0
- name: composer
repository: file://../composer
version: 0.1.0
Expand All @@ -17,5 +17,5 @@ dependencies:
- name: blockscout-stack
repository: https://blockscout.github.io/helm-charts
version: 1.6.2
digest: sha256:ee596bb8a69b90fdd2e7ee183b8c5f1db9ad9990f5e57de20abd3f5986e4b8a0
generated: "2024-07-19T12:21:39.271691+02:00"
digest: sha256:0ff9226aede13d1e76e583a32b2902483dc06b3df81ac7940d3c2e9ae360cdf0
generated: "2024-07-23T19:34:13.143403-05:00"
4 changes: 2 additions & 2 deletions charts/evm-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

dependencies:
- name: evm-rollup
version: 0.24.0
version: 0.25.0
repository: "file://../evm-rollup"
- name: composer
version: 0.1.0
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-conductor/src/executor/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ mod tests {
}

fn make_genesis_info() -> GenesisInfo {
let rollup_id = RollupId::new([24; 32]);
GenesisInfo::try_from_raw(raw::GenesisInfo {
rollup_id: vec![24; 32].into(),
rollup_id: Some(rollup_id.to_raw()),
sequencer_genesis_block_height: 10,
celestia_block_variance: 0,
})
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-conductor/src/executor/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn make_state(
}: MakeState,
) -> (StateSender, StateReceiver) {
let genesis_info = GenesisInfo::try_from_raw(raw::GenesisInfo {
rollup_id: Bytes::copy_from_slice(ROLLUP_ID.as_ref()),
rollup_id: Some(ROLLUP_ID.to_raw()),
sequencer_genesis_block_height: 1,
celestia_block_variance: 1,
})
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-conductor/tests/blackbox/helpers/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ macro_rules! genesis_info {
$variance:expr $(,)?
) => {
::astria_core::generated::execution::v1alpha2::GenesisInfo {
rollup_id: ::bytes::Bytes::from($crate::ROLLUP_ID.to_vec()),
rollup_id: Some($crate::ROLLUP_ID.to_raw()),
sequencer_genesis_block_height: $sequencer_height,
celestia_block_variance: $variance,
}
Expand Down
15 changes: 12 additions & 3 deletions crates/astria-core/src/execution/v1alpha2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ impl GenesisInfoError {
fn incorrect_rollup_id_length(inner: IncorrectRollupIdLength) -> Self {
Self(GenesisInfoErrorKind::IncorrectRollupIdLength(inner))
}

fn no_rollup_id() -> Self {
Self(GenesisInfoErrorKind::NoRollupId)
}
}

#[derive(Debug, thiserror::Error)]
enum GenesisInfoErrorKind {
#[error("`rollup_id` field did not contain a valid rollup ID")]
#[error("`rollup_id` field contained an invalid rollup ID")]
IncorrectRollupIdLength(IncorrectRollupIdLength),
#[error("`rollup_id` was not set")]
NoRollupId,
}

/// Genesis Info required from a rollup to start an execution client.
Expand Down Expand Up @@ -81,8 +87,11 @@ impl Protobuf for GenesisInfo {
sequencer_genesis_block_height,
celestia_block_variance,
} = raw;
let Some(rollup_id) = rollup_id else {
return Err(Self::Error::no_rollup_id());
};
let rollup_id =
RollupId::try_from_slice(rollup_id).map_err(Self::Error::incorrect_rollup_id_length)?;
RollupId::try_from_raw(rollup_id).map_err(Self::Error::incorrect_rollup_id_length)?;

Ok(Self {
rollup_id,
Expand All @@ -104,7 +113,7 @@ impl Protobuf for GenesisInfo {
under the hood",
);
Self::Raw {
rollup_id: Bytes::copy_from_slice(rollup_id.as_ref()),
rollup_id: Some(rollup_id.to_raw()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that there is also into_raw. They do the same thing here, so it doesn't matter. But sometimes taking owernship allows some optimizations (like avoiding another allocation... if one remembers to implement it that way).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it! So for future reference if something is not a shared object then into_raw() may be a better choice?

Copy link
Member

Choose a reason for hiding this comment

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

I'll note that this is within a to_raw function. I have generally tried to keep the to_raw calling other to_raw and vice versa.

sequencer_genesis_block_height,
celestia_block_variance: *celestia_block_variance,
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = 'proto3';

package astria.execution.v1alpha2;

import "astria/primitive/v1/types.proto";
import "astria/sequencerblock/v1alpha1/block.proto";
import "google/protobuf/timestamp.proto";

Expand All @@ -11,7 +12,7 @@ import "google/protobuf/timestamp.proto";
// use from the Astria & Celestia networks.
message GenesisInfo {
// The rollup_id is the unique identifier for the rollup chain.
bytes rollup_id = 1;
astria.primitive.v1.RollupId rollup_id = 1;
// The first block height of sequencer chain to use for rollup transactions.
uint32 sequencer_genesis_block_height = 2;
// The allowed variance in celestia for sequencer blocks to have been posted.
Expand Down