Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into upgrade_state
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Mar 6, 2024
2 parents 2b5b5d2 + 1b03e6a commit 442ea3b
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 55 deletions.
2 changes: 1 addition & 1 deletion bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1f6a8afc472b5cbee45ee3cbf6635f140d329673
71553ac94b7a99a1ec090bda1e156ffaea2b4ce4
4 changes: 4 additions & 0 deletions bindings/encoding/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ var (
Name: "parentMetaHash",
Type: "bytes32",
},
{
Name: "sender",
Type: "address",
},
}
transitionComponents = []abi.ArgumentMarshaling{
{
Expand Down
26 changes: 13 additions & 13 deletions bindings/gen_assignment_hook.go

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions bindings/gen_guardian_prover.go

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions bindings/gen_lib_proposing.go

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

33 changes: 17 additions & 16 deletions bindings/gen_taiko_l1.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions driver/chain_syncer/calldata/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
)

var (
// Brecht recommends to hardcore 79, may be unrequired as proof system changes
defaultMaxTxPerBlock = uint64(79)
// Brecht recommends to hardcore 149, may be unrequired as proof system changes
defaultMaxTxPerBlock = uint64(149)
)

// Syncer responsible for letting the L2 execution engine catching up with protocol's latest
Expand Down
43 changes: 35 additions & 8 deletions internal/sender/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,12 @@ func (s *Sender) SendTransaction(tx *types.Transaction) (string, error) {
}

if err := s.send(txToConfirm); err != nil && !strings.Contains(err.Error(), "replacement transaction") {
log.Error("Failed to send transaction", "id", txID, "hash", tx.Hash(), "err", err)
log.Error("Failed to send transaction",
"tx_id", txID,
"nonce", txToConfirm.CurrentTx.Nonce(),
"hash", tx.Hash(),
"err", err,
)
return "", err
}

Expand Down Expand Up @@ -254,20 +259,35 @@ func (s *Sender) send(tx *TxToConfirm) error {
if err != nil {
if strings.Contains(err.Error(), "nonce too low") {
s.AdjustNonce(originalTx)
log.Warn("Nonce is incorrect, retry sending the transaction with new nonce", "hash", rawTx.Hash(), "err", err)
log.Warn("Nonce is incorrect, retry sending the transaction with new nonce",
"tx_id", tx.ID,
"nonce", tx.CurrentTx.Nonce(),
"hash", rawTx.Hash(),
"err", err,
)
continue
}
if err.Error() == "replacement transaction underpriced" {
if strings.Contains(err.Error(), "replacement transaction underpriced") {
s.adjustGas(originalTx)
log.Warn("Replacement transaction underpriced", "hash", rawTx.Hash(), "err", err)
log.Warn("Replacement transaction underpriced",
"tx_id", tx.ID,
"nonce", tx.CurrentTx.Nonce(),
"hash", rawTx.Hash(),
"err", err,
)
continue
}
log.Error("Failed to send transaction", "hash", rawTx.Hash(), "err", err)
log.Error("Failed to send transaction",
"tx_id", tx.ID,
"nonce", tx.CurrentTx.Nonce(),
"hash", rawTx.Hash(),
"err", err,
)
return err
}
s.Opts.Nonce = new(big.Int).Add(s.Opts.Nonce, common.Big1)
break
}
s.Opts.Nonce = new(big.Int).Add(s.Opts.Nonce, common.Big1)
return nil
}

Expand Down Expand Up @@ -323,7 +343,9 @@ func (s *Sender) resendUnconfirmedTxs() {
if err := s.send(unconfirmedTx); err != nil {
log.Warn(
"Failed to resend the transaction",
"id", id,
"tx_id", id,
"nonce", unconfirmedTx.CurrentTx.Nonce(),
"hash", unconfirmedTx.CurrentTx.Hash(),
"retrys", unconfirmedTx.Retrys,
"err", err,
)
Expand All @@ -341,7 +363,12 @@ func (s *Sender) checkPendingTransactionsConfirmation() {
// Ignore the transaction if it is pending.
tx, isPending, err := s.client.TransactionByHash(s.ctx, pendingTx.CurrentTx.Hash())
if err != nil {
log.Warn("Failed to fetch transaction", "hash", pendingTx.CurrentTx.Hash(), "err", err)
log.Warn("Failed to fetch transaction",
"tx_id", pendingTx.ID,
"nonce", pendingTx.CurrentTx.Nonce(),
"hash", pendingTx.CurrentTx.Hash(),
"err", err,
)
continue
}
if isPending {
Expand Down
2 changes: 1 addition & 1 deletion pkg/rpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
defaultWaitL1OriginTimeout = 3 * time.Minute
defaultMaxTransactionsPerBlock = uint64(149)

// Requset urls.
// Request urls.
sidecarsRequestURL = "eth/v1/beacon/blob_sidecars/%d"
)

Expand Down

0 comments on commit 442ea3b

Please sign in to comment.