diff --git a/cmd/rollkit/commands/run_node_test.go b/cmd/rollkit/commands/run_node_test.go index 6d7464276d..ad252af3ad 100644 --- a/cmd/rollkit/commands/run_node_test.go +++ b/cmd/rollkit/commands/run_node_test.go @@ -33,6 +33,7 @@ func TestParseFlags(t *testing.T) { "--rollkit.da_mempool_ttl", "10", "--rollkit.da_namespace", "namespace", "--rollkit.da_start_height", "100", + "--rollkit.da_keyname", "my_celes_key", "--rollkit.lazy_aggregator", "--rollkit.lazy_block_time", "2m", "--rollkit.light", @@ -84,6 +85,7 @@ func TestParseFlags(t *testing.T) { {"DAMempoolTTL", nodeConfig.DAMempoolTTL, uint64(10)}, {"DANamespace", nodeConfig.DANamespace, "namespace"}, {"DAStartHeight", nodeConfig.DAStartHeight, uint64(100)}, + {"DAKeyName", nodeConfig.DAKeyName, "my_celes_key"}, {"LazyAggregator", nodeConfig.LazyAggregator, true}, {"LazyBlockTime", nodeConfig.LazyBlockTime, 2 * time.Minute}, {"Light", nodeConfig.Light, true}, diff --git a/cmd/rollkit/docs/rollkit_start.md b/cmd/rollkit/docs/rollkit_start.md index e6473aa899..b093cafa64 100644 --- a/cmd/rollkit/docs/rollkit_start.md +++ b/cmd/rollkit/docs/rollkit_start.md @@ -36,6 +36,7 @@ rollkit start [flags] --rollkit.da_block_time duration DA chain block time (for syncing) (default 15s) --rollkit.da_gas_multiplier float DA gas price multiplier for retrying blob transactions --rollkit.da_gas_price float DA gas price for blob transactions (default -1) + --rollkit.da_keyname string DA keyring keyname to submit blob transactions --rollkit.da_mempool_ttl uint number of DA blocks until transaction is dropped from the mempool --rollkit.da_namespace string DA namespace to submit blob transactions --rollkit.da_start_height uint starting DA block height (for syncing) diff --git a/config/config.go b/config/config.go index 4fd287554e..142761df76 100644 --- a/config/config.go +++ b/config/config.go @@ -28,6 +28,8 @@ const ( FlagDAStartHeight = "rollkit.da_start_height" // FlagDANamespace is a flag for specifying the DA namespace ID FlagDANamespace = "rollkit.da_namespace" + // FlagDAKeyName is a flag to specify the key name to use for blobs submission on celestia-node + FlagDAKeyName = "rollkit.da_keyname" // FlagLight is a flag for running the node in light mode FlagLight = "rollkit.light" // FlagTrustedHash is a flag for specifying the trusted hash @@ -61,7 +63,8 @@ type NodeConfig struct { DAGasMultiplier float64 `mapstructure:"da_gas_multiplier"` // CLI flags - DANamespace string `mapstructure:"da_namespace"` + DANamespace string `mapstructure:"da_namespace"` + DAKeyName string `mapstructure:"da_keyname"` } // HeaderConfig allows node to pass the initial trusted header hash to start the header exchange service @@ -128,6 +131,7 @@ func (nc *NodeConfig) GetViperConfig(v *viper.Viper) error { nc.DANamespace = v.GetString(FlagDANamespace) nc.DAStartHeight = v.GetUint64(FlagDAStartHeight) nc.DABlockTime = v.GetDuration(FlagDABlockTime) + nc.DAKeyName = v.GetString(FlagDAKeyName) nc.BlockTime = v.GetDuration(FlagBlockTime) nc.LazyAggregator = v.GetBool(FlagLazyAggregator) nc.Light = v.GetBool(FlagLight) @@ -153,6 +157,7 @@ func AddFlags(cmd *cobra.Command) { cmd.Flags().Float64(FlagDAGasMultiplier, def.DAGasMultiplier, "DA gas price multiplier for retrying blob transactions") cmd.Flags().Uint64(FlagDAStartHeight, def.DAStartHeight, "starting DA block height (for syncing)") cmd.Flags().String(FlagDANamespace, def.DANamespace, "DA namespace to submit blob transactions") + cmd.Flags().String(FlagDAKeyName, def.DAKeyName, "DA keyring keyname to submit blob transactions") cmd.Flags().Bool(FlagLight, def.Light, "run light client") cmd.Flags().String(FlagTrustedHash, def.TrustedHash, "initial trusted hash to start the header exchange service") cmd.Flags().Uint64(FlagMaxPendingBlocks, def.MaxPendingBlocks, "limit of blocks pending DA submission (0 for no limit)") diff --git a/da/da.md b/da/da.md index 9c87cd63f7..22797a02cd 100644 --- a/da/da.md +++ b/da/da.md @@ -9,6 +9,7 @@ Rollkit provides a wrapper for [go-da][go-da], a generic data availability inter * `--rollkit.da_address`: url address of the DA service (default: "grpc://localhost:26650") * `--rollkit.da_auth_token`: authentication token of the DA service * `--rollkit.da_namespace`: namespace to use when submitting blobs to the DA service +* `--rollkit.da_keyname`: keyring keyname used when submitting blobs to the DA service (default: my_celes_key) Given a set of blocks to be submitted to DA by the block manager, the `SubmitBlocks` first encodes the blocks using protobuf (the encoded data are called blobs) and invokes the `Submit` method on the underlying DA implementation. On successful submission (`StatusSuccess`), the DA block height which included in the rollup blocks is returned.