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
2 changes: 1 addition & 1 deletion charts/sequencer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.19.1
version: 0.20.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.
Expand Down
18 changes: 9 additions & 9 deletions charts/sequencer/files/cometbft/config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"app_state": {
"native_asset_base_denomination": "{{ .Values.genesis.nativeAssetBaseDenomination }}",
"fees": {
"transfer_base_fee": {{ .Values.genesis.fees.transferBaseFee }},
"sequence_base_fee": {{ .Values.genesis.fees.sequenceBaseFee }},
"sequence_byte_cost_multiplier": {{ .Values.genesis.fees.sequenceByteCostMultiplier }},
"init_bridge_account_base_fee": {{ .Values.genesis.fees.initBridgeAccountBaseFee }},
"bridge_lock_byte_cost_multiplier": {{ .Values.genesis.fees.bridgeLockByteCostMultiplier }},
"bridge_sudo_change_fee": {{ .Values.genesis.fees.bridgeSudoChangeFee }},
"ics20_withdrawal_base_fee": {{ .Values.genesis.fees.ics20WithdrawalBaseFee }}
"transfer_base_fee": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.transferBaseFee }},
"sequence_base_fee": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.sequenceBaseFee }},
"sequence_byte_cost_multiplier": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.sequenceByteCostMultiplier }},
"init_bridge_account_base_fee": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.initBridgeAccountBaseFee }},
"bridge_lock_byte_cost_multiplier": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.bridgeLockByteCostMultiplier }},
"bridge_sudo_change_fee": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.bridgeSudoChangeFee }},
"ics20_withdrawal_base_fee": {{ include "sequencer.toUint128Proto" .Values.genesis.fees.ics20WithdrawalBaseFee }}
},
"allowed_fee_assets": [
{{- range $index, $value := .Values.genesis.allowedFeeAssets }}
{{- if $index }},{{- end }}
"{{ $value }}"
{{- end }}
],
"ibc_params": {
"ibc_parameters": {
"ibc_enabled": {{ .Values.genesis.ibc.enabled }},
"inbound_ics20_transfers_enabled": {{ .Values.genesis.ibc.inboundEnabled }},
"outbound_ics20_transfers_enabled": {{ .Values.genesis.ibc.outboundEnabled }}
Expand All @@ -30,7 +30,7 @@
{{- if $index }},{{- end }}
{
"address": {{ include "sequencer.address" $value.address }},
"balance": {{ toString $value.balance | replace "\"" "" }}
"balance": {{ include "sequencer.toUint128Proto" ( toString $value.balance | replace "\"" "" ) }}
}
{{- end }}
],
Expand Down
4 changes: 4 additions & 0 deletions charts/sequencer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ name: {{ .Values.moniker }}-sequencer-metrics
{{/* New sequencer address */}}
{{- define "sequencer.address"}}{ "bech32m": "{{ . }}" }
{{- end }}

{{/* uint64 fee converted to a astria proto Uint128 with only lo set */}}
{{- define "sequencer.toUint128Proto"}}{ "lo": {{ . }} }
{{- end }}
2 changes: 1 addition & 1 deletion crates/astria-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ base64-serde = ["dep:base64-serde"]
brotli = ["dep:brotli"]

[dev-dependencies]
astria-core = { path = ".", features = ["serde"] }
insta = { workspace = true, features = ["json"] }
rand = { workspace = true }
tempfile = { workspace = true }
astria-core = { path = ".", features = ["serde"] }
19 changes: 18 additions & 1 deletion crates/astria-core/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ use zeroize::{
ZeroizeOnDrop,
};

use crate::primitive::v1::ADDRESS_LEN;
use crate::primitive::v1::{
Address,
AddressError,
ADDRESS_LEN,
};

/// An Ed25519 signing key.
// *Implementation note*: this is currently a refinement type around
Expand Down Expand Up @@ -82,6 +86,19 @@ impl SigningKey {
pub fn address_bytes(&self) -> [u8; ADDRESS_LEN] {
self.verification_key().address_bytes()
}

/// Attempts to create an Astria bech32m `[Address]` with the given prefix.
///
/// # Errors
/// Returns an [`AddressError`] if an address could not be constructed
/// with the given prefix. Usually if the prefix was too long or contained
/// characters not allowed by bech32m.
pub fn try_address(&self, prefix: &str) -> Result<Address, AddressError> {
Address::builder()
.prefix(prefix)
.array(self.address_bytes())
.try_build()
}
}

impl Debug for SigningKey {
Expand Down
126 changes: 126 additions & 0 deletions crates/astria-core/src/generated/astria.protocol.genesis.v1alpha1.rs

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

Loading