Skip to content

Commit

Permalink
Add flags and fix small issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferret-san committed Jun 6, 2024
1 parent a0cf332 commit c9ab8b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions arbnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func ConfigAddOptions(prefix string, f *flag.FlagSet, feedInputEnable bool, feed
DangerousConfigAddOptions(prefix+".dangerous", f)
TransactionStreamerConfigAddOptions(prefix+".transaction-streamer", f)
MaintenanceConfigAddOptions(prefix+".maintenance", f)
celestia.CelestiaDAConfigAddOptions(prefix+".celestia-cfg", f)
}

var ConfigDefault = Config{
Expand Down
2 changes: 1 addition & 1 deletion contracts
6 changes: 4 additions & 2 deletions das/celestia/celestia.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ type CelestiaProver struct {

func CelestiaDAConfigAddOptions(prefix string, f *pflag.FlagSet) {
f.Bool(prefix+".enable", false, "Enable Celestia DA")
f.Float64(prefix+".gas-price", 0.1, "Gas for Celestia transactions")
f.Float64(prefix+".gas-price", 0.01, "Gas for retrying Celestia transactions")
f.Float64(prefix+".gas-multiplier", 1.01, "Gas multiplier for Celestia transactions")
f.String(prefix+".rpc", "", "Rpc endpoint for celestia-node")
f.String(prefix+".namespace-id", "", "Celestia Namespace to post data to")
f.String(prefix+".auth-token", "", "Auth token for Celestia Node")
f.Bool(prefix+".noop-writer", false, "Noop writer (disable posting to celestia)")
f.String(prefix+".validator-config"+".tendermint-rpc", "", "Tendermint RPC endpoint, only used for validation")
f.String(prefix+".validator-config"+".eth-rpc", "", "L1 Websocket connection, only used for validation")
f.String(prefix+".validator-config"+".blobstream", "", "Blobstream address, only used for validation")
Expand Down Expand Up @@ -199,7 +201,7 @@ func (c *CelestiaDA) Store(ctx context.Context, message []byte) ([]byte, error)
height, err = c.Client.Blob.Submit(ctx, []*blob.Blob{dataBlob}, gasPrice)
if err != nil {
switch {
case strings.Contains(err.Error(), ErrTxTimedout.Error()), strings.Contains(err.Error(), ErrTxAlreadyInMempool.Error()), strings.Contains(err.Error(), err.Error(), ErrTxIncorrectAccountSequence.Error()):
case strings.Contains(err.Error(), ErrTxTimedout.Error()), strings.Contains(err.Error(), ErrTxAlreadyInMempool.Error()), strings.Contains(err.Error(), ErrTxIncorrectAccountSequence.Error()):
log.Warn("Failed to submit blob, bumping gas price and retrying...", "err", err)
if gasPrice == -1.0 {
gasPrice = c.Cfg.GasPrice
Expand Down

0 comments on commit c9ab8b2

Please sign in to comment.