diff --git a/Dockerfile b/Dockerfile index 511f51a45470..7c80f654e0bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ ARG COMMIT="" ARG VERSION="" ARG BUILDNUM="" -ARG LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04 ARG SCROLL_LIB_PATH=/scroll/lib # Build libzkp dependency @@ -27,13 +26,11 @@ FROM scrolltech/go-rust-builder:go-1.20-rust-nightly-2022-12-10 as builder ADD . /go-ethereum -ARG LIBSCROLL_ZSTD_VERSION ARG SCROLL_LIB_PATH RUN mkdir -p $SCROLL_LIB_PATH COPY --from=zkp-builder /app/target/release/libzkp.so $SCROLL_LIB_PATH -RUN wget -O $SCROLL_LIB_PATH/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$LIBSCROLL_ZSTD_VERSION/libscroll_zstd.so ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" @@ -44,20 +41,18 @@ RUN cd /go-ethereum && env GO111MODULE=on go run build/ci.go install -buildtags FROM ubuntu:20.04 RUN apt-get -qq update \ - && apt-get -qq install -y --no-install-recommends ca-certificates wget + && apt-get -qq install -y --no-install-recommends ca-certificates COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ -ARG LIBSCROLL_ZSTD_VERSION ARG SCROLL_LIB_PATH RUN mkdir -p $SCROLL_LIB_PATH COPY --from=zkp-builder /app/target/release/libzkp.so $SCROLL_LIB_PATH -RUN wget -O $SCROLL_LIB_PATH/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$LIBSCROLL_ZSTD_VERSION/libscroll_zstd.so ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH -ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" +ENV CGO_LDFLAGS="-ldl -L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" EXPOSE 8545 8546 30303 30303/udp ENTRYPOINT ["geth"] diff --git a/Dockerfile.mockccc b/Dockerfile.mockccc index 51a65286ef0a..a01c36713d53 100644 --- a/Dockerfile.mockccc +++ b/Dockerfile.mockccc @@ -2,40 +2,22 @@ ARG COMMIT="" ARG VERSION="" ARG BUILDNUM="" -ARG LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04 ARG SCROLL_LIB_PATH=/scroll/lib # Build Geth in a stock Go builder container FROM scrolltech/go-rust-builder:go-1.20-rust-nightly-2022-12-10 as builder ADD . /go-ethereum +RUN cd /go-ethereum && env GO111MODULE=on go run build/ci.go install ./cmd/geth -ARG LIBSCROLL_ZSTD_VERSION -ARG SCROLL_LIB_PATH - -RUN mkdir -p $SCROLL_LIB_PATH - -RUN apt-get -qq update && apt-get -qq install -y wget -RUN wget -O $SCROLL_LIB_PATH/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$LIBSCROLL_ZSTD_VERSION/libscroll_zstd.so - -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH -ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" +RUN cd /go-ethereum && env GO111MODULE=on go run build/ci.go install ./cmd/geth # Pull Geth into a second stage deploy alpine container FROM ubuntu:20.04 -COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ - -ARG LIBSCROLL_ZSTD_VERSION -ARG SCROLL_LIB_PATH - -RUN mkdir -p $SCROLL_LIB_PATH +ENV CGO_LDFLAGS="-ldl" -RUN apt-get -qq update && apt-get -qq install -y wget -RUN wget -O $SCROLL_LIB_PATH/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$LIBSCROLL_ZSTD_VERSION/libscroll_zstd.so - -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH -ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" +COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp ENTRYPOINT ["geth"] diff --git a/Makefile b/Makefile index 691beeaad431..95b6baae0f7e 100644 --- a/Makefile +++ b/Makefile @@ -2,29 +2,22 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth android ios evm all test clean libzkp libzstd +.PHONY: geth android ios evm all test clean libzkp GOBIN = ./build/bin GO ?= latest -GORUN = go run -LIBSCROLL_ZSTD_VERSION = v0.1.0-rc0-ubuntu20.04 -SCROLL_LIB_PATH = /scroll/lib +GORUN = env GO111MODULE=on go run libzkp: cd $(PWD)/rollup/circuitcapacitychecker/libzkp && make libzkp -libzstd: - @sudo mkdir -p $(SCROLL_LIB_PATH) - @sudo wget -O $(SCROLL_LIB_PATH)/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$(LIBSCROLL_ZSTD_VERSION)/libscroll_zstd.so - -nccc_geth: libzstd ## geth without circuit capacity checker - @LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(SCROLL_LIB_PATH)" CGO_LDFLAGS="-L$(SCROLL_LIB_PATH) -Wl,-rpath,$(SCROLL_LIB_PATH)" $(GORUN) build/ci.go install ./cmd/geth +nccc_geth: ## geth without circuit capacity checker + $(GORUN) build/ci.go install ./cmd/geth @echo "Done building." @echo "Run \"$(GOBIN)/geth\" to launch geth." -geth: libzkp libzstd - @sudo cp $(PWD)/rollup/circuitcapacitychecker/libzkp/libzkp.so $(SCROLL_LIB_PATH) - @LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(SCROLL_LIB_PATH)" CGO_LDFLAGS="-L$(SCROLL_LIB_PATH) -Wl,-rpath,$(SCROLL_LIB_PATH)" $(GORUN) build/ci.go install -buildtags circuit_capacity_checker ./cmd/geth +geth: libzkp + $(GORUN) build/ci.go install -buildtags circuit_capacity_checker ./cmd/geth @echo "Done building." @echo "Run \"$(GOBIN)/geth\" to launch geth." @@ -43,14 +36,17 @@ ios: @echo "Done building." @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." -test: - ./run_test.sh +test: all + # genesis test + cd ${PWD}/cmd/geth; go test -test.run TestCustomGenesis + # module test + $(GORUN) build/ci.go test ./consensus ./core ./eth ./miner ./node ./trie ./rollup/... lint: ## Run linters. $(GORUN) build/ci.go lint clean: - go clean -cache + env GO111MODULE=on go clean -cache rm -fr build/_workspace/pkg/ $(GOBIN)/* # The devtools target installs tools required for 'go generate'. diff --git a/build/ci.go b/build/ci.go index 360e0390ec34..f9734e64bad7 100644 --- a/build/ci.go +++ b/build/ci.go @@ -232,6 +232,9 @@ func doInstall(cmdline []string) { // Show packages during build. gobuild.Args = append(gobuild.Args, "-v") + // Add -ldl flags for libscroll_zstd.a. + gobuild.Args = append(gobuild.Args, "-ldflags", "-extldflags -ldl") + // Now we choose what we're even building. // Default: collect all 'main' packages in cmd/ and build those. packages := flag.Args() diff --git a/cmd/geth/main.go b/cmd/geth/main.go index ac0c8df1fe32..e9c9bf68906f 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -159,6 +159,8 @@ var ( utils.GpoPercentileFlag, utils.GpoMaxGasPriceFlag, utils.GpoIgnoreGasPriceFlag, + utils.GpoCongestionThresholdFlag, + utils.MinerNotifyFullFlag, configFileFlag, utils.CatalystFlag, diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 8c2e17218efd..1fa00a384e2b 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -204,6 +204,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{ utils.GpoPercentileFlag, utils.GpoMaxGasPriceFlag, utils.GpoIgnoreGasPriceFlag, + utils.GpoCongestionThresholdFlag, }, }, { diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4d2224d6522a..7ad9915815fb 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -735,6 +735,11 @@ var ( Usage: "Gas price below which gpo will ignore transactions", Value: ethconfig.Defaults.GPO.IgnorePrice.Int64(), } + GpoCongestionThresholdFlag = cli.IntFlag{ + Name: "gpo.congestionthreshold", + Usage: "Number of pending transactions to consider the network congested and suggest a minimum tip cap", + Value: ethconfig.Defaults.GPO.CongestedThreshold, + } // Metrics flags MetricsEnabledFlag = cli.BoolFlag{ @@ -1429,6 +1434,9 @@ func setGPO(ctx *cli.Context, cfg *gasprice.Config, light bool) { if ctx.GlobalIsSet(GpoIgnoreGasPriceFlag.Name) { cfg.IgnorePrice = big.NewInt(ctx.GlobalInt64(GpoIgnoreGasPriceFlag.Name)) } + if ctx.GlobalIsSet(GpoCongestionThresholdFlag.Name) { + cfg.CongestedThreshold = ctx.GlobalInt(GpoCongestionThresholdFlag.Name) + } } func setTxPool(ctx *cli.Context, cfg *core.TxPoolConfig) { diff --git a/eth/backend.go b/eth/backend.go index 91bbc47e4ae8..497ec9ee2d95 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -264,6 +264,7 @@ func New(stack *node.Node, config *ethconfig.Config, l1Client sync_service.EthCl if gpoParams.Default == nil { gpoParams.Default = config.Miner.GasPrice } + gpoParams.DefaultBasePrice = new(big.Int).SetUint64(config.TxPool.PriceLimit) eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, gpoParams) // Setup DNS discovery iterators. diff --git a/eth/gasprice/feehistory_test.go b/eth/gasprice/feehistory_test.go index 14354a3d5c2a..c5cb5af2d339 100644 --- a/eth/gasprice/feehistory_test.go +++ b/eth/gasprice/feehistory_test.go @@ -56,7 +56,7 @@ func TestFeeHistory(t *testing.T) { MaxHeaderHistory: c.maxHeader, MaxBlockHistory: c.maxBlock, } - backend := newTestBackend(t, big.NewInt(16), c.pending) + backend := newTestBackend(t, big.NewInt(16), c.pending, 0) oracle := NewOracle(backend, config) first, reward, baseFee, ratio, err := oracle.FeeHistory(context.Background(), c.count, c.last, c.percent) diff --git a/eth/gasprice/gasprice.go b/eth/gasprice/gasprice.go index 96ee73901d87..29ffcc60512b 100644 --- a/eth/gasprice/gasprice.go +++ b/eth/gasprice/gasprice.go @@ -39,16 +39,19 @@ const sampleNumber = 3 // Number of transactions sampled in a block var ( DefaultMaxPrice = big.NewInt(500 * params.GWei) DefaultIgnorePrice = big.NewInt(2 * params.Wei) + DefaultBasePrice = big.NewInt(0) ) type Config struct { - Blocks int - Percentile int - MaxHeaderHistory int - MaxBlockHistory int - Default *big.Int `toml:",omitempty"` - MaxPrice *big.Int `toml:",omitempty"` - IgnorePrice *big.Int `toml:",omitempty"` + Blocks int + Percentile int + MaxHeaderHistory int + MaxBlockHistory int + Default *big.Int `toml:",omitempty"` + MaxPrice *big.Int `toml:",omitempty"` + IgnorePrice *big.Int `toml:",omitempty"` + CongestedThreshold int // Number of pending transactions to consider the network congested and suggest a minimum tip cap. + DefaultBasePrice *big.Int `toml:",omitempty"` // Base price to set when CongestedThreshold is reached before Curie (EIP 1559). } // OracleBackend includes all necessary background APIs for oracle. @@ -60,6 +63,7 @@ type OracleBackend interface { ChainConfig() *params.ChainConfig SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription StateAt(root common.Hash) (*state.StateDB, error) + Stats() (pending int, queued int) } // Oracle recommends gas prices based on the content of recent @@ -75,6 +79,8 @@ type Oracle struct { checkBlocks, percentile int maxHeaderHistory, maxBlockHistory int + congestedThreshold int // Number of pending transactions to consider the network congested and suggest a minimum tip cap. + defaultBasePrice *big.Int // Base price to set when CongestedThreshold is reached before Curie (EIP 1559). historyCache *lru.Cache } @@ -116,6 +122,16 @@ func NewOracle(backend OracleBackend, params Config) *Oracle { maxBlockHistory = 1 log.Warn("Sanitizing invalid gasprice oracle max block history", "provided", params.MaxBlockHistory, "updated", maxBlockHistory) } + congestedThreshold := params.CongestedThreshold + if congestedThreshold < 0 { + congestedThreshold = 0 + log.Warn("Sanitizing invalid gasprice oracle congested threshold", "provided", params.CongestedThreshold, "updated", congestedThreshold) + } + defaultBasePrice := params.DefaultBasePrice + if defaultBasePrice == nil || defaultBasePrice.Int64() < 0 { + defaultBasePrice = DefaultBasePrice + log.Warn("Sanitizing invalid gasprice oracle default base price", "provided", params.DefaultBasePrice, "updated", defaultBasePrice) + } cache, _ := lru.New(2048) headEvent := make(chan core.ChainHeadEvent, 1) @@ -131,15 +147,17 @@ func NewOracle(backend OracleBackend, params Config) *Oracle { }() return &Oracle{ - backend: backend, - lastPrice: params.Default, - maxPrice: maxPrice, - ignorePrice: ignorePrice, - checkBlocks: blocks, - percentile: percent, - maxHeaderHistory: maxHeaderHistory, - maxBlockHistory: maxBlockHistory, - historyCache: cache, + backend: backend, + lastPrice: params.Default, + maxPrice: maxPrice, + ignorePrice: ignorePrice, + checkBlocks: blocks, + percentile: percent, + maxHeaderHistory: maxHeaderHistory, + maxBlockHistory: maxBlockHistory, + congestedThreshold: congestedThreshold, + defaultBasePrice: defaultBasePrice, + historyCache: cache, } } @@ -170,6 +188,28 @@ func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) { if headHash == lastHead { return new(big.Int).Set(lastPrice), nil } + + // If pending txs are less than oracle.congestedThreshold, we consider the network to be non-congested and suggest + // a minimal tip cap. This is to prevent users from overpaying for gas when the network is not congested and a few + // high-priced txs are causing the suggested tip cap to be high. + pendingTxCount, _ := oracle.backend.Stats() + if pendingTxCount < oracle.congestedThreshold { + // Before Curie (EIP-1559), we need to return the total suggested gas price. After Curie we return 1 wei as the tip cap, + // as the base fee is set separately or added manually for legacy transactions. + // Set price to 1 as otherwise tx with a 0 tip might be filtered out by the default mempool config. + price := big.NewInt(1) + if !oracle.backend.ChainConfig().IsCurie(head.Number) { + price = oracle.defaultBasePrice + } + + oracle.cacheLock.Lock() + oracle.lastHead = headHash + oracle.lastPrice = price + oracle.cacheLock.Unlock() + + return new(big.Int).Set(price), nil + } + var ( sent, exp int number = head.Number.Uint64() diff --git a/eth/gasprice/gasprice_test.go b/eth/gasprice/gasprice_test.go index 24822c4c2a96..b27046546cfe 100644 --- a/eth/gasprice/gasprice_test.go +++ b/eth/gasprice/gasprice_test.go @@ -38,8 +38,9 @@ import ( const testHead = 32 type testBackend struct { - chain *core.BlockChain - pending bool // pending block available + chain *core.BlockChain + pending bool // pending block available + pendingTxCount int } func (b *testBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) { @@ -96,7 +97,11 @@ func (b *testBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) eve return nil } -func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool) *testBackend { +func (b *testBackend) Stats() (int, int) { + return b.pendingTxCount, 0 +} + +func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool, pendingTxCount int) *testBackend { var ( key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") addr = crypto.PubkeyToAddress(key.PublicKey) @@ -113,6 +118,7 @@ func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool) *testBacke config.ShanghaiBlock = londonBlock config.BernoulliBlock = londonBlock config.CurieBlock = londonBlock + config.DescartesBlock = londonBlock engine := ethash.NewFaker() db := rawdb.NewMemoryDatabase() genesis, err := gspec.Commit(db) @@ -154,7 +160,7 @@ func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool) *testBacke t.Fatalf("Failed to create local chain, %v", err) } chain.InsertChain(blocks) - return &testBackend{chain: chain, pending: pending} + return &testBackend{chain: chain, pending: pending, pendingTxCount: pendingTxCount} } func (b *testBackend) CurrentHeader() *types.Header { @@ -186,7 +192,67 @@ func TestSuggestTipCap(t *testing.T) { {big.NewInt(33), big.NewInt(params.GWei * int64(30))}, // Fork point in the future } for _, c := range cases { - backend := newTestBackend(t, c.fork, false) + backend := newTestBackend(t, c.fork, false, 0) + oracle := NewOracle(backend, config) + + // The gas price sampled is: 32G, 31G, 30G, 29G, 28G, 27G + got, err := oracle.SuggestTipCap(context.Background()) + if err != nil { + t.Fatalf("Failed to retrieve recommended gas price: %v", err) + } + if got.Cmp(c.expect) != 0 { + t.Fatalf("Gas price mismatch, want %d, got %d", c.expect, got) + } + } +} + +func TestSuggestTipCapCongestedThreshold(t *testing.T) { + expectedDefaultBasePricePreCurie := big.NewInt(2000) + expectedDefaultBasePricePostCurie := big.NewInt(1) + + config := Config{ + Blocks: 3, + Percentile: 60, + Default: big.NewInt(params.GWei), + CongestedThreshold: 50, + DefaultBasePrice: expectedDefaultBasePricePreCurie, + } + var cases = []struct { + fork *big.Int // London fork number + pendingTx int // Number of pending transactions in the mempool + expect *big.Int // Expected gasprice suggestion + }{ + {nil, 0, expectedDefaultBasePricePreCurie}, // No congestion - default base price + {nil, 49, expectedDefaultBasePricePreCurie}, // No congestion - default base price + {nil, 50, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + {nil, 100, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + + // Fork point in genesis + {big.NewInt(0), 0, expectedDefaultBasePricePostCurie}, // No congestion - default base price + {big.NewInt(0), 49, expectedDefaultBasePricePostCurie}, // No congestion - default base price + {big.NewInt(0), 50, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + {big.NewInt(0), 100, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + + // Fork point in first block + {big.NewInt(1), 0, expectedDefaultBasePricePostCurie}, // No congestion - default base price + {big.NewInt(1), 49, expectedDefaultBasePricePostCurie}, // No congestion - default base price + {big.NewInt(1), 50, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + {big.NewInt(1), 100, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + + // Fork point in last block + {big.NewInt(32), 0, expectedDefaultBasePricePostCurie}, // No congestion - default base price + {big.NewInt(32), 49, expectedDefaultBasePricePostCurie}, // No congestion - default base price + {big.NewInt(32), 50, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + {big.NewInt(32), 100, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + + // Fork point in the future + {big.NewInt(33), 0, expectedDefaultBasePricePreCurie}, // No congestion - default base price + {big.NewInt(33), 49, expectedDefaultBasePricePreCurie}, // No congestion - default base price + {big.NewInt(33), 50, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + {big.NewInt(33), 100, big.NewInt(params.GWei * int64(30))}, // Congestion - normal behavior + } + for _, c := range cases { + backend := newTestBackend(t, c.fork, false, c.pendingTx) oracle := NewOracle(backend, config) // The gas price sampled is: 32G, 31G, 30G, 29G, 28G, 27G diff --git a/go.mod b/go.mod index 913f800dd39e..a8610fdcca45 100644 --- a/go.mod +++ b/go.mod @@ -50,8 +50,8 @@ require ( github.com/prometheus/tsdb v0.7.1 github.com/rjeczalik/notify v0.9.1 github.com/rs/cors v1.7.0 - github.com/scroll-tech/da-codec v0.0.0-20240516115958-db04f5e6772c - github.com/scroll-tech/zktrie v0.8.4 + github.com/scroll-tech/da-codec v0.0.0-20240605080813-32bfc9fccde7 + github.com/scroll-tech/zktrie v0.8.2 github.com/shirou/gopsutil v3.21.11+incompatible github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index 9e09f8da2c64..d2cdab36b1d2 100644 --- a/go.sum +++ b/go.sum @@ -392,10 +392,10 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/scroll-tech/da-codec v0.0.0-20240516115958-db04f5e6772c h1:Vi1BGENMGO8yjmnJe6QP9Eb1OPPuEi4+wd8d/DxhJ6Q= -github.com/scroll-tech/da-codec v0.0.0-20240516115958-db04f5e6772c/go.mod h1:1wWYii0OPwd5kw+xrz0PFgS420xNadrNF1x/ELJT+TM= -github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE= -github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= +github.com/scroll-tech/da-codec v0.0.0-20240605080813-32bfc9fccde7 h1:CDrPMqifvAVyYqu0x1J5qickVV0b51tApPnOwDYLESI= +github.com/scroll-tech/da-codec v0.0.0-20240605080813-32bfc9fccde7/go.mod h1:1wWYii0OPwd5kw+xrz0PFgS420xNadrNF1x/ELJT+TM= +github.com/scroll-tech/zktrie v0.8.2 h1:UMuIfA+jdgWMLmTgTL64Emo+zzMOdcnH0+eYdDcshxQ= +github.com/scroll-tech/zktrie v0.8.2/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= diff --git a/params/version.go b/params/version.go index 766652cc48c3..58788aa3b491 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 3 // Minor version component of the current release - VersionPatch = 34 // Patch version component of the current release + VersionPatch = 36 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) diff --git a/rollup/rollup_sync_service/README.md b/rollup/rollup_sync_service/README.md deleted file mode 100644 index 0eb4aadf8916..000000000000 --- a/rollup/rollup_sync_service/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Running unit tests - -Follow these steps to run unit tests, in the repo's root dir: - -``` -docker pull scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 --platform linux/amd64 -docker run -it --rm -v "$(PWD):/workspace" -w /workspace scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 - -export LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04 -export SCROLL_LIB_PATH=/scroll/lib - -mkdir -p $SCROLL_LIB_PATH -wget -O $SCROLL_LIB_PATH/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$LIBSCROLL_ZSTD_VERSION/libscroll_zstd.so -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH -export CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" -go test -v -race ./rollup/rollup_sync_service/... -``` diff --git a/run_test.sh b/run_test.sh deleted file mode 100755 index 39eee287d08a..000000000000 --- a/run_test.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# Download .so files -export LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04 -export SCROLL_LIB_PATH=/scroll/lib - -sudo mkdir -p $SCROLL_LIB_PATH - -sudo wget -O $SCROLL_LIB_PATH/libscroll_zstd.so https://github.com/scroll-tech/da-codec/releases/download/$LIBSCROLL_ZSTD_VERSION/libscroll_zstd.so - -# Set the environment variable -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH -export CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH" - -# Download and install the project dependencies -go run build/ci.go install -go get ./... - -# Save the root directory of the project -ROOT_DIR=$(pwd) - -# Run genesis test -cd $ROOT_DIR/cmd/geth -go test -test.run TestCustomGenesis - -# Run module tests -cd $ROOT_DIR -go run build/ci.go test ./consensus ./core ./eth ./miner ./node ./trie ./rollup/...