Skip to content
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

feat(taiko-client): remove soft blocks implementation #18744

Merged
merged 6 commits into from
Jan 10, 2025
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
63 changes: 0 additions & 63 deletions .github/workflows/taiko-client--pages.yml

This file was deleted.

4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ require (
github.com/gorilla/websocket v1.5.3
github.com/joho/godotenv v1.5.1
github.com/labstack/echo-contrib v0.17.2
github.com/labstack/echo-jwt/v4 v4.3.0
github.com/labstack/echo/v4 v4.13.3
github.com/labstack/gommon v0.4.2
github.com/modern-go/reflect2 v1.0.2
Expand Down Expand Up @@ -114,7 +113,6 @@ require (
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/go-cmp v0.6.0 // indirect
Expand Down Expand Up @@ -234,7 +232,7 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum v1.14.11 => github.com/taikoxyz/taiko-geth v1.11.2-0.20250107082544-a2cbf904eaae
replace github.com/ethereum/go-ethereum v1.14.11 => github.com/taikoxyz/taiko-geth v1.11.1

replace github.com/ethereum-optimism/optimism v1.7.4 => github.com/taikoxyz/optimism v0.0.0-20241003061504-cdf8af288f39

Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
Expand Down Expand Up @@ -377,8 +375,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/labstack/echo-contrib v0.17.2 h1:K1zivqmtcC70X9VdBFdLomjPDEVHlrcAObqmuFj1c6w=
github.com/labstack/echo-contrib v0.17.2/go.mod h1:NeDh3PX7j/u+jR4iuDt1zHmWZSCz9c/p9mxXcDpyS8E=
github.com/labstack/echo-jwt/v4 v4.3.0 h1:8JcvVCrK9dRkPx/aWY3ZempZLO336Bebh4oAtBcxAv4=
github.com/labstack/echo-jwt/v4 v4.3.0/go.mod h1:OlWm3wqfnq3Ma8DLmmH7GiEAz2S7Bj23im2iPMEAR+Q=
github.com/labstack/echo/v4 v4.0.0/go.mod h1:tZv7nai5buKSg5h/8E6zz4LsD/Dqh9/91Mvs7Z5Zyno=
github.com/labstack/echo/v4 v4.1.15/go.mod h1:GWO5IBVzI371K8XJe50CSvHjQCafK6cw8R/moLhEU6o=
github.com/labstack/echo/v4 v4.13.3 h1:pwhpCPrTl5qry5HRdM5FwdXnhXSLSY+WE+YQSeCaafY=
Expand Down Expand Up @@ -603,8 +599,8 @@ github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082 h1:ymZR+Y88LOnA8i3Ke
github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082/go.mod h1:RHnIu3EFehrWX3JhFAMQSXD5uz7l0xaNroTzXrap7EQ=
github.com/taikoxyz/optimism v0.0.0-20241003061504-cdf8af288f39 h1:JssMxaDmORjQ9RPZNulVJhAD8zSPd6LZFq5wsr6Nwz8=
github.com/taikoxyz/optimism v0.0.0-20241003061504-cdf8af288f39/go.mod h1:ym7scR7ZHvEmwx1DLGVDzFlAdR+uhP1+Z4XCiFuSD5s=
github.com/taikoxyz/taiko-geth v1.11.2-0.20250107082544-a2cbf904eaae h1:exc3MDRDbpNahMwIA+yGFLJb8Umtqs4JLOBpa8hh4Us=
github.com/taikoxyz/taiko-geth v1.11.2-0.20250107082544-a2cbf904eaae/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
github.com/taikoxyz/taiko-geth v1.11.1 h1:pur1WP6YJkwKhLVeN3Zf7dOwbPq6tS88gYod6QKlJc4=
github.com/taikoxyz/taiko-geth v1.11.1/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo=
github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ=
github.com/thomaso-mirodin/intmath v0.0.0-20160323211736-5dc6d854e46e h1:cR8/SYRgyQCt5cNCMniB/ZScMkhI9nk8U5C7SbISXjo=
Expand Down
2 changes: 2 additions & 0 deletions packages/taiko-client/.swaggo
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
replace common.Address string
replace encoding.TierFee uint64
26 changes: 1 addition & 25 deletions packages/taiko-client/bindings/encoding/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package encoding
import (
"errors"
"fmt"
"math/big"

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -295,10 +294,7 @@ var (
{Name: "TaikoData.Transition", Type: transitionComponentsType},
{Name: "TaikoData.TierProof", Type: tierProofComponentsType},
}
stringType, _ = abi.NewType("string", "TAIKO_DIFFICULTY", nil)
uint64Type, _ = abi.NewType("uint64", "local.b.numBlocks", nil)
difficultyCalculationInputArgs = abi.Arguments{{Type: stringType}, {Type: uint64Type}}
proveBlocksInputArgs = abi.Arguments{
proveBlocksInputArgs = abi.Arguments{
{Name: "TaikoData.BlockMetadata", Type: blockMetadataV2ComponentsType},
{Name: "TaikoData.Transition", Type: transitionComponentsType},
}
Expand Down Expand Up @@ -434,16 +430,6 @@ func EncodeProveBlockInput(
return b, nil
}

// EncodeDifficultCalcutionParams performs the solidity `abi.encode` for the
// `block.difficulty` hash payload.
func EncodeDifficultyCalcutionParams(numBlocks uint64) ([]byte, error) {
b, err := difficultyCalculationInputArgs.Pack("TAIKO_DIFFICULTY", numBlocks)
if err != nil {
return nil, fmt.Errorf("failed to abi.encode `block.difficulty` hash payload, %w", err)
}
return b, nil
}

// EncodeProveBlocksInput performs the solidity `abi.encode` for the given TaikoL1.proveBlocks input.
func EncodeProveBlocksInput(
metas []metadata.TaikoBlockMetaData,
Expand Down Expand Up @@ -507,13 +493,3 @@ func UnpackTxListBytes(txData []byte) ([]byte, error) {

return inputs, nil
}

// EncodeBaseFeeConfig encodes the block.extraData field from the given base fee config.
func EncodeBaseFeeConfig(baseFeeConfig *bindings.LibSharedDataBaseFeeConfig) [32]byte {
var (
bytes32Value [32]byte
uintValue = new(big.Int).SetUint64(uint64(baseFeeConfig.SharingPctg))
)
copy(bytes32Value[32-len(uintValue.Bytes()):], uintValue.Bytes())
return bytes32Value
}
31 changes: 0 additions & 31 deletions packages/taiko-client/cmd/flags/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,6 @@ var (
Category: driverCategory,
EnvVars: []string{"BLOB_SOCIAL_SCAN_ENDPOINT"},
}
// soft block server
SoftBlockServerPort = &cli.Uint64Flag{
Name: "softBlock.port",
Usage: "HTTP port of the soft block server, 0 means disabled",
Category: driverCategory,
EnvVars: []string{"SOFT_BLOCK_SERVER_PORT"},
}
SoftBlockServerJWTSecret = &cli.StringFlag{
Name: "softBlock.jwtSecret",
Usage: "Path to a JWT secret to use for the soft block server",
Category: driverCategory,
EnvVars: []string{"SOFT_BLOCK_SERVER_JWT_SECRET"},
}
SoftBlockServerCORSOrigins = &cli.StringFlag{
Name: "softBlock.corsOrigins",
Usage: "CORS Origins settings for the soft block server",
Category: driverCategory,
Value: "*",
EnvVars: []string{"SOFT_BLOCK_SERVER_CORS_ORIGINS"},
}
SoftBlockServerCheckSig = &cli.BoolFlag{
Name: "softBlock.signatureCheck",
Usage: "If the soft block server will check the signature of the incoming transactions batches",
Category: driverCategory,
Value: false,
EnvVars: []string{"SOFT_BLOCK_SERVER_SIGNATURE_CHECK"},
}
)

// DriverFlags All driver flags.
Expand All @@ -93,8 +66,4 @@ var DriverFlags = MergeFlags(CommonFlags, []cli.Flag{
MaxExponent,
BlobServerEndpoint,
SocialScanEndpoint,
SoftBlockServerPort,
SoftBlockServerJWTSecret,
SoftBlockServerCORSOrigins,
SoftBlockServerCheckSig,
})
Loading
Loading