Skip to content

fix(taiko-client): update highest unsafe payload on import child blocks #19556

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

Merged
merged 3 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ require (

replace github.com/ethereum/go-ethereum v1.15.5 => github.com/taikoxyz/taiko-geth v1.15.1-0.20250513061338-4dedd6e4a405

replace github.com/ethereum-optimism/optimism v1.7.4 => github.com/taikoxyz/optimism v0.0.0-20250506191430-87caa06c2c79
replace github.com/ethereum-optimism/optimism v1.7.4 => github.com/taikoxyz/optimism v0.0.0-20250517051959-14824e366127

replace github.com/uber/jaeger-client-go => github.com/uber/jaeger-client-go v2.25.0+incompatible

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,8 @@ github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDd
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=
github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082 h1:ymZR+Y88LOnA8i3KeuJXK7hff2n7bpMIhONPJwpcA5w=
github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082/go.mod h1:RHnIu3EFehrWX3JhFAMQSXD5uz7l0xaNroTzXrap7EQ=
github.com/taikoxyz/optimism v0.0.0-20250506191430-87caa06c2c79 h1:ek4zhnKvJ0KObs3kfrjfTzXydMAv1QAoEvyx3C7qF80=
github.com/taikoxyz/optimism v0.0.0-20250506191430-87caa06c2c79/go.mod h1:V0VCkKtCzuaJH6qcL75SRcbdlakM9LhurMEJUhO6VXA=
github.com/taikoxyz/optimism v0.0.0-20250517051959-14824e366127 h1:mknzDUhsCYYLh3HmImKCe3tNweuWIZoxrd2pp7jgZkU=
github.com/taikoxyz/optimism v0.0.0-20250517051959-14824e366127/go.mod h1:V0VCkKtCzuaJH6qcL75SRcbdlakM9LhurMEJUhO6VXA=
github.com/taikoxyz/taiko-geth v1.15.1-0.20250513061338-4dedd6e4a405 h1:aOHNO/3XeBpwRv9N+CmHRfv9y5nuTikdWdn7AWg421k=
github.com/taikoxyz/taiko-geth v1.15.1-0.20250513061338-4dedd6e4a405/go.mod h1:1LG2LnMOx2yPRHR/S+xuipXH29vPr6BIH6GElD8N/fo=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
Expand Down
5 changes: 4 additions & 1 deletion packages/taiko-client/driver/preconf_blocks/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,13 @@ func (s *PreconfBlockAPIServer) ImportChildBlocksFromCache(
return nil
}

endBlockID := uint64(childPayloads[len(childPayloads)-1].BlockNumber)
log.Info(
"Found available child payloads in the cache, start importing",
"count", len(childPayloads),
"startBlockID", uint64(childPayloads[0].BlockNumber),
"startBlockHash", childPayloads[0].BlockHash.Hex(),
"endBlockID", uint64(childPayloads[len(childPayloads)-1].BlockNumber),
"endBlockID", endBlockID,
"endBlockHash", childPayloads[len(childPayloads)-1].BlockHash.Hex(),
)

Expand All @@ -668,6 +669,8 @@ func (s *PreconfBlockAPIServer) ImportChildBlocksFromCache(
return fmt.Errorf("failed to insert child preconfirmation blocks from cache: %w", err)
}

s.updateHighestUnsafeL2Payload(endBlockID)

metrics.DriverImportedPreconBlocksFromCacheCounter.Add(float64(len(childPayloads)))

return nil
Expand Down