Skip to content
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

feat(proto, conductor, cd)!: changes for Forma migration #1843

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d8b9778
proto changes, add stop/restart logic
ethanoroshiba Dec 3, 2024
fdbe302
add soft and firm test, update change log and valus
ethanoroshiba Dec 3, 2024
30bd915
version updates
ethanoroshiba Dec 3, 2024
ff9ad8c
update chart.lock
ethanoroshiba Dec 3, 2024
af132a1
add rollup_start_block_height field to GenesisInfo
ethanoroshiba Dec 4, 2024
59456a4
update height mapping calculation, flush out tests
ethanoroshiba Dec 4, 2024
afc2499
geth devtag
ethanoroshiba Dec 5, 2024
f7c9682
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Dec 5, 2024
90b1f11
fix height logic
ethanoroshiba Dec 9, 2024
2a3ca48
rustfmt
ethanoroshiba Dec 9, 2024
581424f
charts changes to reflect changes in geth
ethanoroshiba Dec 10, 2024
36572d0
fix extraDataOverride naming
ethanoroshiba Dec 10, 2024
6e790c1
remove rollup start height from geth config
ethanoroshiba Dec 10, 2024
5e562e4
fix erroneous doc comment
ethanoroshiba Dec 12, 2024
8988c88
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Dec 13, 2024
d971d5c
stop height of 0 means do not stop
mycodecrafting Dec 13, 2024
fa7474c
Merge branch 'ENG-1031/forma_migration' of https://github.com/astriao…
ethanoroshiba Dec 13, 2024
fa7af2a
charts updates
ethanoroshiba Dec 13, 2024
ea80fbb
fix charts
ethanoroshiba Dec 13, 2024
22edac8
Fix values
ethanoroshiba Dec 13, 2024
2f7ed73
requested changes and fix ibc tests
ethanoroshiba Dec 13, 2024
9f0deb6
genesis improvements, new smoke test
ethanoroshiba Dec 16, 2024
1b93dfb
fix values.yaml
ethanoroshiba Dec 16, 2024
2283672
add values
ethanoroshiba Dec 16, 2024
3a73489
fix devTag
ethanoroshiba Dec 16, 2024
483aa39
update specs
ethanoroshiba Jan 3, 2025
680d984
add preliminary to GenesisInfo
ethanoroshiba Jan 6, 2025
00b10a4
use enum to propagate exit reason instead of errors
ethanoroshiba Jan 6, 2025
02d04d7
add halt logic
ethanoroshiba Jan 6, 2025
af7ebd0
rustfmt
ethanoroshiba Jan 6, 2025
e890e64
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Jan 6, 2025
b1fcb29
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Jan 23, 2025
ffa43b6
make stop block height inclusive
ethanoroshiba Jan 23, 2025
b7d18d8
update chart.lock
ethanoroshiba Jan 23, 2025
d2031df
bump chart version
ethanoroshiba Jan 23, 2025
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion charts/evm-rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version: 1.0.1
# 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: "1.0.0"
appVersion: "1.0.1"

maintainers:
- name: wafflesvonmaple
Expand Down
37 changes: 27 additions & 10 deletions charts/evm-rollup/files/genesis/geth-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,37 @@
{{- range $key, $value := .Values.genesis.extra }}
"{{ $key }}": {{ toPrettyJson $value | indent 8 | trim }},
{{- end }}
{{- if .Values.genesis.extraDataOverride }}
"astriaExtraDataOverride": "{{ .Values.genesis.extraDataOverride }}",
{{- end }}
"astriaOverrideGenesisExtraData": {{ .Values.genesis.overrideGenesisExtraData }},
"astriaSequencerInitialHeight": {{ toString .Values.genesis.sequencerInitialHeight | replace "\"" "" }},
"astriaRollupName": "{{ tpl .Values.genesis.rollupName . }}",
"astriaCelestiaInitialHeight": {{ toString .Values.genesis.celestiaInitialHeight | replace "\"" "" }},
"astriaCelestiaHeightVariance": {{ toString .Values.genesis.celestiaHeightVariance | replace "\"" "" }},
"astriaBridgeAddresses": {{ toPrettyJson .Values.genesis.bridgeAddresses | indent 8 | trim }},
"astriaFeeCollectors": {{ toPrettyJson .Values.genesis.feeCollectors | indent 8 | trim }},
"astriaEIP1559Params": {{ toPrettyJson .Values.genesis.eip1559Params | indent 8 | trim }},
"astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}"
{{- if not .Values.global.dev }}
{{- else }}
"astriaForks": {
"genesis": {
"height": {{ toString .Values.genesis.forks.genesis.height | replace "\"" "" }},
"halt": {{ toString .Values.genesis.forks.genesis.halt | replace "\"" "" }},
"snapshotChecksum": {{ toString .Values.genesis.forks.genesis.snapshotChecksum | replace "\"" "" }},
{{- if .Values.genesis.forks.genesis.extraDataOverride }}
"extraDataOverride": {{ toString .Values.genesis.forks.genesis.extraDataOverride }},
{{- end }}
"feeCollector": {{ toString .Values.genesis.forks.genesis.feeCollector | replace "\"" "" }},
"EIP1559Params": {{ toPrettyJson .Values.genesis.forks.genesis.eip1559Params | indent 8 | trim }},
"sequencer": {
"chainId": {{ toString .Values.genesis.forks.genesis.sequencerChainId | replace "\"" "" }},
"addressPrefix": {{ toString .Values.genesis.forks.genesis.sequencerAddressPrefix | replace "\"" "" }},
"startHeight": {{ toString .Values.genesis.forks.genesis.sequencerStartHeight | replace "\"" "" }},
"stopHeight": {{ toString .Values.genesis.forks.genesis.sequencerStopHeight | replace "\"" "" }},
},
"celestia": {
"chainId": {{ toString .Values.genesis.forks.genesis.celestiaChainId | replace "\"" "" }},
"startHeight": {{ toString .Values.genesis.forks.genesis.celestiaStartHeight | replace "\"" "" }},
"heightVariance": {{ toString .Values.genesis.forks.genesis.celestiaHeightVariance | replace "\"" "" }},
},
"bridgeAddresses": {{ toPrettyJson .Values.genesis.forks.genesisbridgeAddresses | indent 8 | trim }},
}
{{- if .Values.genesis.forks.additionalForks }}
{{ toPrettyJson .Values.genesis.forks.additionalForks | indent 8 | trim }}
{{- end }}
},
{{- end }}
},
"difficulty": "0",
Expand Down
2 changes: 0 additions & 2 deletions charts/evm-rollup/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ metadata:
data:
ASTRIA_CONDUCTOR_LOG: "astria_conductor={{ .Values.config.logLevel }}"
ASTRIA_CONDUCTOR_CELESTIA_NODE_HTTP_URL: "{{ .Values.config.celestia.rpc }}"
ASTRIA_CONDUCTOR_EXPECTED_CELESTIA_CHAIN_ID: "{{ tpl .Values.config.conductor.celestiaChainId . }}"
ASTRIA_CONDUCTOR_CELESTIA_BEARER_TOKEN: "{{ .Values.config.celestia.token }}"
ASTRIA_CONDUCTOR_CELESTIA_BLOCK_TIME_MS: "{{ .Values.config.conductor.celestiaBlockTimeMs }}"
ASTRIA_CONDUCTOR_EXECUTION_RPC_URL: "http://127.0.0.1:{{ .Values.ports.executionGRPC }}"
ASTRIA_CONDUCTOR_EXECUTION_COMMIT_LEVEL: "{{ .Values.config.conductor.executionCommitLevel }}"
ASTRIA_CONDUCTOR_SEQUENCER_GRPC_URL: "{{ tpl .Values.config.conductor.sequencerGrpc . }}"
ASTRIA_CONDUCTOR_SEQUENCER_COMETBFT_URL: "{{ tpl .Values.config.conductor.sequencerRpc . }}"
ASTRIA_CONDUCTOR_EXPECTED_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.conductor.sequencerChainId . }}"
ASTRIA_CONDUCTOR_SEQUENCER_BLOCK_TIME_MS: "{{ .Values.config.conductor.sequencerBlockTimeMs }}"
ASTRIA_CONDUCTOR_NO_METRICS: "{{ not .Values.metrics.enabled }}"
ASTRIA_CONDUCTOR_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.conductorMetrics }}"
Expand Down
100 changes: 55 additions & 45 deletions charts/evm-rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,79 @@ images:
repo: ghcr.io/astriaorg/astria-geth
pullPolicy: IfNotPresent
tag: 1.0.0
devTag: latest
devTag: pr-59
overrideTag: ""
conductor:
repo: ghcr.io/astriaorg/conductor
pullPolicy: IfNotPresent
tag: 1.0.0
tag: 1.0.1
devTag: latest


genesis:
## These values are used to configure the genesis block of the rollup chain
## no defaults as they are unique to each chain

# The name of the rollup chain, used to generate the Rollup ID
rollupName: ""
# Block height to start syncing rollup from, lowest possible is 2
sequencerInitialHeight: ""
# The first Celestia height to utilize when looking for rollup data
celestiaInitialHeight: ""
# The variance in Celestia height to allow before halting the chain
celestiaHeightVariance: ""
# Will fill the extra data in each block, can be left empty
# can also fill with something unique for your chain.
extraDataOverride: ""

# The "forks" for upgrading the chain. Contains necessary information for starting
# and, if desired, restarting the chain at a given height. The necessary fields
# for the genesis fork are provided, and additional forks can be added as needed.
forks:
## These values are used to configure the genesis block of the rollup chain
## no defaults as they are unique to each chain
genesis:
# The block height to start the chain at, 0 for genesis
height: "0"
# Whether to halt the rollup chain at the given height. False for genesis
halt: "false"
# Checksum of the snapshot to use upon restart
snapshotChecksum: ""
# Will fill the extra data in each block, can be left empty
# can also fill with something unique for your chain.
extraDataOverride: ""
# Configure the fee collector for the evm tx fees, activated at block heights.
# If not configured, all tx fees will be burned.
feeCollector: ""
# 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
# Configure EIP-1559 params, activated at block heights.
eip1559Params: {}
# 1:
# minBaseFee: 0
# elasticityMultiplier: 2
# baseFeeChangeDenominator: 8
# The chain id of the sequencer chain
sequencerChainId: ""
# The hrp for bech32m addresses, unlikely to be changed
sequencerAddressPrefix: "astria"
# Block height to start syncing rollup from, lowest possible is 2
sequencerStartHeight: ""
# Block height (on sequencer) to stop syncing rollup at, continuing to next configuration fork
sequencerStopHeight: ""
# The chain id of the celestia chain
celestiaChainId: ""
# The first Celestia height to utilize when looking for rollup data
celestiaStartHeight: ""
# The variance in Celestia height to allow before halting the chain
celestiaHeightVariance: ""
# Configure the sequencer bridge addresses and allowed assets if using
# the astria canonical bridge. Recommend removing alloc values if so.
bridgeAddresses: []
# - address: "684ae50c49a434199199c9c698115391152d7b3f"
# startHeight: 1
# assetDenom: "nria"
# senderAddress: "0x0000000000000000000000000000000000000000"
# assetPrecision: 9
# JSON object with any additional desired forks. Can be used with any or all
# of the above fields. Any fields left empty will be populated with the previous
# fork's values.
additionalForks: {}

## These are general configuration values with some recommended defaults

# Configure the gas Limit
gasLimit: "50000000"
# If set to true the genesis block will contain extra data
overrideGenesisExtraData: true
# The hrp for bech32m addresses, unlikely to be changed
sequencerAddressPrefix: "astria"

## These values are used to configure astria native bridging
## Many of the fields have commented out example fields

# Configure the sequencer bridge addresses and allowed assets if using
# the astria canonical bridge. Recommend removing alloc values if so.
bridgeAddresses: []
# - address: "684ae50c49a434199199c9c698115391152d7b3f"
# startHeight: 1
# assetDenom: "nria"
# senderAddress: "0x0000000000000000000000000000000000000000"
# assetPrecision: 9


## Fee configuration

# Configure the fee collector for the evm tx fees, activated at block heights.
# If not configured, all tx fees will be burned.
feeCollectors: {}
# 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
# Configure EIP-1559 params, activated at block heights
eip1559Params: {}
# 1:
# minBaseFee: 0
# elasticityMultiplier: 2
# baseFeeChangeDenominator: 8

## Standard Eth Genesis config values
# An EVM chain number id, different from the astria rollup name
Expand Down Expand Up @@ -167,8 +181,6 @@ config:
# - "FirmOnly" -> blocks are only pulled from DA
# - "SoftAndFirm" -> blocks are pulled from both the sequencer and DA
executionCommitLevel: 'SoftAndFirm'
# The chain id of the Astria sequencer chain conductor communicates with
sequencerChainId: ""
# The expected fastest block time possible from sequencer, determines polling
# rate.
sequencerBlockTimeMs: 2000
Expand All @@ -180,8 +192,6 @@ config:
sequencerGrpc: ""
# The maximum number of requests to make to the sequencer per second
sequencerRequestsPerSecond: 500
# The chain id of the celestia network the conductor communicates with
celestiaChainId: ""

celestia:
# if config.rollup.executionLevel is NOT 'SoftOnly' AND celestia-node is not enabled
Expand Down
3 changes: 0 additions & 3 deletions charts/evm-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ global:
rollupName: ""
evmChainId: ""
sequencerChainId: ""
celestiaChainId: ""
otel:
endpoint: ""
tracesEndpoint: ""
Expand All @@ -29,8 +28,6 @@ evm-rollup:
chainId: "{{ .Values.global.evmChainId }}"
config:
conductor:
sequencerChainId: "{{ .Values.global.sequencerChainId }}"
celestiaChainId: "{{ .Values.global.celestiaChainId }}"
sequencerRpc: "{{ .Values.global.sequencerRpc }}"
sequencerGrpc: "{{ .Values.global.sequencerGrpc }}"
otel:
Expand Down
2 changes: 2 additions & 0 deletions crates/astria-conductor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Add stop height logic, remove chain id env vars, accomodate new genesis info
shape [#1843](https://github.com/astriaorg/astria/pull/1843).
- Bump penumbra dependencies [#1740](https://github.com/astriaorg/astria/pull/1740).

## [1.0.0-rc.2] - 2024-10-23
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-conductor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]

Check warning on line 1 in crates/astria-conductor/Cargo.toml

View workflow job for this annotation

GitHub Actions / conductor / rust-version-release

New Conductor Release

This PR updates the version of conductor. After merging a new release 1.0.1 will be created with tag conductor-v1.0.1.
name = "astria-conductor"
version = "1.0.0"
version = "1.0.1"
edition = "2021"
rust-version = "1.81.0"
license = "MIT OR Apache-2.0"
Expand Down
6 changes: 0 additions & 6 deletions crates/astria-conductor/local.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ ASTRIA_CONDUCTOR_SEQUENCER_BLOCK_TIME_MS=2000
# CometBFT node.
ASTRIA_CONDUCTOR_SEQUENCER_REQUESTS_PER_SECOND=500

# The chain ID of the sequencer network the conductor should be communicating with.
ASTRIA_CONDUCTOR_EXPECTED_SEQUENCER_CHAIN_ID="test-sequencer-1000"

# The chain ID of the Celestia network the conductor should be communicating with.
ASTRIA_CONDUCTOR_EXPECTED_CELESTIA_CHAIN_ID="test-celestia-1000"

# Set to true to enable prometheus metrics.
ASTRIA_CONDUCTOR_NO_METRICS=true

Expand Down
6 changes: 0 additions & 6 deletions crates/astria-conductor/src/celestia/builder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Boilerplate to construct a [`super::Reader`] via a type-state builder.

Check warning on line 1 in crates/astria-conductor/src/celestia/builder.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

use std::time::Duration;

Expand All @@ -23,8 +23,6 @@
pub(crate) executor: executor::Handle,
pub(crate) sequencer_cometbft_client: SequencerClient,
pub(crate) sequencer_requests_per_second: u32,
pub(crate) expected_celestia_chain_id: String,
pub(crate) expected_sequencer_chain_id: String,
pub(crate) shutdown: CancellationToken,
pub(crate) metrics: &'static Metrics,
}
Expand All @@ -39,8 +37,6 @@
executor,
sequencer_cometbft_client,
sequencer_requests_per_second,
expected_celestia_chain_id,
expected_sequencer_chain_id,
shutdown,
metrics,
} = self;
Expand All @@ -54,8 +50,6 @@
executor,
sequencer_cometbft_client,
sequencer_requests_per_second,
expected_celestia_chain_id,
expected_sequencer_chain_id,
shutdown,
metrics,
})
Expand Down
34 changes: 14 additions & 20 deletions crates/astria-conductor/src/celestia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{

Check warning on line 1 in crates/astria-conductor/src/celestia/mod.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.
cmp::max,
sync::Arc,
time::Duration,
Expand Down Expand Up @@ -141,12 +141,6 @@
/// (usually to verify block data retrieved from Celestia blobs).
sequencer_requests_per_second: u32,

/// The chain ID of the Celestia network the reader should be communicating with.
expected_celestia_chain_id: String,

/// The chain ID of the Sequencer the reader should be communicating with.
expected_sequencer_chain_id: String,

/// Token to listen for Conductor being shut down.
shutdown: CancellationToken,

Expand Down Expand Up @@ -178,45 +172,45 @@
async fn initialize(
&mut self,
) -> eyre::Result<((), executor::Handle<StateIsInit>, tendermint::chain::Id)> {
let executor = self
.executor
.wait_for_init()
.await
.wrap_err("handle to executor failed while waiting for it being initialized")?;

let validate_celestia_chain_id = async {
let actual_celestia_chain_id = get_celestia_chain_id(&self.celestia_client)
.await
.wrap_err("failed to fetch Celestia chain ID")?;
let expected_celestia_chain_id = &self.expected_celestia_chain_id;
let expected_celestia_chain_id = executor.celestia_chain_id();
ensure!(
self.expected_celestia_chain_id == actual_celestia_chain_id.as_str(),
expected_celestia_chain_id == actual_celestia_chain_id.as_str(),
"expected Celestia chain id `{expected_celestia_chain_id}` does not match actual: \
`{actual_celestia_chain_id}`"
);
Ok(())
};

let wait_for_init_executor = async {
self.executor
.wait_for_init()
.await
.wrap_err("handle to executor failed while waiting for it being initialized")
};

let get_and_validate_sequencer_chain_id = async {
let actual_sequencer_chain_id =
get_sequencer_chain_id(self.sequencer_cometbft_client.clone())
.await
.wrap_err("failed to get sequencer chain ID")?;
let expected_sequencer_chain_id = &self.expected_sequencer_chain_id;
let expected_sequencer_chain_id = executor.sequencer_chain_id();
ensure!(
self.expected_sequencer_chain_id == actual_sequencer_chain_id.to_string(),
expected_sequencer_chain_id == actual_sequencer_chain_id.to_string(),
"expected Celestia chain id `{expected_sequencer_chain_id}` does not match \
actual: `{actual_sequencer_chain_id}`"
);
Ok(actual_sequencer_chain_id)
};

try_join!(
let ((), sequencer_chain_id) = try_join!(
validate_celestia_chain_id,
wait_for_init_executor,
get_and_validate_sequencer_chain_id
)
)?;

Ok(((), executor, sequencer_chain_id))
}
}

Expand Down
Loading
Loading