mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-09 14:08:03 -05:00
feat(rollup-relayer): support codecv2 (#1298)
Co-authored-by: Péter Garamvölgyi <peter@scroll.io> Co-authored-by: georgehao <haohongfan@gmail.com> Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com> Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
This commit is contained in:
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./build/dockerfiles/event_watcher.Dockerfile
|
file: ./build/dockerfiles/event_watcher.Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
|
||||||
@@ -91,7 +91,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./build/dockerfiles/gas_oracle.Dockerfile
|
file: ./build/dockerfiles/gas_oracle.Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
|
||||||
@@ -136,7 +136,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./build/dockerfiles/rollup_relayer.Dockerfile
|
file: ./build/dockerfiles/rollup_relayer.Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
|
||||||
|
|||||||
2
.github/workflows/rollup.yml
vendored
2
.github/workflows/rollup.yml
vendored
@@ -105,7 +105,7 @@ jobs:
|
|||||||
- name: Test rollup packages
|
- name: Test rollup packages
|
||||||
working-directory: 'rollup'
|
working-directory: 'rollup'
|
||||||
run: |
|
run: |
|
||||||
go test -v -race -gcflags="-l" -ldflags="-s=false" -coverprofile=coverage.txt -covermode=atomic ./...
|
./run_test.sh
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
env:
|
env:
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -41,12 +41,23 @@ docker pull postgres
|
|||||||
make dev_docker
|
make dev_docker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing Rollup & Coordinator
|
## Unit Tests
|
||||||
|
|
||||||
Run the tests using the following commands:
|
Run the tests using the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
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
|
||||||
|
|
||||||
|
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 -covermode=atomic scroll-tech/rollup/...
|
go test -v -race -covermode=atomic scroll-tech/rollup/...
|
||||||
|
|
||||||
go test -tags="mock_verifier" -v -race -covermode=atomic scroll-tech/coordinator/...
|
go test -tags="mock_verifier" -v -race -covermode=atomic scroll-tech/coordinator/...
|
||||||
go test -v -race -covermode=atomic scroll-tech/database/...
|
go test -v -race -covermode=atomic scroll-tech/database/...
|
||||||
go test -v -race -covermode=atomic scroll-tech/common/...
|
go test -v -race -covermode=atomic scroll-tech/common/...
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ require (
|
|||||||
github.com/gin-gonic/gin v1.9.1
|
github.com/gin-gonic/gin v1.9.1
|
||||||
github.com/go-redis/redis/v8 v8.11.5
|
github.com/go-redis/redis/v8 v8.11.5
|
||||||
github.com/pressly/goose/v3 v3.16.0
|
github.com/pressly/goose/v3 v3.16.0
|
||||||
github.com/prometheus/client_golang v1.16.0
|
github.com/prometheus/client_golang v1.19.0
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
github.com/urfave/cli/v2 v2.25.7
|
github.com/urfave/cli/v2 v2.25.7
|
||||||
golang.org/x/sync v0.6.0
|
golang.org/x/sync v0.6.0
|
||||||
gorm.io/gorm v1.25.5
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -28,12 +28,12 @@ require (
|
|||||||
github.com/consensys/bavard v0.1.13 // indirect
|
github.com/consensys/bavard v0.1.13 // indirect
|
||||||
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/deckarep/golang-set v1.8.0 // indirect
|
github.com/deckarep/golang-set v1.8.0 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
github.com/docker/cli v25.0.1+incompatible // indirect
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible // indirect
|
||||||
github.com/docker/docker v25.0.3+incompatible // indirect
|
github.com/docker/docker v26.1.0+incompatible // indirect
|
||||||
github.com/docker/go-connections v0.5.0 // indirect
|
github.com/docker/go-connections v0.5.0 // indirect
|
||||||
github.com/edsrzf/mmap-go v1.0.0 // indirect
|
github.com/edsrzf/mmap-go v1.0.0 // indirect
|
||||||
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
|
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
|
||||||
@@ -49,9 +49,7 @@ require (
|
|||||||
github.com/go-playground/validator/v10 v10.15.5 // indirect
|
github.com/go-playground/validator/v10 v10.15.5 // indirect
|
||||||
github.com/go-stack/stack v1.8.1 // indirect
|
github.com/go-stack/stack v1.8.1 // indirect
|
||||||
github.com/goccy/go-json v0.10.2 // indirect
|
github.com/goccy/go-json v0.10.2 // indirect
|
||||||
github.com/golang/protobuf v1.5.3 // indirect
|
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
|
||||||
github.com/google/go-cmp v0.6.0 // indirect
|
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/gorilla/websocket v1.5.0 // indirect
|
github.com/gorilla/websocket v1.5.0 // indirect
|
||||||
github.com/hashicorp/go-bexpr v0.1.10 // indirect
|
github.com/hashicorp/go-bexpr v0.1.10 // indirect
|
||||||
@@ -72,10 +70,10 @@ require (
|
|||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/mitchellh/pointerstructure v1.2.0 // indirect
|
github.com/mitchellh/pointerstructure v1.2.0 // indirect
|
||||||
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||||
|
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||||
@@ -84,20 +82,19 @@ require (
|
|||||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/prometheus/client_model v0.4.0 // indirect
|
github.com/prometheus/client_model v0.5.0 // indirect
|
||||||
github.com/prometheus/common v0.42.0 // indirect
|
github.com/prometheus/common v0.48.0 // indirect
|
||||||
github.com/prometheus/procfs v0.12.0 // indirect
|
github.com/prometheus/procfs v0.12.0 // indirect
|
||||||
github.com/prometheus/tsdb v0.7.1 // indirect
|
github.com/prometheus/tsdb v0.7.1 // indirect
|
||||||
github.com/rivo/uniseg v0.4.4 // indirect
|
github.com/rivo/uniseg v0.4.4 // indirect
|
||||||
github.com/rjeczalik/notify v0.9.1 // indirect
|
github.com/rjeczalik/notify v0.9.1 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
|
||||||
github.com/rs/cors v1.7.0 // indirect
|
github.com/rs/cors v1.7.0 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/scroll-tech/zktrie v0.7.1 // indirect
|
github.com/scroll-tech/zktrie v0.8.2 // indirect
|
||||||
github.com/sethvargo/go-retry v0.2.4 // indirect
|
github.com/sethvargo/go-retry v0.2.4 // indirect
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
||||||
github.com/status-im/keycard-go v0.2.0 // indirect
|
github.com/status-im/keycard-go v0.2.0 // indirect
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 // indirect
|
github.com/supranational/blst v0.3.11 // indirect
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
||||||
github.com/tklauser/numcpus v0.6.1 // indirect
|
github.com/tklauser/numcpus v0.6.1 // indirect
|
||||||
@@ -109,14 +106,15 @@ require (
|
|||||||
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
golang.org/x/arch v0.5.0 // indirect
|
golang.org/x/arch v0.5.0 // indirect
|
||||||
golang.org/x/crypto v0.17.0 // indirect
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/mod v0.16.0 // indirect
|
golang.org/x/mod v0.16.0 // indirect
|
||||||
golang.org/x/net v0.18.0 // indirect
|
golang.org/x/net v0.20.0 // indirect
|
||||||
golang.org/x/sys v0.17.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
golang.org/x/time v0.3.0 // indirect
|
||||||
|
golang.org/x/tools v0.17.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
|
||||||
google.golang.org/protobuf v1.31.0 // indirect
|
google.golang.org/protobuf v1.33.0 // indirect
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||||
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
|
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7b
|
|||||||
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
|
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -71,10 +71,10 @@ github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS3
|
|||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||||
github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbTO1lpcGSkU=
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible h1:xhVCHXq+P5LhT31+RuDuk0xXEbEnd50Fr37J1bGuyWg=
|
||||||
github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||||
github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ=
|
github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM=
|
||||||
github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
||||||
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
||||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||||
@@ -147,7 +147,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
|
|||||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
|
||||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
@@ -156,7 +155,6 @@ github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg
|
|||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
@@ -229,8 +227,6 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
|
|||||||
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
||||||
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
|
||||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
@@ -239,6 +235,8 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh
|
|||||||
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
|
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
|
||||||
github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU=
|
github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU=
|
||||||
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
|
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
|
||||||
|
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||||
|
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||||
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
|
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
|
||||||
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
|
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
@@ -285,14 +283,14 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
|||||||
github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg=
|
github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg=
|
||||||
github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM=
|
github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM=
|
||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
|
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
|
||||||
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
|
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
|
||||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||||
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY=
|
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
||||||
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
|
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
||||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||||
github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
|
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
|
||||||
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
|
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
|
||||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
||||||
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
||||||
@@ -311,10 +309,10 @@ 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/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e h1:FcoK0rykAWI+5E7cQM6ALRLd5CmjBTHRvJztRBH2xeM=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e/go.mod h1:7Rz2bh9pn42rGuxjh51CG7HL9SKMG3ZugJkL3emdZx8=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
||||||
github.com/scroll-tech/zktrie v0.7.1 h1:NrmZNjuBzsbrKePqdHDG+t2cXnimbtezPAFS0+L9ElE=
|
github.com/scroll-tech/zktrie v0.8.2 h1:UMuIfA+jdgWMLmTgTL64Emo+zzMOdcnH0+eYdDcshxQ=
|
||||||
github.com/scroll-tech/zktrie v0.7.1/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
|
github.com/scroll-tech/zktrie v0.8.2/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
|
||||||
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
||||||
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
||||||
github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=
|
github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=
|
||||||
@@ -341,8 +339,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
|
|||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 h1:wh1wzwAhZBNiZO37uWS/nDaKiIwHz4mDo4pnA+fqTO0=
|
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
||||||
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
||||||
@@ -385,19 +383,18 @@ golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
|||||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
||||||
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
@@ -429,8 +426,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
|||||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
|
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||||
golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk=
|
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
|
||||||
@@ -443,10 +440,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
|
|||||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
|
||||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
@@ -466,8 +461,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde h1:9DShaph9qhkIYw7QF91I/ynrr4cOO2PZra2PFD7Mfeg=
|
||||||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||||
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
|
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
|
||||||
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
|
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
|
||||||
lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo=
|
lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo=
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
ARG LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04
|
||||||
|
ARG SCROLL_LIB_PATH=/scroll/lib
|
||||||
|
|
||||||
# Download Go dependencies
|
# Download Go dependencies
|
||||||
FROM scrolltech/go-alpine-builder:1.21 as base
|
FROM scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 as base
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.work* ./
|
COPY go.work* ./
|
||||||
@@ -15,12 +18,37 @@ RUN go mod download -x
|
|||||||
# Build event_watcher
|
# Build event_watcher
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
|
|
||||||
|
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=$SCROLL_LIB_PATH
|
||||||
|
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
|
||||||
|
|
||||||
RUN --mount=target=. \
|
RUN --mount=target=. \
|
||||||
--mount=type=cache,target=/root/.cache/go-build \
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
cd /src/rollup/cmd/event_watcher/ && go build -v -p 4 -o /bin/event_watcher
|
cd /src/rollup/cmd/event_watcher/ && go build -v -p 4 -o /bin/event_watcher
|
||||||
|
|
||||||
# Pull event_watcher into a second stage deploy alpine container
|
# Pull event_watcher into a second stage deploy alpine container
|
||||||
FROM alpine:latest
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
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=$SCROLL_LIB_PATH
|
||||||
|
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
|
||||||
|
|
||||||
COPY --from=builder /bin/event_watcher /bin/
|
COPY --from=builder /bin/event_watcher /bin/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENTRYPOINT ["event_watcher"]
|
ENTRYPOINT ["event_watcher"]
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
|
ARG LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04
|
||||||
|
ARG SCROLL_LIB_PATH=/scroll/lib
|
||||||
|
|
||||||
# Download Go dependencies
|
# Download Go dependencies
|
||||||
FROM scrolltech/go-alpine-builder:1.21 as base
|
FROM scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 as base
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.work* ./
|
COPY go.work* ./
|
||||||
@@ -15,12 +18,37 @@ RUN go mod download -x
|
|||||||
# Build gas_oracle
|
# Build gas_oracle
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
|
|
||||||
|
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=$SCROLL_LIB_PATH
|
||||||
|
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
|
||||||
|
|
||||||
RUN --mount=target=. \
|
RUN --mount=target=. \
|
||||||
--mount=type=cache,target=/root/.cache/go-build \
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
cd /src/rollup/cmd/gas_oracle/ && go build -v -p 4 -o /bin/gas_oracle
|
cd /src/rollup/cmd/gas_oracle/ && go build -v -p 4 -o /bin/gas_oracle
|
||||||
|
|
||||||
# Pull gas_oracle into a second stage deploy alpine container
|
# Pull gas_oracle into a second stage deploy alpine container
|
||||||
FROM alpine:latest
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
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=$SCROLL_LIB_PATH
|
||||||
|
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
|
||||||
|
|
||||||
COPY --from=builder /bin/gas_oracle /bin/
|
COPY --from=builder /bin/gas_oracle /bin/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENTRYPOINT ["gas_oracle"]
|
ENTRYPOINT ["gas_oracle"]
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
|
ARG LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04
|
||||||
|
ARG SCROLL_LIB_PATH=/scroll/lib
|
||||||
|
|
||||||
# Download Go dependencies
|
# Download Go dependencies
|
||||||
FROM scrolltech/go-alpine-builder:1.21 as base
|
FROM scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 as base
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.work* ./
|
COPY go.work* ./
|
||||||
@@ -15,12 +18,37 @@ RUN go mod download -x
|
|||||||
# Build rollup_relayer
|
# Build rollup_relayer
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
|
|
||||||
|
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=$SCROLL_LIB_PATH
|
||||||
|
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
|
||||||
|
|
||||||
RUN --mount=target=. \
|
RUN --mount=target=. \
|
||||||
--mount=type=cache,target=/root/.cache/go-build \
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
cd /src/rollup/cmd/rollup_relayer/ && go build -v -p 4 -o /bin/rollup_relayer
|
cd /src/rollup/cmd/rollup_relayer/ && go build -v -p 4 -o /bin/rollup_relayer
|
||||||
|
|
||||||
# Pull rollup_relayer into a second stage deploy alpine container
|
# Pull rollup_relayer into a second stage deploy alpine container
|
||||||
FROM alpine:latest
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
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=$SCROLL_LIB_PATH
|
||||||
|
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
|
||||||
|
|
||||||
COPY --from=builder /bin/rollup_relayer /bin/
|
COPY --from=builder /bin/rollup_relayer /bin/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENTRYPOINT ["rollup_relayer"]
|
ENTRYPOINT ["rollup_relayer"]
|
||||||
@@ -5,44 +5,44 @@ go 1.21
|
|||||||
require (
|
require (
|
||||||
github.com/Masterminds/semver/v3 v3.2.1
|
github.com/Masterminds/semver/v3 v3.2.1
|
||||||
github.com/bits-and-blooms/bitset v1.12.0
|
github.com/bits-and-blooms/bitset v1.12.0
|
||||||
github.com/docker/docker v25.0.3+incompatible
|
github.com/docker/docker v26.1.0+incompatible
|
||||||
github.com/gin-contrib/pprof v1.4.0
|
github.com/gin-contrib/pprof v1.4.0
|
||||||
github.com/gin-gonic/gin v1.9.1
|
github.com/gin-gonic/gin v1.9.1
|
||||||
github.com/mattn/go-colorable v0.1.13
|
github.com/mattn/go-colorable v0.1.13
|
||||||
github.com/mattn/go-isatty v0.0.20
|
github.com/mattn/go-isatty v0.0.20
|
||||||
github.com/modern-go/reflect2 v1.0.2
|
github.com/modern-go/reflect2 v1.0.2
|
||||||
github.com/orcaman/concurrent-map v1.0.0
|
github.com/orcaman/concurrent-map v1.0.0
|
||||||
github.com/prometheus/client_golang v1.16.0
|
github.com/prometheus/client_golang v1.19.0
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
github.com/testcontainers/testcontainers-go v0.28.0
|
github.com/testcontainers/testcontainers-go v0.30.0
|
||||||
github.com/testcontainers/testcontainers-go/modules/compose v0.28.0
|
github.com/testcontainers/testcontainers-go/modules/compose v0.30.0
|
||||||
github.com/testcontainers/testcontainers-go/modules/postgres v0.28.0
|
github.com/testcontainers/testcontainers-go/modules/postgres v0.30.0
|
||||||
github.com/urfave/cli/v2 v2.25.7
|
github.com/urfave/cli/v2 v2.25.7
|
||||||
gorm.io/driver/postgres v1.5.0
|
gorm.io/driver/postgres v1.5.7
|
||||||
gorm.io/gorm v1.25.5
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dario.cat/mergo v1.0.0 // indirect
|
dario.cat/mergo v1.0.0 // indirect
|
||||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
|
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
|
||||||
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
|
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||||
github.com/Microsoft/hcsshim v0.11.4 // indirect
|
github.com/Microsoft/hcsshim v0.11.4 // indirect
|
||||||
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
|
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2 v1.17.6 // indirect
|
github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.18.16 // indirect
|
github.com/aws/aws-sdk-go-v2/config v1.18.45 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.16 // indirect
|
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24 // indirect
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 // indirect
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 // indirect
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect
|
||||||
github.com/aws/smithy-go v1.13.5 // indirect
|
github.com/aws/smithy-go v1.15.0 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
||||||
github.com/buger/goterm v1.0.4 // indirect
|
github.com/buger/goterm v1.0.4 // indirect
|
||||||
@@ -51,7 +51,8 @@ require (
|
|||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||||
github.com/chenzhuoyu/iasm v0.9.0 // indirect
|
github.com/chenzhuoyu/iasm v0.9.0 // indirect
|
||||||
github.com/compose-spec/compose-go/v2 v2.0.0-rc.2 // indirect
|
github.com/cloudflare/cfssl v1.6.5 // indirect
|
||||||
|
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8.0.20240228111658-a0507e98fe60 // indirect
|
||||||
github.com/consensys/bavard v0.1.13 // indirect
|
github.com/consensys/bavard v0.1.13 // indirect
|
||||||
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||||
github.com/containerd/console v1.0.3 // indirect
|
github.com/containerd/console v1.0.3 // indirect
|
||||||
@@ -66,8 +67,8 @@ require (
|
|||||||
github.com/deckarep/golang-set v1.8.0 // indirect
|
github.com/deckarep/golang-set v1.8.0 // indirect
|
||||||
github.com/distribution/reference v0.5.0 // indirect
|
github.com/distribution/reference v0.5.0 // indirect
|
||||||
github.com/docker/buildx v0.12.0-rc2.0.20231219140829-617f538cb315 // indirect
|
github.com/docker/buildx v0.12.0-rc2.0.20231219140829-617f538cb315 // indirect
|
||||||
github.com/docker/cli v25.0.1+incompatible // indirect
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible // indirect
|
||||||
github.com/docker/compose/v2 v2.24.3 // indirect
|
github.com/docker/compose/v2 v2.24.7 // indirect
|
||||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||||
github.com/docker/docker-credential-helpers v0.8.0 // indirect
|
github.com/docker/docker-credential-helpers v0.8.0 // indirect
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
||||||
@@ -93,7 +94,6 @@ require (
|
|||||||
github.com/go-playground/locales v0.14.1 // indirect
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.15.5 // indirect
|
github.com/go-playground/validator/v10 v10.15.5 // indirect
|
||||||
github.com/go-sql-driver/mysql v1.7.1 // indirect
|
|
||||||
github.com/go-stack/stack v1.8.1 // indirect
|
github.com/go-stack/stack v1.8.1 // indirect
|
||||||
github.com/goccy/go-json v0.10.2 // indirect
|
github.com/goccy/go-json v0.10.2 // indirect
|
||||||
github.com/gofrs/flock v0.8.1 // indirect
|
github.com/gofrs/flock v0.8.1 // indirect
|
||||||
@@ -142,7 +142,6 @@ require (
|
|||||||
github.com/mailru/easyjson v0.7.6 // indirect
|
github.com/mailru/easyjson v0.7.6 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||||
github.com/mattn/go-shellwords v1.0.12 // indirect
|
github.com/mattn/go-shellwords v1.0.12 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||||
github.com/miekg/pkcs11 v1.1.1 // indirect
|
github.com/miekg/pkcs11 v1.1.1 // indirect
|
||||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||||
@@ -151,6 +150,7 @@ require (
|
|||||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||||
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231219135447-957cb50df991 // indirect
|
github.com/moby/buildkit v0.13.0-beta1.0.20231219135447-957cb50df991 // indirect
|
||||||
|
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||||
github.com/moby/locker v1.0.1 // indirect
|
github.com/moby/locker v1.0.1 // indirect
|
||||||
github.com/moby/patternmatcher v0.6.0 // indirect
|
github.com/moby/patternmatcher v0.6.0 // indirect
|
||||||
github.com/moby/spdystream v0.2.0 // indirect
|
github.com/moby/spdystream v0.2.0 // indirect
|
||||||
@@ -174,8 +174,8 @@ require (
|
|||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||||
github.com/prometheus/client_model v0.4.0 // indirect
|
github.com/prometheus/client_model v0.5.0 // indirect
|
||||||
github.com/prometheus/common v0.42.0 // indirect
|
github.com/prometheus/common v0.48.0 // indirect
|
||||||
github.com/prometheus/procfs v0.12.0 // indirect
|
github.com/prometheus/procfs v0.12.0 // indirect
|
||||||
github.com/prometheus/tsdb v0.7.1 // indirect
|
github.com/prometheus/tsdb v0.7.1 // indirect
|
||||||
github.com/rivo/uniseg v0.4.4 // indirect
|
github.com/rivo/uniseg v0.4.4 // indirect
|
||||||
@@ -192,8 +192,9 @@ require (
|
|||||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||||
github.com/spf13/cobra v1.8.0 // indirect
|
github.com/spf13/cobra v1.8.0 // indirect
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
github.com/spf13/viper v1.4.0 // indirect
|
||||||
github.com/status-im/keycard-go v0.2.0 // indirect
|
github.com/status-im/keycard-go v0.2.0 // indirect
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 // indirect
|
github.com/supranational/blst v0.3.11 // indirect
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||||
github.com/theupdateframework/notary v0.7.0 // indirect
|
github.com/theupdateframework/notary v0.7.0 // indirect
|
||||||
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect
|
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect
|
||||||
@@ -212,7 +213,7 @@ require (
|
|||||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 // indirect
|
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 // indirect
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
|
||||||
go.opentelemetry.io/otel v1.24.0 // indirect
|
go.opentelemetry.io/otel v1.24.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect
|
||||||
@@ -228,23 +229,23 @@ require (
|
|||||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||||
go.uber.org/mock v0.4.0 // indirect
|
go.uber.org/mock v0.4.0 // indirect
|
||||||
golang.org/x/arch v0.5.0 // indirect
|
golang.org/x/arch v0.5.0 // indirect
|
||||||
golang.org/x/crypto v0.17.0 // indirect
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
|
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
|
||||||
golang.org/x/mod v0.16.0 // indirect
|
golang.org/x/mod v0.16.0 // indirect
|
||||||
golang.org/x/net v0.18.0 // indirect
|
golang.org/x/net v0.20.0 // indirect
|
||||||
golang.org/x/oauth2 v0.11.0 // indirect
|
golang.org/x/oauth2 v0.16.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sync v0.6.0 // indirect
|
||||||
golang.org/x/sys v0.17.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
golang.org/x/term v0.15.0 // indirect
|
golang.org/x/term v0.17.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
golang.org/x/time v0.3.0 // indirect
|
||||||
golang.org/x/tools v0.15.0 // indirect
|
golang.org/x/tools v0.17.0 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect
|
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||||
google.golang.org/grpc v1.59.0 // indirect
|
google.golang.org/grpc v1.59.0 // indirect
|
||||||
google.golang.org/protobuf v1.31.0 // indirect
|
google.golang.org/protobuf v1.33.0 // indirect
|
||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||||
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
|
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
|
||||||
@@ -254,7 +255,7 @@ require (
|
|||||||
k8s.io/apimachinery v0.26.7 // indirect
|
k8s.io/apimachinery v0.26.7 // indirect
|
||||||
k8s.io/apiserver v0.26.7 // indirect
|
k8s.io/apiserver v0.26.7 // indirect
|
||||||
k8s.io/client-go v0.26.7 // indirect
|
k8s.io/client-go v0.26.7 // indirect
|
||||||
k8s.io/klog/v2 v2.90.1 // indirect
|
k8s.io/klog/v2 v2.100.1 // indirect
|
||||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||||
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
|
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
|
||||||
rsc.io/tmplfunc v0.0.3 // indirect
|
rsc.io/tmplfunc v0.0.3 // indirect
|
||||||
|
|||||||
237
common/go.sum
237
common/go.sum
@@ -1,7 +1,7 @@
|
|||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y=
|
cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o=
|
||||||
cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk=
|
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
|
||||||
cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=
|
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||||
@@ -12,11 +12,9 @@ github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59M
|
|||||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU=
|
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU=
|
||||||
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
|
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
|
||||||
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
|
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
|
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
|
||||||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
|
||||||
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
|
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
|
||||||
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
|
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
|
||||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||||
@@ -38,32 +36,33 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah
|
|||||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||||
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc=
|
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc=
|
||||||
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA=
|
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA=
|
||||||
|
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||||
github.com/aws/aws-sdk-go-v2 v1.17.6 h1:Y773UK7OBqhzi5VDXMi1zVGsoj+CVHs2eaC2bDsLwi0=
|
github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA=
|
||||||
github.com/aws/aws-sdk-go-v2 v1.17.6/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
|
github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM=
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.18.16 h1:4r7gsCu8Ekwl5iJGE/GmspA2UifqySCCkyyyPFeWs3w=
|
github.com/aws/aws-sdk-go-v2/config v1.18.45 h1:Aka9bI7n8ysuwPeFdm77nfbyHCAKQ3z9ghB3S/38zes=
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.18.16/go.mod h1:XjM6lVbq7UgELp9NjXBrb1DQY/ownlWsvDhEQksemJc=
|
github.com/aws/aws-sdk-go-v2/config v1.18.45/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE=
|
||||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.16 h1:GgToSxaENX/1zXIGNFfiVk4hxryYJ5Vt4Mh8XLAL7Lc=
|
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8=
|
||||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.16/go.mod h1:KP7aFJhfwPFgx9aoVYL2nYHjya5WBD98CWaadpgmnpY=
|
github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg=
|
||||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24 h1:5qyqXASrX2zy5cTnoHHa4N2c3Lc94GH7gjnBP3GwKdU=
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ=
|
||||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24/go.mod h1:neYVaeKr5eT7BzwULuG2YbLhzWZ22lpjKdCybR7AXrQ=
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg=
|
||||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 h1:y+8n9AGDjikyXoMBTRaHHHSaFEB8267ykmvyPodJfys=
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y=
|
||||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30/go.mod h1:LUBAO3zNXQjoONBKn/kR1y0Q4cj/D02Ts0uHYjcCQLM=
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ=
|
||||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 h1:r+Kv+SEJquhAZXaJ7G4u44cIwXV3f8K+N482NNAzJZA=
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 h1:JRVhO25+r3ar2mKGP7E0LDl8K9/G36gjlqca5iQbaqc=
|
||||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24/go.mod h1:gAuCezX/gob6BSMbItsSlMb6WZGV7K2+fWOvk8xBSto=
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8=
|
||||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31 h1:hf+Vhp5WtTdcSdE+yEcUz8L73sAzN0R+0jQv+Z51/mI=
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 h1:hze8YsjSh8Wl1rYa1CJpRmXP21BvOBuc76YhW0HsuQ4=
|
||||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31/go.mod h1:5zUjguZfG5qjhG9/wqmuyHRyUftl2B5Cp6NNxNC6kRA=
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE=
|
||||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 h1:c5qGfdbCHav6viBwiyDns3OXqhqAbGjfIB4uVu2ayhk=
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 h1:WWZA/I2K4ptBS1kg0kV1JbBtG/umed0vwHRrmcr9z7k=
|
||||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24/go.mod h1:HMA4FZG6fyib+NDo5bpIxX1EhYjrAOveZJY2YR0xrNE=
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck=
|
||||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 h1:bdKIX6SVF3nc3xJFw6Nf0igzS6Ff/louGq8Z6VP/3Hs=
|
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 h1:JuPGc7IkOP4AaqcZSIcyqLpFSqBWK32rM9+a1g6u73k=
|
||||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5/go.mod h1:vuWiaDB30M/QTC+lI3Wj6S/zb7tpUK2MSYgy3Guh2L0=
|
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo=
|
||||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 h1:xLPZMyuZ4GuqRCIec/zWuIhRFPXh2UOJdLXBSi64ZWQ=
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 h1:HFiiRkf1SdaAmV3/BHOFZ9DjFynPHj8G/UIO1lQS+fk=
|
||||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5/go.mod h1:QjxpHmCwAg0ESGtPQnLIVp7SedTOBMYy+Slr3IfMKeI=
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg=
|
||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 h1:rIFn5J3yDoeuKCE9sESXqM5POTAhOP1du3bv/qTL+tE=
|
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwFYTCZVhlsSSBvlbU=
|
||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6/go.mod h1:48WJ9l3dwP0GSHWGc5sFGGlCkuA82Mc2xnw+T6Q8aDw=
|
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ=
|
||||||
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
|
github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8=
|
||||||
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
|
github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
|
||||||
github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||||
@@ -110,15 +109,16 @@ github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpV
|
|||||||
github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
|
github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
|
||||||
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
|
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||||
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e85keuznYcH5rqI438v41pKcBl4ZxQ=
|
|
||||||
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
|
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
|
||||||
|
github.com/cloudflare/cfssl v1.6.5 h1:46zpNkm6dlNkMZH/wMW22ejih6gIaJbzL2du6vD7ZeI=
|
||||||
|
github.com/cloudflare/cfssl v1.6.5/go.mod h1:Bk1si7sq8h2+yVEDrFJiz3d7Aw+pfjjJSZVaD+Taky4=
|
||||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k=
|
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k=
|
||||||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||||
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
|
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
|
||||||
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
|
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
|
||||||
github.com/compose-spec/compose-go/v2 v2.0.0-rc.2 h1:eJ01FpliL/02KvsaPyH1bSLbM1S70yWQUojHVRbyvy4=
|
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8.0.20240228111658-a0507e98fe60 h1:NlkpaLBPFr05mNJWVMH7PP4L30gFG6k4z1QpypLUSh8=
|
||||||
github.com/compose-spec/compose-go/v2 v2.0.0-rc.2/go.mod h1:IVsvFyGVhw4FASzUtlWNVaAOhYmakXAFY9IlZ7LAuD8=
|
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8.0.20240228111658-a0507e98fe60/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc=
|
||||||
github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ=
|
github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ=
|
||||||
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
||||||
github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M=
|
github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M=
|
||||||
@@ -144,6 +144,11 @@ github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtO
|
|||||||
github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
|
github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
|
||||||
github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
|
github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
|
||||||
github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0=
|
github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0=
|
||||||
|
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||||
|
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||||
|
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||||
|
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
|
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||||
github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E=
|
github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E=
|
||||||
github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
|
github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
||||||
@@ -161,20 +166,21 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||||||
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
|
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
|
||||||
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
|
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
|
||||||
github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||||
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||||
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
|
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
|
||||||
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||||
github.com/docker/buildx v0.12.0-rc2.0.20231219140829-617f538cb315 h1:UZxx9xBADdf/9UmSdEUi+pdJoPKpgcf9QUAY5gEIYmY=
|
github.com/docker/buildx v0.12.0-rc2.0.20231219140829-617f538cb315 h1:UZxx9xBADdf/9UmSdEUi+pdJoPKpgcf9QUAY5gEIYmY=
|
||||||
github.com/docker/buildx v0.12.0-rc2.0.20231219140829-617f538cb315/go.mod h1:X8ZHhuW6ncwtoJ36TlU+gyaROTcBkTE01VHYmTStQCE=
|
github.com/docker/buildx v0.12.0-rc2.0.20231219140829-617f538cb315/go.mod h1:X8ZHhuW6ncwtoJ36TlU+gyaROTcBkTE01VHYmTStQCE=
|
||||||
github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbTO1lpcGSkU=
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible h1:xhVCHXq+P5LhT31+RuDuk0xXEbEnd50Fr37J1bGuyWg=
|
||||||
github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||||
github.com/docker/compose/v2 v2.24.3 h1:BVc1oDV7aQgksH64pDKTvcI95G36uJ+Mz9DGGBBoZeQ=
|
github.com/docker/compose/v2 v2.24.7 h1:1WSo4CVf18tnGJMC6V78jYsAxSDD61ry6L3JwVT+8EI=
|
||||||
github.com/docker/compose/v2 v2.24.3/go.mod h1:D8Nv9+juzD7xiMyyHJ7G2J/MOYiGBmb9SvdIW5+2zKo=
|
github.com/docker/compose/v2 v2.24.7/go.mod h1:7U3QbXdRJfBylTgkdlrjOg8hWLZqM09mof9DVZ5Fh4E=
|
||||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ=
|
github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM=
|
||||||
github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8=
|
github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8=
|
||||||
github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40=
|
github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40=
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||||
@@ -224,6 +230,7 @@ github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q
|
|||||||
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
|
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
|
||||||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=
|
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=
|
||||||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
|
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
|
||||||
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
github.com/gin-contrib/pprof v1.4.0 h1:XxiBSf5jWZ5i16lNOPbMTVdgHBdhfGRD5PZ1LWazzvg=
|
github.com/gin-contrib/pprof v1.4.0 h1:XxiBSf5jWZ5i16lNOPbMTVdgHBdhfGRD5PZ1LWazzvg=
|
||||||
github.com/gin-contrib/pprof v1.4.0/go.mod h1:RrehPJasUVBPK6yTUwOl8/NP6i0vbUgmxtis+Z5KE90=
|
github.com/gin-contrib/pprof v1.4.0/go.mod h1:RrehPJasUVBPK6yTUwOl8/NP6i0vbUgmxtis+Z5KE90=
|
||||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||||
@@ -283,12 +290,14 @@ github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0
|
|||||||
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
|
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
|
||||||
github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
|
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
|
github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
|
||||||
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
|
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
|
||||||
|
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
@@ -311,8 +320,10 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
|
|||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93 h1:jc2UWq7CbdszqeH6qu1ougXMIUBfSy8Pbh/anURYbGI=
|
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
|
github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
|
||||||
|
github.com/google/certificate-transparency-go v1.1.7 h1:IASD+NtgSTJLPdzkthwvAG1ZVbF2WtFg4IvoA68XGSw=
|
||||||
|
github.com/google/certificate-transparency-go v1.1.7/go.mod h1:FSSBo8fyMVgqptbfF6j5p/XNdgQftAhSmXcIxV9iphE=
|
||||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||||
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
@@ -336,11 +347,15 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
|
|||||||
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||||
|
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
|
||||||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
|
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
|
||||||
@@ -358,6 +373,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO
|
|||||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs=
|
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs=
|
||||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||||
|
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||||
|
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||||
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
|
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
|
||||||
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
|
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
|
||||||
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
|
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
|
||||||
@@ -380,10 +397,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI
|
|||||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||||
github.com/jackc/pgx/v5 v5.3.0/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8=
|
|
||||||
github.com/jackc/pgx/v5 v5.5.4 h1:Xp2aQS8uXButQdnCMWNmvx6UysWQQC+u1EoizjguY+8=
|
github.com/jackc/pgx/v5 v5.5.4 h1:Xp2aQS8uXButQdnCMWNmvx6UysWQQC+u1EoizjguY+8=
|
||||||
github.com/jackc/pgx/v5 v5.5.4/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
|
github.com/jackc/pgx/v5 v5.5.4/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
|
||||||
github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
|
||||||
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
|
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
|
||||||
github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
||||||
@@ -399,6 +414,9 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
|||||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
|
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
|
||||||
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
|
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
|
||||||
|
github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g=
|
||||||
|
github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ=
|
||||||
|
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||||
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
|
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
|
||||||
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
|
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
|
||||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||||
@@ -412,6 +430,7 @@ github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVE
|
|||||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||||
|
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||||
@@ -445,6 +464,7 @@ github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
|||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||||
github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||||
|
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
@@ -466,8 +486,6 @@ github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebG
|
|||||||
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
||||||
github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||||
github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
|
github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
|
||||||
@@ -476,6 +494,7 @@ github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT
|
|||||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||||
github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
|
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
@@ -488,6 +507,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
|
|||||||
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
|
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231219135447-957cb50df991 h1:r80LLQ91uOLxU1ElAvrB1o8oBsph51lPzVnr7t2b200=
|
github.com/moby/buildkit v0.13.0-beta1.0.20231219135447-957cb50df991 h1:r80LLQ91uOLxU1ElAvrB1o8oBsph51lPzVnr7t2b200=
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231219135447-957cb50df991/go.mod h1:6MddWPSL5jxy+W8eMMHWDOfZzzRRKWXPZqajw72YHBc=
|
github.com/moby/buildkit v0.13.0-beta1.0.20231219135447-957cb50df991/go.mod h1:6MddWPSL5jxy+W8eMMHWDOfZzzRRKWXPZqajw72YHBc=
|
||||||
|
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||||
|
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||||
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
|
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
|
||||||
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
|
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
|
||||||
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
|
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
|
||||||
@@ -554,6 +575,7 @@ github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsq
|
|||||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||||
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
|
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
|
||||||
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
|
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
|
||||||
|
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||||
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||||
@@ -570,24 +592,27 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF
|
|||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||||
github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
|
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
||||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||||
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
|
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
|
||||||
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
|
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
|
||||||
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
|
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
|
||||||
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY=
|
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
||||||
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
|
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
||||||
github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||||
|
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||||
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
|
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
|
||||||
github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
|
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
|
||||||
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
|
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
|
||||||
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
|
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||||
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
||||||
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
||||||
@@ -599,6 +624,7 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
|||||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=
|
github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=
|
||||||
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
||||||
|
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||||
@@ -631,21 +657,28 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
|
|||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
|
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||||
github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE=
|
github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE=
|
||||||
github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU=
|
github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU=
|
||||||
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94 h1:JmfC365KywYwHB946TTiQWEb8kqPY+pybPLoGE9GgVk=
|
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
||||||
|
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||||
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
||||||
|
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
||||||
|
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||||
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||||
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
||||||
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
||||||
github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431 h1:XTHrT015sxHyJ5FnQ0AeemSspZWaDq7DoTRW0EVsDCE=
|
|
||||||
github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||||
|
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
||||||
|
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||||
github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
|
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c h1:2EejZtjFjKJGk71ANb+wtFK5EjUzUkEM3R0xnp559xg=
|
|
||||||
github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
|
github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
|
||||||
|
github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU=
|
||||||
|
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||||
github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA=
|
github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA=
|
||||||
github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg=
|
github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg=
|
||||||
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
||||||
@@ -667,16 +700,16 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
|
|||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 h1:wh1wzwAhZBNiZO37uWS/nDaKiIwHz4mDo4pnA+fqTO0=
|
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
||||||
github.com/testcontainers/testcontainers-go v0.28.0 h1:1HLm9qm+J5VikzFDYhOd+Zw12NtOl+8drH2E8nTY1r8=
|
github.com/testcontainers/testcontainers-go v0.30.0 h1:jmn/XS22q4YRrcMwWg0pAwlClzs/abopbsBzrepyc4E=
|
||||||
github.com/testcontainers/testcontainers-go v0.28.0/go.mod h1:COlDpUXbwW3owtpMkEB1zo9gwb1CoKVKlyrVPejF4AU=
|
github.com/testcontainers/testcontainers-go v0.30.0/go.mod h1:K+kHNGiM5zjklKjgTtcrEetF3uhWbMUyqAQoyoh8Pf0=
|
||||||
github.com/testcontainers/testcontainers-go/modules/compose v0.28.0 h1:QOCeTYZIYixg796Ik60MOaeMgpAKPbQd5pJOdTrftyg=
|
github.com/testcontainers/testcontainers-go/modules/compose v0.30.0 h1:k5ZbLDlO9AGJ5N2GRqVXL3L2gs+ZHXBfTpT2+jFNtgA=
|
||||||
github.com/testcontainers/testcontainers-go/modules/compose v0.28.0/go.mod h1:lShXm8oldlLck3ltA5u+ShSvUnZ+wiNxwpp8wAQGZ1Y=
|
github.com/testcontainers/testcontainers-go/modules/compose v0.30.0/go.mod h1:+9x1MOKxi1SF+s7iuNxwW0fRQMm4trp6QvZm1fiJdaA=
|
||||||
github.com/testcontainers/testcontainers-go/modules/postgres v0.28.0 h1:ff0s4JdYIdNAVSi/SrpN2Pdt1f+IjIw3AKjbHau8Un4=
|
github.com/testcontainers/testcontainers-go/modules/postgres v0.30.0 h1:D3HFqpZS90iRGAN7M85DFiuhPfvYvFNnx8urQ6mPAvo=
|
||||||
github.com/testcontainers/testcontainers-go/modules/postgres v0.28.0/go.mod h1:fXgcYpbyrduNdiz2qRZuYkmvqLnEqsjbQiBNYH1ystI=
|
github.com/testcontainers/testcontainers-go/modules/postgres v0.30.0/go.mod h1:e1sKxwUOkqzvaqdHl/oV9mUtFmkDPTfBGp0po2tnWQU=
|
||||||
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
|
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
|
||||||
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
|
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
|
||||||
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=
|
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=
|
||||||
@@ -685,6 +718,7 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA
|
|||||||
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
|
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
|
||||||
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
|
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
|
||||||
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
|
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
|
||||||
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||||
github.com/tonistiigi/fsutil v0.0.0-20230825212630-f09800878302 h1:ZT8ibgassurSISJ1Pj26NsM3vY2jxFZn63Nd/TpHmRw=
|
github.com/tonistiigi/fsutil v0.0.0-20230825212630-f09800878302 h1:ZT8ibgassurSISJ1Pj26NsM3vY2jxFZn63Nd/TpHmRw=
|
||||||
github.com/tonistiigi/fsutil v0.0.0-20230825212630-f09800878302/go.mod h1:9kMVqMyQ/Sx2df5LtnGG+nbrmiZzCS7V6gjW3oGHsvI=
|
github.com/tonistiigi/fsutil v0.0.0-20230825212630-f09800878302/go.mod h1:9kMVqMyQ/Sx2df5LtnGG+nbrmiZzCS7V6gjW3oGHsvI=
|
||||||
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0=
|
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0=
|
||||||
@@ -695,6 +729,7 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
|
|||||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
|
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
|
||||||
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
|
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
|
||||||
|
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
||||||
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
|
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
|
||||||
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
||||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||||
@@ -703,6 +738,8 @@ github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=
|
|||||||
github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
|
github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
|
||||||
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
|
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
|
||||||
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
|
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
|
||||||
|
github.com/weppos/publicsuffix-go v0.30.0 h1:QHPZ2GRu/YE7cvejH9iyavPOkVCB4dNxp2ZvtT+vQLY=
|
||||||
|
github.com/weppos/publicsuffix-go v0.30.0/go.mod h1:kBi8zwYnR0zrbm8RcuN1o9Fzgpnnn+btVN8uWPMyXAY=
|
||||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
|
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
|
||||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||||
@@ -710,6 +747,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
|
|||||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||||
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
|
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
@@ -717,14 +756,19 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
|
|||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
|
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
|
||||||
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||||
|
github.com/zmap/zcrypto v0.0.0-20230310154051-c8b263fd8300 h1:DZH5n7L3L8RxKdSyJHZt7WePgwdhHnPhQFdQSJaHF+o=
|
||||||
|
github.com/zmap/zcrypto v0.0.0-20230310154051-c8b263fd8300/go.mod h1:mOd4yUMgn2fe2nV9KXsa9AyQBFZGzygVPovsZR+Rl5w=
|
||||||
|
github.com/zmap/zlint/v3 v3.5.0 h1:Eh2B5t6VKgVH0DFmTwOqE50POvyDhUaU9T2mJOe1vfQ=
|
||||||
|
github.com/zmap/zlint/v3 v3.5.0/go.mod h1:JkNSrsDJ8F4VRtBZcYUQSvnWFL7utcjDIn+FE64mlBI=
|
||||||
|
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A=
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A=
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM=
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 h1:2ea0IkZBsWH+HA2GkD+7+hRw2u97jzdFyRtXuO14a1s=
|
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 h1:2ea0IkZBsWH+HA2GkD+7+hRw2u97jzdFyRtXuO14a1s=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0/go.mod h1:4m3RnBBb+7dB9d21y510oO1pdB1V4J6smNf14WXcBFQ=
|
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0/go.mod h1:4m3RnBBb+7dB9d21y510oO1pdB1V4J6smNf14WXcBFQ=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg=
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q=
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
|
||||||
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
|
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
|
||||||
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
|
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU=
|
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU=
|
||||||
@@ -771,12 +815,11 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
|||||||
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw=
|
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o=
|
||||||
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
@@ -789,9 +832,11 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r
|
|||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
@@ -801,12 +846,11 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R
|
|||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU=
|
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
|
||||||
golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk=
|
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@@ -815,7 +859,6 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@@ -863,20 +906,20 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
|||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
|
||||||
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||||
@@ -887,8 +930,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
|
|||||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
|
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||||
golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk=
|
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
@@ -902,14 +945,15 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98
|
|||||||
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||||
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg=
|
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY=
|
||||||
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY=
|
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo=
|
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4=
|
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
|
||||||
google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
|
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||||
@@ -929,8 +973,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
|||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII=
|
gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII=
|
||||||
@@ -948,12 +992,14 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
|||||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
|
||||||
|
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||||
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM=
|
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM=
|
||||||
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw=
|
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw=
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||||
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
|
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
|
||||||
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
||||||
|
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
@@ -966,11 +1012,10 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/driver/postgres v1.5.0 h1:u2FXTy14l45qc3UeCJ7QaAXZmZfDDv0YrthvmRq1l0U=
|
gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM=
|
||||||
gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1Ce9A=
|
gorm.io/driver/postgres v1.5.7/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA=
|
||||||
gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde h1:9DShaph9qhkIYw7QF91I/ynrr4cOO2PZra2PFD7Mfeg=
|
||||||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
|
||||||
gotest.tools v1.4.0 h1:BjtEgfuw8Qyd+jPvQz8CfoxiO/UjFEidWinwEXZiWv0=
|
gotest.tools v1.4.0 h1:BjtEgfuw8Qyd+jPvQz8CfoxiO/UjFEidWinwEXZiWv0=
|
||||||
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
||||||
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
||||||
@@ -984,8 +1029,8 @@ k8s.io/apiserver v0.26.7 h1:NX/zBZZn4R+Cq6shwyn8Pn8REd0yJJ16dbtv9WkEVEU=
|
|||||||
k8s.io/apiserver v0.26.7/go.mod h1:r0wDRWHI7VL/KlQLTkJJBVGZ3KeNfv+VetlyRtr86xs=
|
k8s.io/apiserver v0.26.7/go.mod h1:r0wDRWHI7VL/KlQLTkJJBVGZ3KeNfv+VetlyRtr86xs=
|
||||||
k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E=
|
k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E=
|
||||||
k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo=
|
k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo=
|
||||||
k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
|
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
||||||
k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
|
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
|
||||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
|
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
|
||||||
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk=
|
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk=
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
package encoding
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"math/big"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/core/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ConstructSkippedBitmap constructs skipped L1 message bitmap of the batch.
|
|
||||||
func ConstructSkippedBitmap(batchIndex uint64, chunks []*Chunk, totalL1MessagePoppedBefore uint64) ([]byte, uint64, error) {
|
|
||||||
// skipped L1 message bitmap, an array of 256-bit bitmaps
|
|
||||||
var skippedBitmap []*big.Int
|
|
||||||
|
|
||||||
// the first queue index that belongs to this batch
|
|
||||||
baseIndex := totalL1MessagePoppedBefore
|
|
||||||
|
|
||||||
// the next queue index that we need to process
|
|
||||||
nextIndex := totalL1MessagePoppedBefore
|
|
||||||
|
|
||||||
for chunkID, chunk := range chunks {
|
|
||||||
for blockID, block := range chunk.Blocks {
|
|
||||||
for _, tx := range block.Transactions {
|
|
||||||
if tx.Type != types.L1MessageTxType {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
currentIndex := tx.Nonce
|
|
||||||
|
|
||||||
if currentIndex < nextIndex {
|
|
||||||
return nil, 0, fmt.Errorf("unexpected batch payload, expected queue index: %d, got: %d. Batch index: %d, chunk index in batch: %d, block index in chunk: %d, block hash: %v, transaction hash: %v", nextIndex, currentIndex, batchIndex, chunkID, blockID, block.Header.Hash(), tx.TxHash)
|
|
||||||
}
|
|
||||||
|
|
||||||
// mark skipped messages
|
|
||||||
for skippedIndex := nextIndex; skippedIndex < currentIndex; skippedIndex++ {
|
|
||||||
quo := int((skippedIndex - baseIndex) / 256)
|
|
||||||
rem := int((skippedIndex - baseIndex) % 256)
|
|
||||||
for len(skippedBitmap) <= quo {
|
|
||||||
bitmap := big.NewInt(0)
|
|
||||||
skippedBitmap = append(skippedBitmap, bitmap)
|
|
||||||
}
|
|
||||||
skippedBitmap[quo].SetBit(skippedBitmap[quo], rem, 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// process included message
|
|
||||||
quo := int((currentIndex - baseIndex) / 256)
|
|
||||||
for len(skippedBitmap) <= quo {
|
|
||||||
bitmap := big.NewInt(0)
|
|
||||||
skippedBitmap = append(skippedBitmap, bitmap)
|
|
||||||
}
|
|
||||||
|
|
||||||
nextIndex = currentIndex + 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bitmapBytes := make([]byte, len(skippedBitmap)*32)
|
|
||||||
for ii, num := range skippedBitmap {
|
|
||||||
bytes := num.Bytes()
|
|
||||||
padding := 32 - len(bytes)
|
|
||||||
copy(bitmapBytes[32*ii+padding:], bytes)
|
|
||||||
}
|
|
||||||
|
|
||||||
return bitmapBytes, nextIndex, nil
|
|
||||||
}
|
|
||||||
@@ -1,461 +0,0 @@
|
|||||||
package codecv0
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/binary"
|
|
||||||
"encoding/hex"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"math"
|
|
||||||
"math/big"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
|
||||||
"github.com/scroll-tech/go-ethereum/core/types"
|
|
||||||
"github.com/scroll-tech/go-ethereum/crypto"
|
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CodecV0Version denotes the version of the codec.
|
|
||||||
const CodecV0Version = 0
|
|
||||||
|
|
||||||
// DABlock represents a Data Availability Block.
|
|
||||||
type DABlock struct {
|
|
||||||
BlockNumber uint64
|
|
||||||
Timestamp uint64
|
|
||||||
BaseFee *big.Int
|
|
||||||
GasLimit uint64
|
|
||||||
NumTransactions uint16
|
|
||||||
NumL1Messages uint16
|
|
||||||
}
|
|
||||||
|
|
||||||
// DAChunk groups consecutive DABlocks with their transactions.
|
|
||||||
type DAChunk struct {
|
|
||||||
Blocks []*DABlock
|
|
||||||
Transactions [][]*types.TransactionData
|
|
||||||
}
|
|
||||||
|
|
||||||
// DABatch contains metadata about a batch of DAChunks.
|
|
||||||
type DABatch struct {
|
|
||||||
Version uint8
|
|
||||||
BatchIndex uint64
|
|
||||||
L1MessagePopped uint64
|
|
||||||
TotalL1MessagePopped uint64
|
|
||||||
DataHash common.Hash
|
|
||||||
ParentBatchHash common.Hash
|
|
||||||
SkippedL1MessageBitmap []byte
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDABlock creates a new DABlock from the given encoding.Block and the total number of L1 messages popped before.
|
|
||||||
func NewDABlock(block *encoding.Block, totalL1MessagePoppedBefore uint64) (*DABlock, error) {
|
|
||||||
if !block.Header.Number.IsUint64() {
|
|
||||||
return nil, errors.New("block number is not uint64")
|
|
||||||
}
|
|
||||||
|
|
||||||
// note: numL1Messages includes skipped messages
|
|
||||||
numL1Messages := block.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
if numL1Messages > math.MaxUint16 {
|
|
||||||
return nil, errors.New("number of L1 messages exceeds max uint16")
|
|
||||||
}
|
|
||||||
|
|
||||||
// note: numTransactions includes skipped messages
|
|
||||||
numL2Transactions := block.NumL2Transactions()
|
|
||||||
numTransactions := numL1Messages + numL2Transactions
|
|
||||||
if numTransactions > math.MaxUint16 {
|
|
||||||
return nil, errors.New("number of transactions exceeds max uint16")
|
|
||||||
}
|
|
||||||
|
|
||||||
daBlock := DABlock{
|
|
||||||
BlockNumber: block.Header.Number.Uint64(),
|
|
||||||
Timestamp: block.Header.Time,
|
|
||||||
BaseFee: block.Header.BaseFee,
|
|
||||||
GasLimit: block.Header.GasLimit,
|
|
||||||
NumTransactions: uint16(numTransactions),
|
|
||||||
NumL1Messages: uint16(numL1Messages),
|
|
||||||
}
|
|
||||||
|
|
||||||
return &daBlock, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode serializes the DABlock into a slice of bytes.
|
|
||||||
func (b *DABlock) Encode() []byte {
|
|
||||||
bytes := make([]byte, 60)
|
|
||||||
binary.BigEndian.PutUint64(bytes[0:], b.BlockNumber)
|
|
||||||
binary.BigEndian.PutUint64(bytes[8:], b.Timestamp)
|
|
||||||
if b.BaseFee != nil {
|
|
||||||
binary.BigEndian.PutUint64(bytes[40:], b.BaseFee.Uint64())
|
|
||||||
}
|
|
||||||
binary.BigEndian.PutUint64(bytes[48:], b.GasLimit)
|
|
||||||
binary.BigEndian.PutUint16(bytes[56:], b.NumTransactions)
|
|
||||||
binary.BigEndian.PutUint16(bytes[58:], b.NumL1Messages)
|
|
||||||
return bytes
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDAChunk creates a new DAChunk from the given encoding.Chunk and the total number of L1 messages popped before.
|
|
||||||
func NewDAChunk(chunk *encoding.Chunk, totalL1MessagePoppedBefore uint64) (*DAChunk, error) {
|
|
||||||
var blocks []*DABlock
|
|
||||||
var txs [][]*types.TransactionData
|
|
||||||
|
|
||||||
if chunk == nil {
|
|
||||||
return nil, errors.New("chunk is nil")
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(chunk.Blocks) == 0 {
|
|
||||||
return nil, errors.New("number of blocks is 0")
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(chunk.Blocks) > 255 {
|
|
||||||
return nil, errors.New("number of blocks exceeds 1 byte")
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, block := range chunk.Blocks {
|
|
||||||
b, err := NewDABlock(block, totalL1MessagePoppedBefore)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
blocks = append(blocks, b)
|
|
||||||
totalL1MessagePoppedBefore += block.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
txs = append(txs, block.Transactions)
|
|
||||||
}
|
|
||||||
|
|
||||||
daChunk := DAChunk{
|
|
||||||
Blocks: blocks,
|
|
||||||
Transactions: txs,
|
|
||||||
}
|
|
||||||
|
|
||||||
return &daChunk, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode serializes the DAChunk into a slice of bytes.
|
|
||||||
func (c *DAChunk) Encode() ([]byte, error) {
|
|
||||||
var chunkBytes []byte
|
|
||||||
chunkBytes = append(chunkBytes, byte(len(c.Blocks)))
|
|
||||||
|
|
||||||
var l2TxDataBytes []byte
|
|
||||||
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
chunkBytes = append(chunkBytes, block.Encode()...)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, blockTxs := range c.Transactions {
|
|
||||||
for _, txData := range blockTxs {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
var txLen [4]byte
|
|
||||||
rlpTxData, err := encoding.ConvertTxDataToRLPEncoding(txData)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
binary.BigEndian.PutUint32(txLen[:], uint32(len(rlpTxData)))
|
|
||||||
l2TxDataBytes = append(l2TxDataBytes, txLen[:]...)
|
|
||||||
l2TxDataBytes = append(l2TxDataBytes, rlpTxData...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
chunkBytes = append(chunkBytes, l2TxDataBytes...)
|
|
||||||
return chunkBytes, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash computes the hash of the DAChunk data.
|
|
||||||
func (c *DAChunk) Hash() (common.Hash, error) {
|
|
||||||
chunkBytes, err := c.Encode()
|
|
||||||
if err != nil {
|
|
||||||
return common.Hash{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(chunkBytes) == 0 {
|
|
||||||
return common.Hash{}, errors.New("chunk data is empty and cannot be processed")
|
|
||||||
}
|
|
||||||
numBlocks := chunkBytes[0]
|
|
||||||
|
|
||||||
// concatenate block contexts
|
|
||||||
var dataBytes []byte
|
|
||||||
for i := 0; i < int(numBlocks); i++ {
|
|
||||||
// only the first 58 bytes of each BlockContext are needed for the hashing process
|
|
||||||
dataBytes = append(dataBytes, chunkBytes[1+60*i:60*i+59]...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// concatenate l1 and l2 tx hashes
|
|
||||||
for _, blockTxs := range c.Transactions {
|
|
||||||
var l1TxHashes []byte
|
|
||||||
var l2TxHashes []byte
|
|
||||||
for _, txData := range blockTxs {
|
|
||||||
txHash := strings.TrimPrefix(txData.TxHash, "0x")
|
|
||||||
hashBytes, err := hex.DecodeString(txHash)
|
|
||||||
if err != nil {
|
|
||||||
return common.Hash{}, fmt.Errorf("failed to decode tx hash from TransactionData: hash=%v, err=%w", txData.TxHash, err)
|
|
||||||
}
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
l1TxHashes = append(l1TxHashes, hashBytes...)
|
|
||||||
} else {
|
|
||||||
l2TxHashes = append(l2TxHashes, hashBytes...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dataBytes = append(dataBytes, l1TxHashes...)
|
|
||||||
dataBytes = append(dataBytes, l2TxHashes...)
|
|
||||||
}
|
|
||||||
|
|
||||||
hash := crypto.Keccak256Hash(dataBytes)
|
|
||||||
return hash, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDABatch creates a DABatch from the provided encoding.Batch.
|
|
||||||
func NewDABatch(batch *encoding.Batch) (*DABatch, error) {
|
|
||||||
// compute batch data hash
|
|
||||||
var dataBytes []byte
|
|
||||||
totalL1MessagePoppedBeforeChunk := batch.TotalL1MessagePoppedBefore
|
|
||||||
|
|
||||||
for _, chunk := range batch.Chunks {
|
|
||||||
// build data hash
|
|
||||||
daChunk, err := NewDAChunk(chunk, totalL1MessagePoppedBeforeChunk)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
totalL1MessagePoppedBeforeChunk += chunk.NumL1Messages(totalL1MessagePoppedBeforeChunk)
|
|
||||||
daChunkHash, err := daChunk.Hash()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
dataBytes = append(dataBytes, daChunkHash.Bytes()...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// compute data hash
|
|
||||||
dataHash := crypto.Keccak256Hash(dataBytes)
|
|
||||||
|
|
||||||
// skipped L1 messages bitmap
|
|
||||||
bitmapBytes, totalL1MessagePoppedAfter, err := encoding.ConstructSkippedBitmap(batch.Index, batch.Chunks, batch.TotalL1MessagePoppedBefore)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
daBatch := DABatch{
|
|
||||||
Version: CodecV0Version,
|
|
||||||
BatchIndex: batch.Index,
|
|
||||||
L1MessagePopped: totalL1MessagePoppedAfter - batch.TotalL1MessagePoppedBefore,
|
|
||||||
TotalL1MessagePopped: totalL1MessagePoppedAfter,
|
|
||||||
DataHash: dataHash,
|
|
||||||
ParentBatchHash: batch.ParentBatchHash,
|
|
||||||
SkippedL1MessageBitmap: bitmapBytes,
|
|
||||||
}
|
|
||||||
|
|
||||||
return &daBatch, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDABatchFromBytes attempts to decode the given byte slice into a DABatch.
|
|
||||||
func NewDABatchFromBytes(data []byte) (*DABatch, error) {
|
|
||||||
if len(data) < 89 {
|
|
||||||
return nil, fmt.Errorf("insufficient data for DABatch, expected at least 89 bytes but got %d", len(data))
|
|
||||||
}
|
|
||||||
|
|
||||||
b := &DABatch{
|
|
||||||
Version: data[0],
|
|
||||||
BatchIndex: binary.BigEndian.Uint64(data[1:9]),
|
|
||||||
L1MessagePopped: binary.BigEndian.Uint64(data[9:17]),
|
|
||||||
TotalL1MessagePopped: binary.BigEndian.Uint64(data[17:25]),
|
|
||||||
DataHash: common.BytesToHash(data[25:57]),
|
|
||||||
ParentBatchHash: common.BytesToHash(data[57:89]),
|
|
||||||
SkippedL1MessageBitmap: data[89:],
|
|
||||||
}
|
|
||||||
|
|
||||||
return b, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode serializes the DABatch into bytes.
|
|
||||||
func (b *DABatch) Encode() []byte {
|
|
||||||
batchBytes := make([]byte, 89+len(b.SkippedL1MessageBitmap))
|
|
||||||
batchBytes[0] = b.Version
|
|
||||||
binary.BigEndian.PutUint64(batchBytes[1:], b.BatchIndex)
|
|
||||||
binary.BigEndian.PutUint64(batchBytes[9:], b.L1MessagePopped)
|
|
||||||
binary.BigEndian.PutUint64(batchBytes[17:], b.TotalL1MessagePopped)
|
|
||||||
copy(batchBytes[25:], b.DataHash[:])
|
|
||||||
copy(batchBytes[57:], b.ParentBatchHash[:])
|
|
||||||
copy(batchBytes[89:], b.SkippedL1MessageBitmap[:])
|
|
||||||
return batchBytes
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash computes the hash of the serialized DABatch.
|
|
||||||
func (b *DABatch) Hash() common.Hash {
|
|
||||||
bytes := b.Encode()
|
|
||||||
return crypto.Keccak256Hash(bytes)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DecodeFromCalldata attempts to decode a DABatch and an array of DAChunks from the provided calldata byte slice.
|
|
||||||
func DecodeFromCalldata(data []byte) (*DABatch, []*DAChunk, error) {
|
|
||||||
// TODO: implement this function.
|
|
||||||
return nil, nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// CalldataNonZeroByteGas is the gas consumption per non zero byte in calldata.
|
|
||||||
const CalldataNonZeroByteGas = 16
|
|
||||||
|
|
||||||
// GetKeccak256Gas calculates the gas cost for computing the keccak256 hash of a given size.
|
|
||||||
func GetKeccak256Gas(size uint64) uint64 {
|
|
||||||
return GetMemoryExpansionCost(size) + 30 + 6*((size+31)/32)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetMemoryExpansionCost calculates the cost of memory expansion for a given memoryByteSize.
|
|
||||||
func GetMemoryExpansionCost(memoryByteSize uint64) uint64 {
|
|
||||||
memorySizeWord := (memoryByteSize + 31) / 32
|
|
||||||
memoryCost := (memorySizeWord*memorySizeWord)/512 + (3 * memorySizeWord)
|
|
||||||
return memoryCost
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBlockL1CommitCalldataSize calculates the calldata size in l1 commit for this block approximately.
|
|
||||||
func EstimateBlockL1CommitCalldataSize(b *encoding.Block) (uint64, error) {
|
|
||||||
var size uint64
|
|
||||||
for _, txData := range b.Transactions {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
size += 4 // 4 bytes payload length
|
|
||||||
txPayloadLength, err := getTxPayloadLength(txData)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
size += txPayloadLength
|
|
||||||
}
|
|
||||||
size += 60 // 60 bytes BlockContext
|
|
||||||
return size, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBlockL1CommitGas calculates the total L1 commit gas for this block approximately.
|
|
||||||
func EstimateBlockL1CommitGas(b *encoding.Block) (uint64, error) {
|
|
||||||
var total uint64
|
|
||||||
var numL1Messages uint64
|
|
||||||
for _, txData := range b.Transactions {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
numL1Messages++
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
txPayloadLength, err := getTxPayloadLength(txData)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
total += CalldataNonZeroByteGas * txPayloadLength // an over-estimate: treat each byte as non-zero
|
|
||||||
total += CalldataNonZeroByteGas * 4 // 4 bytes payload length
|
|
||||||
total += GetKeccak256Gas(txPayloadLength) // l2 tx hash
|
|
||||||
}
|
|
||||||
|
|
||||||
// 60 bytes BlockContext calldata
|
|
||||||
total += CalldataNonZeroByteGas * 60
|
|
||||||
|
|
||||||
// sload
|
|
||||||
total += 2100 * numL1Messages // numL1Messages times cold sload in L1MessageQueue
|
|
||||||
|
|
||||||
// staticcall
|
|
||||||
total += 100 * numL1Messages // numL1Messages times call to L1MessageQueue
|
|
||||||
total += 100 * numL1Messages // numL1Messages times warm address access to L1MessageQueue
|
|
||||||
|
|
||||||
total += GetMemoryExpansionCost(36) * numL1Messages // staticcall to proxy
|
|
||||||
total += 100 * numL1Messages // read admin in proxy
|
|
||||||
total += 100 * numL1Messages // read impl in proxy
|
|
||||||
total += 100 * numL1Messages // access impl
|
|
||||||
total += GetMemoryExpansionCost(36) * numL1Messages // delegatecall to impl
|
|
||||||
|
|
||||||
return total, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateChunkL1CommitCalldataSize calculates the calldata size needed for committing a chunk to L1 approximately.
|
|
||||||
func EstimateChunkL1CommitCalldataSize(c *encoding.Chunk) (uint64, error) {
|
|
||||||
var totalL1CommitCalldataSize uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
blockL1CommitCalldataSize, err := EstimateBlockL1CommitCalldataSize(block)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
totalL1CommitCalldataSize += blockL1CommitCalldataSize
|
|
||||||
}
|
|
||||||
return totalL1CommitCalldataSize, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateChunkL1CommitGas calculates the total L1 commit gas for this chunk approximately.
|
|
||||||
func EstimateChunkL1CommitGas(c *encoding.Chunk) (uint64, error) {
|
|
||||||
var totalTxNum uint64
|
|
||||||
var totalL1CommitGas uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
totalTxNum += uint64(len(block.Transactions))
|
|
||||||
blockL1CommitGas, err := EstimateBlockL1CommitGas(block)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
totalL1CommitGas += blockL1CommitGas
|
|
||||||
}
|
|
||||||
|
|
||||||
numBlocks := uint64(len(c.Blocks))
|
|
||||||
totalL1CommitGas += 100 * numBlocks // numBlocks times warm sload
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas // numBlocks field of chunk encoding in calldata
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas * numBlocks * 60 // numBlocks of BlockContext in chunk
|
|
||||||
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(58*numBlocks + 32*totalTxNum) // chunk hash
|
|
||||||
return totalL1CommitGas, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBatchL1CommitGas calculates the total L1 commit gas for this batch approximately.
|
|
||||||
func EstimateBatchL1CommitGas(b *encoding.Batch) (uint64, error) {
|
|
||||||
var totalL1CommitGas uint64
|
|
||||||
|
|
||||||
// Add extra gas costs
|
|
||||||
totalL1CommitGas += 100000 // constant to account for ops like _getAdmin, _implementation, _requireNotPaused, etc
|
|
||||||
totalL1CommitGas += 4 * 2100 // 4 one-time cold sload for commitBatch
|
|
||||||
totalL1CommitGas += 20000 // 1 time sstore
|
|
||||||
totalL1CommitGas += 21000 // base fee for tx
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas // version in calldata
|
|
||||||
|
|
||||||
// adjusting gas:
|
|
||||||
// add 1 time cold sload (2100 gas) for L1MessageQueue
|
|
||||||
// add 1 time cold address access (2600 gas) for L1MessageQueue
|
|
||||||
// minus 1 time warm sload (100 gas) & 1 time warm address access (100 gas)
|
|
||||||
totalL1CommitGas += (2100 + 2600 - 100 - 100)
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(89 + 32) // parent batch header hash, length is estimated as 89 (constant part)+ 32 (1 skippedL1MessageBitmap)
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas * (89 + 32) // parent batch header in calldata
|
|
||||||
|
|
||||||
// adjust batch data hash gas cost
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(uint64(32 * len(b.Chunks)))
|
|
||||||
|
|
||||||
totalL1MessagePoppedBefore := b.TotalL1MessagePoppedBefore
|
|
||||||
|
|
||||||
for _, chunk := range b.Chunks {
|
|
||||||
chunkL1CommitGas, err := EstimateChunkL1CommitGas(chunk)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
totalL1CommitGas += chunkL1CommitGas
|
|
||||||
|
|
||||||
totalL1MessagePoppedInChunk := chunk.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
totalL1MessagePoppedBefore += totalL1MessagePoppedInChunk
|
|
||||||
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas * (32 * (totalL1MessagePoppedInChunk + 255) / 256)
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(89 + 32*(totalL1MessagePoppedInChunk+255)/256)
|
|
||||||
|
|
||||||
totalL1CommitCalldataSize, err := EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
totalL1CommitGas += GetMemoryExpansionCost(totalL1CommitCalldataSize)
|
|
||||||
}
|
|
||||||
|
|
||||||
return totalL1CommitGas, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBatchL1CommitCalldataSize calculates the calldata size in l1 commit for this batch approximately.
|
|
||||||
func EstimateBatchL1CommitCalldataSize(b *encoding.Batch) (uint64, error) {
|
|
||||||
var totalL1CommitCalldataSize uint64
|
|
||||||
for _, chunk := range b.Chunks {
|
|
||||||
chunkL1CommitCalldataSize, err := EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
totalL1CommitCalldataSize += chunkL1CommitCalldataSize
|
|
||||||
}
|
|
||||||
return totalL1CommitCalldataSize, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func getTxPayloadLength(txData *types.TransactionData) (uint64, error) {
|
|
||||||
rlpTxData, err := encoding.ConvertTxDataToRLPEncoding(txData)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
return uint64(len(rlpTxData)), nil
|
|
||||||
}
|
|
||||||
@@ -1,597 +0,0 @@
|
|||||||
package codecv0
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/hex"
|
|
||||||
"encoding/json"
|
|
||||||
"math/big"
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestCodecV0(t *testing.T) {
|
|
||||||
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.LogfmtFormat()))
|
|
||||||
glogger.Verbosity(log.LvlInfo)
|
|
||||||
log.Root().SetHandler(glogger)
|
|
||||||
|
|
||||||
parentDABatch, err := NewDABatch(&encoding.Batch{
|
|
||||||
Index: 0,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: common.Hash{},
|
|
||||||
Chunks: nil,
|
|
||||||
})
|
|
||||||
assert.NoError(t, err)
|
|
||||||
parentBatchHash := parentDABatch.Hash()
|
|
||||||
|
|
||||||
block1 := readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
|
||||||
block2 := readBlockFromJSON(t, "../../../testdata/blockTrace_03.json")
|
|
||||||
block3 := readBlockFromJSON(t, "../../../testdata/blockTrace_04.json")
|
|
||||||
block4 := readBlockFromJSON(t, "../../../testdata/blockTrace_05.json")
|
|
||||||
block5 := readBlockFromJSON(t, "../../../testdata/blockTrace_06.json")
|
|
||||||
block6 := readBlockFromJSON(t, "../../../testdata/blockTrace_07.json")
|
|
||||||
|
|
||||||
blockL1CommitCalldataSize, err := EstimateBlockL1CommitCalldataSize(block1)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(298), blockL1CommitCalldataSize)
|
|
||||||
blockL1CommitGas, err := EstimateBlockL1CommitGas(block1)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(4900), blockL1CommitGas)
|
|
||||||
blockL1CommitCalldataSize, err = EstimateBlockL1CommitCalldataSize(block2)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(5745), blockL1CommitCalldataSize)
|
|
||||||
blockL1CommitGas, err = EstimateBlockL1CommitGas(block2)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(93613), blockL1CommitGas)
|
|
||||||
blockL1CommitCalldataSize, err = EstimateBlockL1CommitCalldataSize(block3)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(96), blockL1CommitCalldataSize)
|
|
||||||
blockL1CommitGas, err = EstimateBlockL1CommitGas(block3)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(4187), blockL1CommitGas)
|
|
||||||
blockL1CommitCalldataSize, err = EstimateBlockL1CommitCalldataSize(block4)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), blockL1CommitCalldataSize)
|
|
||||||
blockL1CommitGas, err = EstimateBlockL1CommitGas(block4)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(14020), blockL1CommitGas)
|
|
||||||
blockL1CommitCalldataSize, err = EstimateBlockL1CommitCalldataSize(block5)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), blockL1CommitCalldataSize)
|
|
||||||
blockL1CommitGas, err = EstimateBlockL1CommitGas(block5)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(8796), blockL1CommitGas)
|
|
||||||
blockL1CommitCalldataSize, err = EstimateBlockL1CommitCalldataSize(block6)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), blockL1CommitCalldataSize)
|
|
||||||
blockL1CommitGas, err = EstimateBlockL1CommitGas(block6)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(6184), blockL1CommitGas)
|
|
||||||
|
|
||||||
// Test case: when the batch and chunk contains one block.
|
|
||||||
chunk := &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block1},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err := EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(298), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err := EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(6042), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err := NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err := daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkHexString := hex.EncodeToString(chunkBytes)
|
|
||||||
assert.Equal(t, 299, len(chunkBytes))
|
|
||||||
assert.Equal(t, "0100000000000000020000000063807b2a0000000000000000000000000000000000000000000000000000000000001de9000355418d1e81840002000000000073f87180843b9aec2e8307a12094c0c4c8baea3f6acb49b6e1fb9e2adeceeacb0ca28a152d02c7e14af60000008083019ecea0ab07ae99c67aa78e7ba5cf6781e90cc32b219b1de102513d56548a41e86df514a034cbd19feacd73e8ce64d00c4d1996b9b5243c578fd7f51bfaec288bbaf42a8b00000073f87101843b9aec2e8307a1209401bae6bf68e9a03fb2bc0615b1bf0d69ce9411ed8a152d02c7e14af60000008083019ecea0f039985866d8256f10c1be4f7b2cace28d8f20bde27e2604393eb095b7f77316a05a3e6e81065f2b4604bcec5bd4aba684835996fc3f879380aac1c09c6eed32f1", chunkHexString)
|
|
||||||
daChunkHash, err := daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0xde642c68122634b33fa1e6e4243b17be3bfd0dc6f996f204ef6d7522516bd840"), daChunkHash)
|
|
||||||
|
|
||||||
batch := &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err := EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(298), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err := EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(162591), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err := NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes := daBatch.Encode()
|
|
||||||
batchHexString := hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 89, len(batchBytes))
|
|
||||||
assert.Equal(t, "000000000000000001000000000000000000000000000000008fbc5eecfefc5bd9d1618ecef1fed160a7838448383595a2257d4c9bd5c5fa3eb0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab0", batchHexString)
|
|
||||||
assert.Equal(t, 0, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(0), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(0), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0xa906c7d2b6b68ea5fec3ff9d60d41858676e0d365e5d5ef07b2ce20fcf24ecd7"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err := NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes := decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString := hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: when the batch and chunk contains two block.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block1, block2},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(6043), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(100742), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err = daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 6044, len(chunkBytes))
|
|
||||||
daChunkHash, err = daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0x014916a83eccdb0d01e814b4d4ab90eb9049ba9a3cb0994919b86ad873bcd028"), daChunkHash)
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(6043), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(257897), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 89, len(batchBytes))
|
|
||||||
assert.Equal(t, "0000000000000000010000000000000000000000000000000074dd561a36921590926bee01fd0d53747c5f3e48e48a2d5538b9ab0e1511cfd7b0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab0", batchHexString)
|
|
||||||
assert.Equal(t, 0, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(0), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(0), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0xb02e39b740756824d20b2cac322ac365121411ced9d6e34de98a0b247c6e23e6"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: when the chunk contains one block with 1 L1MsgTx.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block3},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(96), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(5329), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err = daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkHexString = hex.EncodeToString(chunkBytes)
|
|
||||||
assert.Equal(t, 97, len(chunkBytes))
|
|
||||||
assert.Equal(t, "01000000000000000d00000000646b6e13000000000000000000000000000000000000000000000000000000000000000000000000007a1200000c000b00000020df0b80825dc0941a258d17bf244c4df02d40343a7626a9d321e1058080808080", chunkHexString)
|
|
||||||
daChunkHash, err = daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0x9e643c8a9203df542e39d9bfdcb07c99575b3c3d557791329fef9d83cc4147d0"), daChunkHash)
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(96), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(161889), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 121, len(batchBytes))
|
|
||||||
assert.Equal(t, "000000000000000001000000000000000b000000000000000b34f419ce7e882295bdb5aec6cce56ffa788a5fed4744d7fbd77e4acbf409f1cab0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab000000000000000000000000000000000000000000000000000000000000003ff", batchHexString)
|
|
||||||
assert.Equal(t, 32, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
expectedBitmap := "00000000000000000000000000000000000000000000000000000000000003ff"
|
|
||||||
assert.Equal(t, expectedBitmap, common.Bytes2Hex(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(11), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(11), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0xa18f07cb56ab4f2db5914d9b5699c5932bea4b5c73e71c8cec79151c11e9e986"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: batch contains multiple chunks, chunk contains multiple blocks.
|
|
||||||
chunk1 := &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block1, block2, block3},
|
|
||||||
}
|
|
||||||
chunk1L1CommitCalldataSize, err := EstimateChunkL1CommitCalldataSize(chunk1)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(6139), chunk1L1CommitCalldataSize)
|
|
||||||
chunk1L1CommitGas, err := EstimateChunkL1CommitGas(chunk1)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(106025), chunk1L1CommitGas)
|
|
||||||
|
|
||||||
daChunk1, err := NewDAChunk(chunk1, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes1, err := daChunk1.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 6140, len(chunkBytes1))
|
|
||||||
|
|
||||||
chunk2 := &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block4},
|
|
||||||
}
|
|
||||||
chunk2L1CommitCalldataSize, err := EstimateChunkL1CommitCalldataSize(chunk2)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), chunk2L1CommitCalldataSize)
|
|
||||||
chunk2L1CommitGas, err := EstimateChunkL1CommitGas(chunk2)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(15189), chunk2L1CommitGas)
|
|
||||||
|
|
||||||
daChunk2, err := NewDAChunk(chunk2, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes2, err := daChunk2.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 61, len(chunkBytes2))
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk1, chunk2},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(6199), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(279054), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 121, len(batchBytes))
|
|
||||||
assert.Equal(t, "000000000000000001000000000000002a000000000000002a1f9b3d942a6ee14e7afc52225c91fa44faa0a7ec511df9a2d9348d33bcd142fcb0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab00000000000000000000000000000000000000000000000000000001ffffffbff", batchHexString)
|
|
||||||
assert.Equal(t, 32, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
expectedBitmap = "0000000000000000000000000000000000000000000000000000001ffffffbff"
|
|
||||||
assert.Equal(t, expectedBitmap, common.Bytes2Hex(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(42), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(42), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0xf7bd6afe02764e4e6df23a374d753182b57fa77be71aaf1cd8365e15a51872d1"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: many consecutive L1 Msgs in 1 bitmap, no leading skipped msgs.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block4},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(15189), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err = daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 61, len(chunkBytes))
|
|
||||||
daChunkHash, err = daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0x854fc3136f47ce482ec85ee3325adfa16a1a1d60126e1c119eaaf0c3a9e90f8e"), daChunkHash)
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 37,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(171730), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 121, len(batchBytes))
|
|
||||||
assert.Equal(t, "0000000000000000010000000000000005000000000000002ac62fb58ec2d5393e00960f1cc23cab883b685296efa03d13ea2dd4c6de79cc55b0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab00000000000000000000000000000000000000000000000000000000000000000", batchHexString)
|
|
||||||
assert.Equal(t, 32, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
expectedBitmap = "0000000000000000000000000000000000000000000000000000000000000000"
|
|
||||||
assert.Equal(t, expectedBitmap, common.Bytes2Hex(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(42), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(5), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0x841f4657b7eb723cae35377cf2963b51191edad6a3b182d4c8524cb928d2a413"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: many consecutive L1 Msgs in 1 bitmap, with leading skipped msgs.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block4},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(15189), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err = daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 61, len(chunkBytes))
|
|
||||||
daChunkHash, err = daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0x854fc3136f47ce482ec85ee3325adfa16a1a1d60126e1c119eaaf0c3a9e90f8e"), daChunkHash)
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(171810), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 121, len(batchBytes))
|
|
||||||
assert.Equal(t, "000000000000000001000000000000002a000000000000002a93255aa24dd468c5645f1e6901b8131a7a78a0eeb2a17cbb09ba64688a8de6b4b0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab00000000000000000000000000000000000000000000000000000001fffffffff", batchHexString)
|
|
||||||
assert.Equal(t, 32, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
expectedBitmap = "0000000000000000000000000000000000000000000000000000001fffffffff"
|
|
||||||
assert.Equal(t, expectedBitmap, common.Bytes2Hex(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(42), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(42), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0xa28766a3617cf244cc397fc4ce4c23022ec80f152b9f618807ac7e7c11486612"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: many sparse L1 Msgs in 1 bitmap.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block5},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(9947), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err = daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 61, len(chunkBytes))
|
|
||||||
daChunkHash, err = daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0x2aa220ca7bd1368e59e8053eb3831e30854aa2ec8bd3af65cee350c1c0718ba6"), daChunkHash)
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(166504), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 121, len(batchBytes))
|
|
||||||
assert.Equal(t, "000000000000000001000000000000000a000000000000000ac7bcc8da943dd83404e84d9ce7e894ab97ce4829df4eb51ebbbe13c90b5a3f4db0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab000000000000000000000000000000000000000000000000000000000000001dd", batchHexString)
|
|
||||||
assert.Equal(t, 32, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
expectedBitmap = "00000000000000000000000000000000000000000000000000000000000001dd"
|
|
||||||
assert.Equal(t, expectedBitmap, common.Bytes2Hex(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(10), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(10), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0x2fee2073639eb9795007f7e765b3318f92658822de40b2134d34a478a0e9058a"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
|
|
||||||
// Test case: many L1 Msgs in each of 2 bitmaps.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block6},
|
|
||||||
}
|
|
||||||
chunkL1CommitCalldataSize, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), chunkL1CommitCalldataSize)
|
|
||||||
chunkL1CommitGas, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(7326), chunkL1CommitGas)
|
|
||||||
|
|
||||||
daChunk, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
chunkBytes, err = daChunk.Encode()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 61, len(chunkBytes))
|
|
||||||
daChunkHash, err = daChunk.Hash()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, common.HexToHash("0xb65521bea7daff75838de07951c3c055966750fb5a270fead5e0e727c32455c3"), daChunkHash)
|
|
||||||
|
|
||||||
batch = &encoding.Batch{
|
|
||||||
Index: 1,
|
|
||||||
TotalL1MessagePoppedBefore: 0,
|
|
||||||
ParentBatchHash: parentBatchHash,
|
|
||||||
Chunks: []*encoding.Chunk{chunk},
|
|
||||||
}
|
|
||||||
|
|
||||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(60), batchL1CommitCalldataSize)
|
|
||||||
batchL1CommitGas, err = EstimateBatchL1CommitGas(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(164388), batchL1CommitGas)
|
|
||||||
|
|
||||||
daBatch, err = NewDABatch(batch)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
batchBytes = daBatch.Encode()
|
|
||||||
batchHexString = hex.EncodeToString(batchBytes)
|
|
||||||
assert.Equal(t, 153, len(batchBytes))
|
|
||||||
assert.Equal(t, "00000000000000000100000000000001010000000000000101899a411a3309c6491701b7b955c7b1115ac015414bbb71b59a0ca561668d5208b0a62a3048a2e6efb4e56e471eb826de86f8ccaa4af27c572b68db6f687b3ab0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd0000000000000000000000000000000000000000000000000000000000000000", batchHexString)
|
|
||||||
assert.Equal(t, 64, len(daBatch.SkippedL1MessageBitmap))
|
|
||||||
expectedBitmap = "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd0000000000000000000000000000000000000000000000000000000000000000"
|
|
||||||
assert.Equal(t, expectedBitmap, common.Bytes2Hex(daBatch.SkippedL1MessageBitmap))
|
|
||||||
assert.Equal(t, uint64(257), daBatch.TotalL1MessagePopped)
|
|
||||||
assert.Equal(t, uint64(257), daBatch.L1MessagePopped)
|
|
||||||
assert.Equal(t, common.HexToHash("0x84206bc6d0076a233fc7120a0bec4e03bf2512207437768828384dddb335ba2e"), daBatch.Hash())
|
|
||||||
|
|
||||||
decodedDABatch, err = NewDABatchFromBytes(batchBytes)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
decodedBatchBytes = decodedDABatch.Encode()
|
|
||||||
decodedBatchHexString = hex.EncodeToString(decodedBatchBytes)
|
|
||||||
assert.Equal(t, batchHexString, decodedBatchHexString)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestErrorPaths(t *testing.T) {
|
|
||||||
// Test case: when the chunk is nil.
|
|
||||||
_, err := NewDAChunk(nil, 100)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "chunk is nil")
|
|
||||||
|
|
||||||
// Test case: when the chunk contains no blocks.
|
|
||||||
chunk := &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{},
|
|
||||||
}
|
|
||||||
_, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "number of blocks is 0")
|
|
||||||
|
|
||||||
// Test case: when the chunk contains more than 255 blocks.
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{},
|
|
||||||
}
|
|
||||||
for i := 0; i < 256; i++ {
|
|
||||||
chunk.Blocks = append(chunk.Blocks, &encoding.Block{})
|
|
||||||
}
|
|
||||||
_, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "number of blocks exceeds 1 byte")
|
|
||||||
|
|
||||||
// Test case: Header.Number is not a uint64.
|
|
||||||
block := readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
|
||||||
block.Header.Number = new(big.Int).Lsh(block.Header.Number, 64)
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block},
|
|
||||||
}
|
|
||||||
_, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "block number is not uint64")
|
|
||||||
|
|
||||||
// Test case: number of transactions exceeds max uint16.
|
|
||||||
block = readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
|
||||||
for i := 0; i < 65537; i++ {
|
|
||||||
block.Transactions = append(block.Transactions, block.Transactions[0])
|
|
||||||
}
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block},
|
|
||||||
}
|
|
||||||
_, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "number of transactions exceeds max uint16")
|
|
||||||
|
|
||||||
// Test case: decode transaction with hex string without 0x prefix error.
|
|
||||||
block = readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
|
||||||
block.Transactions = block.Transactions[:1]
|
|
||||||
block.Transactions[0].Data = "not-a-hex"
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block},
|
|
||||||
}
|
|
||||||
_, err = EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "hex string without 0x prefix")
|
|
||||||
_, err = EstimateChunkL1CommitGas(chunk)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "hex string without 0x prefix")
|
|
||||||
|
|
||||||
// Test case: number of L1 messages exceeds max uint16.
|
|
||||||
block = readBlockFromJSON(t, "../../../testdata/blockTrace_04.json")
|
|
||||||
for i := 0; i < 65535; i++ {
|
|
||||||
tx := &block.Transactions[i]
|
|
||||||
txCopy := *tx
|
|
||||||
txCopy.Nonce = uint64(i + 1)
|
|
||||||
block.Transactions = append(block.Transactions, txCopy)
|
|
||||||
}
|
|
||||||
chunk = &encoding.Chunk{
|
|
||||||
Blocks: []*encoding.Block{block},
|
|
||||||
}
|
|
||||||
_, err = NewDAChunk(chunk, 0)
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.Contains(t, err.Error(), "number of L1 messages exceeds max uint16")
|
|
||||||
}
|
|
||||||
|
|
||||||
func readBlockFromJSON(t *testing.T, filename string) *encoding.Block {
|
|
||||||
data, err := os.ReadFile(filename)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
block := &encoding.Block{}
|
|
||||||
assert.NoError(t, json.Unmarshal(data, block))
|
|
||||||
return block
|
|
||||||
}
|
|
||||||
@@ -1,637 +0,0 @@
|
|||||||
package codecv1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/sha256"
|
|
||||||
"encoding/binary"
|
|
||||||
"encoding/hex"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"math"
|
|
||||||
"math/big"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
|
||||||
"github.com/scroll-tech/go-ethereum/core/types"
|
|
||||||
"github.com/scroll-tech/go-ethereum/crypto"
|
|
||||||
"github.com/scroll-tech/go-ethereum/crypto/kzg4844"
|
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// BLSModulus is the BLS modulus defined in EIP-4844.
|
|
||||||
BLSModulus *big.Int
|
|
||||||
|
|
||||||
// BlobDataProofArgs defines the argument types for `_blobDataProof` in `finalizeBatchWithProof4844`.
|
|
||||||
BlobDataProofArgs abi.Arguments
|
|
||||||
|
|
||||||
// MaxNumChunks is the maximum number of chunks that a batch can contain.
|
|
||||||
MaxNumChunks int = 15
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
// initialize modulus
|
|
||||||
modulus, success := new(big.Int).SetString("52435875175126190479447740508185965837690552500527637822603658699938581184513", 10)
|
|
||||||
if !success {
|
|
||||||
log.Crit("BLSModulus conversion failed")
|
|
||||||
}
|
|
||||||
BLSModulus = modulus
|
|
||||||
|
|
||||||
// initialize arguments
|
|
||||||
bytes32Type, err1 := abi.NewType("bytes32", "bytes32", nil)
|
|
||||||
bytes48Type, err2 := abi.NewType("bytes48", "bytes48", nil)
|
|
||||||
if err1 != nil || err2 != nil {
|
|
||||||
log.Crit("Failed to initialize abi types", "err1", err1, "err2", err2)
|
|
||||||
}
|
|
||||||
|
|
||||||
BlobDataProofArgs = abi.Arguments{
|
|
||||||
{Type: bytes32Type, Name: "z"},
|
|
||||||
{Type: bytes32Type, Name: "y"},
|
|
||||||
{Type: bytes48Type, Name: "commitment"},
|
|
||||||
{Type: bytes48Type, Name: "proof"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CodecV1Version denotes the version of the codec.
|
|
||||||
const CodecV1Version = 1
|
|
||||||
|
|
||||||
// DABlock represents a Data Availability Block.
|
|
||||||
type DABlock struct {
|
|
||||||
BlockNumber uint64
|
|
||||||
Timestamp uint64
|
|
||||||
BaseFee *big.Int
|
|
||||||
GasLimit uint64
|
|
||||||
NumTransactions uint16
|
|
||||||
NumL1Messages uint16
|
|
||||||
}
|
|
||||||
|
|
||||||
// DAChunk groups consecutive DABlocks with their transactions.
|
|
||||||
type DAChunk struct {
|
|
||||||
Blocks []*DABlock
|
|
||||||
Transactions [][]*types.TransactionData
|
|
||||||
}
|
|
||||||
|
|
||||||
// DABatch contains metadata about a batch of DAChunks.
|
|
||||||
type DABatch struct {
|
|
||||||
// header
|
|
||||||
Version uint8
|
|
||||||
BatchIndex uint64
|
|
||||||
L1MessagePopped uint64
|
|
||||||
TotalL1MessagePopped uint64
|
|
||||||
DataHash common.Hash
|
|
||||||
BlobVersionedHash common.Hash
|
|
||||||
ParentBatchHash common.Hash
|
|
||||||
SkippedL1MessageBitmap []byte
|
|
||||||
|
|
||||||
// blob payload
|
|
||||||
blob *kzg4844.Blob
|
|
||||||
z *kzg4844.Point
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDABlock creates a new DABlock from the given encoding.Block and the total number of L1 messages popped before.
|
|
||||||
func NewDABlock(block *encoding.Block, totalL1MessagePoppedBefore uint64) (*DABlock, error) {
|
|
||||||
if !block.Header.Number.IsUint64() {
|
|
||||||
return nil, errors.New("block number is not uint64")
|
|
||||||
}
|
|
||||||
|
|
||||||
// note: numL1Messages includes skipped messages
|
|
||||||
numL1Messages := block.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
if numL1Messages > math.MaxUint16 {
|
|
||||||
return nil, errors.New("number of L1 messages exceeds max uint16")
|
|
||||||
}
|
|
||||||
|
|
||||||
// note: numTransactions includes skipped messages
|
|
||||||
numL2Transactions := block.NumL2Transactions()
|
|
||||||
numTransactions := numL1Messages + numL2Transactions
|
|
||||||
if numTransactions > math.MaxUint16 {
|
|
||||||
return nil, errors.New("number of transactions exceeds max uint16")
|
|
||||||
}
|
|
||||||
|
|
||||||
daBlock := DABlock{
|
|
||||||
BlockNumber: block.Header.Number.Uint64(),
|
|
||||||
Timestamp: block.Header.Time,
|
|
||||||
BaseFee: block.Header.BaseFee,
|
|
||||||
GasLimit: block.Header.GasLimit,
|
|
||||||
NumTransactions: uint16(numTransactions),
|
|
||||||
NumL1Messages: uint16(numL1Messages),
|
|
||||||
}
|
|
||||||
|
|
||||||
return &daBlock, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode serializes the DABlock into a slice of bytes.
|
|
||||||
func (b *DABlock) Encode() []byte {
|
|
||||||
bytes := make([]byte, 60)
|
|
||||||
binary.BigEndian.PutUint64(bytes[0:], b.BlockNumber)
|
|
||||||
binary.BigEndian.PutUint64(bytes[8:], b.Timestamp)
|
|
||||||
if b.BaseFee != nil {
|
|
||||||
binary.BigEndian.PutUint64(bytes[40:], b.BaseFee.Uint64())
|
|
||||||
}
|
|
||||||
binary.BigEndian.PutUint64(bytes[48:], b.GasLimit)
|
|
||||||
binary.BigEndian.PutUint16(bytes[56:], b.NumTransactions)
|
|
||||||
binary.BigEndian.PutUint16(bytes[58:], b.NumL1Messages)
|
|
||||||
return bytes
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDAChunk creates a new DAChunk from the given encoding.Chunk and the total number of L1 messages popped before.
|
|
||||||
func NewDAChunk(chunk *encoding.Chunk, totalL1MessagePoppedBefore uint64) (*DAChunk, error) {
|
|
||||||
var blocks []*DABlock
|
|
||||||
var txs [][]*types.TransactionData
|
|
||||||
|
|
||||||
for _, block := range chunk.Blocks {
|
|
||||||
b, err := NewDABlock(block, totalL1MessagePoppedBefore)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
blocks = append(blocks, b)
|
|
||||||
totalL1MessagePoppedBefore += block.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
txs = append(txs, block.Transactions)
|
|
||||||
}
|
|
||||||
|
|
||||||
daChunk := DAChunk{
|
|
||||||
Blocks: blocks,
|
|
||||||
Transactions: txs,
|
|
||||||
}
|
|
||||||
|
|
||||||
return &daChunk, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode serializes the DAChunk into a slice of bytes.
|
|
||||||
func (c *DAChunk) Encode() []byte {
|
|
||||||
var chunkBytes []byte
|
|
||||||
chunkBytes = append(chunkBytes, byte(len(c.Blocks)))
|
|
||||||
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
blockBytes := block.Encode()
|
|
||||||
chunkBytes = append(chunkBytes, blockBytes...)
|
|
||||||
}
|
|
||||||
|
|
||||||
return chunkBytes
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash computes the hash of the DAChunk data.
|
|
||||||
func (c *DAChunk) Hash() (common.Hash, error) {
|
|
||||||
var dataBytes []byte
|
|
||||||
|
|
||||||
// concatenate block contexts
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
encodedBlock := block.Encode()
|
|
||||||
// only the first 58 bytes are used in the hashing process
|
|
||||||
dataBytes = append(dataBytes, encodedBlock[:58]...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// concatenate l1 tx hashes
|
|
||||||
for _, blockTxs := range c.Transactions {
|
|
||||||
for _, txData := range blockTxs {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
txHash := strings.TrimPrefix(txData.TxHash, "0x")
|
|
||||||
hashBytes, err := hex.DecodeString(txHash)
|
|
||||||
if err != nil {
|
|
||||||
return common.Hash{}, err
|
|
||||||
}
|
|
||||||
if len(hashBytes) != 32 {
|
|
||||||
return common.Hash{}, fmt.Errorf("unexpected hash: %s", txData.TxHash)
|
|
||||||
}
|
|
||||||
dataBytes = append(dataBytes, hashBytes...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hash := crypto.Keccak256Hash(dataBytes)
|
|
||||||
return hash, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDABatch creates a DABatch from the provided encoding.Batch.
|
|
||||||
func NewDABatch(batch *encoding.Batch) (*DABatch, error) {
|
|
||||||
// this encoding can only support a fixed number of chunks per batch
|
|
||||||
if len(batch.Chunks) > MaxNumChunks {
|
|
||||||
return nil, fmt.Errorf("too many chunks in batch")
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(batch.Chunks) == 0 {
|
|
||||||
return nil, fmt.Errorf("too few chunks in batch")
|
|
||||||
}
|
|
||||||
|
|
||||||
// batch data hash
|
|
||||||
dataHash, err := computeBatchDataHash(batch.Chunks, batch.TotalL1MessagePoppedBefore)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// skipped L1 messages bitmap
|
|
||||||
bitmapBytes, totalL1MessagePoppedAfter, err := encoding.ConstructSkippedBitmap(batch.Index, batch.Chunks, batch.TotalL1MessagePoppedBefore)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// blob payload
|
|
||||||
blob, blobVersionedHash, z, err := constructBlobPayload(batch.Chunks)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
daBatch := DABatch{
|
|
||||||
Version: CodecV1Version,
|
|
||||||
BatchIndex: batch.Index,
|
|
||||||
L1MessagePopped: totalL1MessagePoppedAfter - batch.TotalL1MessagePoppedBefore,
|
|
||||||
TotalL1MessagePopped: totalL1MessagePoppedAfter,
|
|
||||||
DataHash: dataHash,
|
|
||||||
BlobVersionedHash: blobVersionedHash,
|
|
||||||
ParentBatchHash: batch.ParentBatchHash,
|
|
||||||
SkippedL1MessageBitmap: bitmapBytes,
|
|
||||||
blob: blob,
|
|
||||||
z: z,
|
|
||||||
}
|
|
||||||
|
|
||||||
return &daBatch, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// computeBatchDataHash computes the data hash of the batch.
|
|
||||||
// Note: The batch hash and batch data hash are two different hashes,
|
|
||||||
// the former is used for identifying a badge in the contracts,
|
|
||||||
// the latter is used in the public input to the provers.
|
|
||||||
func computeBatchDataHash(chunks []*encoding.Chunk, totalL1MessagePoppedBefore uint64) (common.Hash, error) {
|
|
||||||
var dataBytes []byte
|
|
||||||
totalL1MessagePoppedBeforeChunk := totalL1MessagePoppedBefore
|
|
||||||
|
|
||||||
for _, chunk := range chunks {
|
|
||||||
daChunk, err := NewDAChunk(chunk, totalL1MessagePoppedBeforeChunk)
|
|
||||||
if err != nil {
|
|
||||||
return common.Hash{}, err
|
|
||||||
}
|
|
||||||
totalL1MessagePoppedBeforeChunk += chunk.NumL1Messages(totalL1MessagePoppedBeforeChunk)
|
|
||||||
chunkHash, err := daChunk.Hash()
|
|
||||||
if err != nil {
|
|
||||||
return common.Hash{}, err
|
|
||||||
}
|
|
||||||
dataBytes = append(dataBytes, chunkHash.Bytes()...)
|
|
||||||
}
|
|
||||||
|
|
||||||
dataHash := crypto.Keccak256Hash(dataBytes)
|
|
||||||
return dataHash, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// constructBlobPayload constructs the 4844 blob payload.
|
|
||||||
func constructBlobPayload(chunks []*encoding.Chunk) (*kzg4844.Blob, common.Hash, *kzg4844.Point, error) {
|
|
||||||
// metadata consists of num_chunks (2 bytes) and chunki_size (4 bytes per chunk)
|
|
||||||
metadataLength := 2 + MaxNumChunks*4
|
|
||||||
|
|
||||||
// the raw (un-padded) blob payload
|
|
||||||
blobBytes := make([]byte, metadataLength)
|
|
||||||
|
|
||||||
// challenge digest preimage
|
|
||||||
// 1 hash for metadata, 1 hash for each chunk, 1 hash for blob versioned hash
|
|
||||||
challengePreimage := make([]byte, (1+MaxNumChunks+1)*32)
|
|
||||||
|
|
||||||
// the chunk data hash used for calculating the challenge preimage
|
|
||||||
var chunkDataHash common.Hash
|
|
||||||
|
|
||||||
// blob metadata: num_chunks
|
|
||||||
binary.BigEndian.PutUint16(blobBytes[0:], uint16(len(chunks)))
|
|
||||||
|
|
||||||
// encode blob metadata and L2 transactions,
|
|
||||||
// and simultaneously also build challenge preimage
|
|
||||||
for chunkID, chunk := range chunks {
|
|
||||||
currentChunkStartIndex := len(blobBytes)
|
|
||||||
|
|
||||||
for _, block := range chunk.Blocks {
|
|
||||||
for _, tx := range block.Transactions {
|
|
||||||
if tx.Type != types.L1MessageTxType {
|
|
||||||
// encode L2 txs into blob payload
|
|
||||||
rlpTxData, err := encoding.ConvertTxDataToRLPEncoding(tx)
|
|
||||||
if err != nil {
|
|
||||||
return nil, common.Hash{}, nil, err
|
|
||||||
}
|
|
||||||
blobBytes = append(blobBytes, rlpTxData...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// blob metadata: chunki_size
|
|
||||||
if chunkSize := len(blobBytes) - currentChunkStartIndex; chunkSize != 0 {
|
|
||||||
binary.BigEndian.PutUint32(blobBytes[2+4*chunkID:], uint32(chunkSize))
|
|
||||||
}
|
|
||||||
|
|
||||||
// challenge: compute chunk data hash
|
|
||||||
chunkDataHash = crypto.Keccak256Hash(blobBytes[currentChunkStartIndex:])
|
|
||||||
copy(challengePreimage[32+chunkID*32:], chunkDataHash[:])
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have fewer than MaxNumChunks chunks, the rest
|
|
||||||
// of the blob metadata is correctly initialized to 0,
|
|
||||||
// but we need to add padding to the challenge preimage
|
|
||||||
for chunkID := len(chunks); chunkID < MaxNumChunks; chunkID++ {
|
|
||||||
// use the last chunk's data hash as padding
|
|
||||||
copy(challengePreimage[32+chunkID*32:], chunkDataHash[:])
|
|
||||||
}
|
|
||||||
|
|
||||||
// challenge: compute metadata hash
|
|
||||||
hash := crypto.Keccak256Hash(blobBytes[0:metadataLength])
|
|
||||||
copy(challengePreimage[0:], hash[:])
|
|
||||||
|
|
||||||
// convert raw data to BLSFieldElements
|
|
||||||
blob, err := makeBlobCanonical(blobBytes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, common.Hash{}, nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// compute blob versioned hash
|
|
||||||
c, err := kzg4844.BlobToCommitment(blob)
|
|
||||||
if err != nil {
|
|
||||||
return nil, common.Hash{}, nil, fmt.Errorf("failed to create blob commitment")
|
|
||||||
}
|
|
||||||
blobVersionedHash := kzg4844.CalcBlobHashV1(sha256.New(), &c)
|
|
||||||
|
|
||||||
// challenge: append blob versioned hash
|
|
||||||
copy(challengePreimage[(1+MaxNumChunks)*32:], blobVersionedHash[:])
|
|
||||||
|
|
||||||
// compute z = challenge_digest % BLS_MODULUS
|
|
||||||
challengeDigest := crypto.Keccak256Hash(challengePreimage)
|
|
||||||
pointBigInt := new(big.Int).Mod(new(big.Int).SetBytes(challengeDigest[:]), BLSModulus)
|
|
||||||
pointBytes := pointBigInt.Bytes()
|
|
||||||
|
|
||||||
// the challenge point z
|
|
||||||
var z kzg4844.Point
|
|
||||||
start := 32 - len(pointBytes)
|
|
||||||
copy(z[start:], pointBytes)
|
|
||||||
|
|
||||||
return blob, blobVersionedHash, &z, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// makeBlobCanonical converts the raw blob data into the canonical blob representation of 4096 BLSFieldElements.
|
|
||||||
func makeBlobCanonical(blobBytes []byte) (*kzg4844.Blob, error) {
|
|
||||||
// blob contains 131072 bytes but we can only utilize 31/32 of these
|
|
||||||
if len(blobBytes) > 126976 {
|
|
||||||
return nil, fmt.Errorf("oversized batch payload, blob bytes length: %v, max length: %v", len(blobBytes), 126976)
|
|
||||||
}
|
|
||||||
|
|
||||||
// the canonical (padded) blob payload
|
|
||||||
var blob kzg4844.Blob
|
|
||||||
|
|
||||||
// encode blob payload by prepending every 31 bytes with 1 zero byte
|
|
||||||
index := 0
|
|
||||||
|
|
||||||
for from := 0; from < len(blobBytes); from += 31 {
|
|
||||||
to := from + 31
|
|
||||||
if to > len(blobBytes) {
|
|
||||||
to = len(blobBytes)
|
|
||||||
}
|
|
||||||
copy(blob[index+1:], blobBytes[from:to])
|
|
||||||
index += 32
|
|
||||||
}
|
|
||||||
|
|
||||||
return &blob, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDABatchFromBytes attempts to decode the given byte slice into a DABatch.
|
|
||||||
// Note: This function only populates the batch header, it leaves the blob-related fields empty.
|
|
||||||
func NewDABatchFromBytes(data []byte) (*DABatch, error) {
|
|
||||||
if len(data) < 121 {
|
|
||||||
return nil, fmt.Errorf("insufficient data for DABatch, expected at least 121 bytes but got %d", len(data))
|
|
||||||
}
|
|
||||||
|
|
||||||
b := &DABatch{
|
|
||||||
Version: data[0],
|
|
||||||
BatchIndex: binary.BigEndian.Uint64(data[1:9]),
|
|
||||||
L1MessagePopped: binary.BigEndian.Uint64(data[9:17]),
|
|
||||||
TotalL1MessagePopped: binary.BigEndian.Uint64(data[17:25]),
|
|
||||||
DataHash: common.BytesToHash(data[25:57]),
|
|
||||||
BlobVersionedHash: common.BytesToHash(data[57:89]),
|
|
||||||
ParentBatchHash: common.BytesToHash(data[89:121]),
|
|
||||||
SkippedL1MessageBitmap: data[121:],
|
|
||||||
}
|
|
||||||
|
|
||||||
return b, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode serializes the DABatch into bytes.
|
|
||||||
func (b *DABatch) Encode() []byte {
|
|
||||||
batchBytes := make([]byte, 121+len(b.SkippedL1MessageBitmap))
|
|
||||||
batchBytes[0] = b.Version
|
|
||||||
binary.BigEndian.PutUint64(batchBytes[1:], b.BatchIndex)
|
|
||||||
binary.BigEndian.PutUint64(batchBytes[9:], b.L1MessagePopped)
|
|
||||||
binary.BigEndian.PutUint64(batchBytes[17:], b.TotalL1MessagePopped)
|
|
||||||
copy(batchBytes[25:], b.DataHash[:])
|
|
||||||
copy(batchBytes[57:], b.BlobVersionedHash[:])
|
|
||||||
copy(batchBytes[89:], b.ParentBatchHash[:])
|
|
||||||
copy(batchBytes[121:], b.SkippedL1MessageBitmap[:])
|
|
||||||
return batchBytes
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash computes the hash of the serialized DABatch.
|
|
||||||
func (b *DABatch) Hash() common.Hash {
|
|
||||||
bytes := b.Encode()
|
|
||||||
return crypto.Keccak256Hash(bytes)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BlobDataProof computes the abi-encoded blob verification data.
|
|
||||||
func (b *DABatch) BlobDataProof() ([]byte, error) {
|
|
||||||
if b.blob == nil {
|
|
||||||
return nil, errors.New("called BlobDataProof with empty blob")
|
|
||||||
}
|
|
||||||
if b.z == nil {
|
|
||||||
return nil, errors.New("called BlobDataProof with empty z")
|
|
||||||
}
|
|
||||||
|
|
||||||
commitment, err := kzg4844.BlobToCommitment(b.blob)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to create blob commitment")
|
|
||||||
}
|
|
||||||
|
|
||||||
proof, y, err := kzg4844.ComputeProof(b.blob, *b.z)
|
|
||||||
if err != nil {
|
|
||||||
log.Crit("failed to create KZG proof at point", "err", err, "z", hex.EncodeToString(b.z[:]))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Memory layout of ``_blobDataProof``:
|
|
||||||
// | z | y | kzg_commitment | kzg_proof |
|
|
||||||
// |---------|---------|----------------|-----------|
|
|
||||||
// | bytes32 | bytes32 | bytes48 | bytes48 |
|
|
||||||
|
|
||||||
values := []interface{}{*b.z, y, commitment, proof}
|
|
||||||
return BlobDataProofArgs.Pack(values...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Blob returns the blob of the batch.
|
|
||||||
func (b *DABatch) Blob() *kzg4844.Blob {
|
|
||||||
return b.blob
|
|
||||||
}
|
|
||||||
|
|
||||||
// DecodeFromCalldata attempts to decode a DABatch and an array of DAChunks from the provided calldata byte slice.
|
|
||||||
func DecodeFromCalldata(data []byte) (*DABatch, []*DAChunk, error) {
|
|
||||||
// TODO: implement this function.
|
|
||||||
return nil, nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateChunkL1CommitBlobSize estimates the size of the L1 commit blob for a single chunk.
|
|
||||||
func EstimateChunkL1CommitBlobSize(c *encoding.Chunk) (uint64, error) {
|
|
||||||
metadataSize := uint64(2 + 4*MaxNumChunks) // over-estimate: adding metadata length
|
|
||||||
chunkDataSize, err := chunkL1CommitBlobDataSize(c)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
return calculatePaddedBlobSize(metadataSize + chunkDataSize), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBatchL1CommitBlobSize estimates the total size of the L1 commit blob for a batch.
|
|
||||||
func EstimateBatchL1CommitBlobSize(b *encoding.Batch) (uint64, error) {
|
|
||||||
metadataSize := uint64(2 + 4*MaxNumChunks)
|
|
||||||
var batchDataSize uint64
|
|
||||||
for _, c := range b.Chunks {
|
|
||||||
chunkDataSize, err := chunkL1CommitBlobDataSize(c)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
batchDataSize += chunkDataSize
|
|
||||||
}
|
|
||||||
return calculatePaddedBlobSize(metadataSize + batchDataSize), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func chunkL1CommitBlobDataSize(c *encoding.Chunk) (uint64, error) {
|
|
||||||
var dataSize uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
for _, tx := range block.Transactions {
|
|
||||||
if tx.Type != types.L1MessageTxType {
|
|
||||||
rlpTxData, err := encoding.ConvertTxDataToRLPEncoding(tx)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
dataSize += uint64(len(rlpTxData))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return dataSize, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// CalldataNonZeroByteGas is the gas consumption per non zero byte in calldata.
|
|
||||||
const CalldataNonZeroByteGas = 16
|
|
||||||
|
|
||||||
// GetKeccak256Gas calculates the gas cost for computing the keccak256 hash of a given size.
|
|
||||||
func GetKeccak256Gas(size uint64) uint64 {
|
|
||||||
return GetMemoryExpansionCost(size) + 30 + 6*((size+31)/32)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetMemoryExpansionCost calculates the cost of memory expansion for a given memoryByteSize.
|
|
||||||
func GetMemoryExpansionCost(memoryByteSize uint64) uint64 {
|
|
||||||
memorySizeWord := (memoryByteSize + 31) / 32
|
|
||||||
memoryCost := (memorySizeWord*memorySizeWord)/512 + (3 * memorySizeWord)
|
|
||||||
return memoryCost
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBlockL1CommitGas calculates the total L1 commit gas for this block approximately.
|
|
||||||
func EstimateBlockL1CommitGas(b *encoding.Block) uint64 {
|
|
||||||
var total uint64
|
|
||||||
var numL1Messages uint64
|
|
||||||
for _, txData := range b.Transactions {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
numL1Messages++
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 60 bytes BlockContext calldata
|
|
||||||
total += CalldataNonZeroByteGas * 60
|
|
||||||
|
|
||||||
// sload
|
|
||||||
total += 2100 * numL1Messages // numL1Messages times cold sload in L1MessageQueue
|
|
||||||
|
|
||||||
// staticcall
|
|
||||||
total += 100 * numL1Messages // numL1Messages times call to L1MessageQueue
|
|
||||||
total += 100 * numL1Messages // numL1Messages times warm address access to L1MessageQueue
|
|
||||||
|
|
||||||
total += GetMemoryExpansionCost(36) * numL1Messages // staticcall to proxy
|
|
||||||
total += 100 * numL1Messages // read admin in proxy
|
|
||||||
total += 100 * numL1Messages // read impl in proxy
|
|
||||||
total += 100 * numL1Messages // access impl
|
|
||||||
total += GetMemoryExpansionCost(36) * numL1Messages // delegatecall to impl
|
|
||||||
|
|
||||||
return total
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateChunkL1CommitCalldataSize calculates the calldata size needed for committing a chunk to L1 approximately.
|
|
||||||
func EstimateChunkL1CommitCalldataSize(c *encoding.Chunk) uint64 {
|
|
||||||
return uint64(60 * len(c.Blocks))
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateChunkL1CommitGas calculates the total L1 commit gas for this chunk approximately.
|
|
||||||
func EstimateChunkL1CommitGas(c *encoding.Chunk) uint64 {
|
|
||||||
var totalNonSkippedL1Messages uint64
|
|
||||||
var totalL1CommitGas uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
totalNonSkippedL1Messages += uint64(len(block.Transactions)) - block.NumL2Transactions()
|
|
||||||
blockL1CommitGas := EstimateBlockL1CommitGas(block)
|
|
||||||
totalL1CommitGas += blockL1CommitGas
|
|
||||||
}
|
|
||||||
|
|
||||||
numBlocks := uint64(len(c.Blocks))
|
|
||||||
totalL1CommitGas += 100 * numBlocks // numBlocks times warm sload
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas // numBlocks field of chunk encoding in calldata
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas * numBlocks * 60 // numBlocks of BlockContext in chunk
|
|
||||||
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(58*numBlocks + 32*totalNonSkippedL1Messages) // chunk hash
|
|
||||||
return totalL1CommitGas
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBatchL1CommitGas calculates the total L1 commit gas for this batch approximately.
|
|
||||||
func EstimateBatchL1CommitGas(b *encoding.Batch) uint64 {
|
|
||||||
var totalL1CommitGas uint64
|
|
||||||
|
|
||||||
// Add extra gas costs
|
|
||||||
totalL1CommitGas += 100000 // constant to account for ops like _getAdmin, _implementation, _requireNotPaused, etc
|
|
||||||
totalL1CommitGas += 4 * 2100 // 4 one-time cold sload for commitBatch
|
|
||||||
totalL1CommitGas += 20000 // 1 time sstore
|
|
||||||
totalL1CommitGas += 21000 // base fee for tx
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas // version in calldata
|
|
||||||
|
|
||||||
// adjusting gas:
|
|
||||||
// add 1 time cold sload (2100 gas) for L1MessageQueue
|
|
||||||
// add 1 time cold address access (2600 gas) for L1MessageQueue
|
|
||||||
// minus 1 time warm sload (100 gas) & 1 time warm address access (100 gas)
|
|
||||||
totalL1CommitGas += (2100 + 2600 - 100 - 100)
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(89 + 32) // parent batch header hash, length is estimated as 89 (constant part)+ 32 (1 skippedL1MessageBitmap)
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas * (89 + 32) // parent batch header in calldata
|
|
||||||
|
|
||||||
// adjust batch data hash gas cost
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(uint64(32 * len(b.Chunks)))
|
|
||||||
|
|
||||||
totalL1MessagePoppedBefore := b.TotalL1MessagePoppedBefore
|
|
||||||
|
|
||||||
for _, chunk := range b.Chunks {
|
|
||||||
chunkL1CommitGas := EstimateChunkL1CommitGas(chunk)
|
|
||||||
totalL1CommitGas += chunkL1CommitGas
|
|
||||||
|
|
||||||
totalL1MessagePoppedInChunk := chunk.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
totalL1MessagePoppedBefore += totalL1MessagePoppedInChunk
|
|
||||||
|
|
||||||
totalL1CommitGas += CalldataNonZeroByteGas * (32 * (totalL1MessagePoppedInChunk + 255) / 256)
|
|
||||||
totalL1CommitGas += GetKeccak256Gas(89 + 32*(totalL1MessagePoppedInChunk+255)/256)
|
|
||||||
|
|
||||||
totalL1CommitCalldataSize := EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
totalL1CommitGas += GetMemoryExpansionCost(totalL1CommitCalldataSize)
|
|
||||||
}
|
|
||||||
|
|
||||||
return totalL1CommitGas
|
|
||||||
}
|
|
||||||
|
|
||||||
// EstimateBatchL1CommitCalldataSize calculates the calldata size in l1 commit for this batch approximately.
|
|
||||||
func EstimateBatchL1CommitCalldataSize(b *encoding.Batch) uint64 {
|
|
||||||
var totalL1CommitCalldataSize uint64
|
|
||||||
for _, chunk := range b.Chunks {
|
|
||||||
totalL1CommitCalldataSize += EstimateChunkL1CommitCalldataSize(chunk)
|
|
||||||
}
|
|
||||||
return totalL1CommitCalldataSize
|
|
||||||
}
|
|
||||||
|
|
||||||
// calculatePaddedBlobSize calculates the required size on blob storage
|
|
||||||
// where every 32 bytes can store only 31 bytes of actual data, with the first byte being zero.
|
|
||||||
func calculatePaddedBlobSize(dataSize uint64) uint64 {
|
|
||||||
paddedSize := (dataSize / 31) * 32
|
|
||||||
|
|
||||||
if dataSize%31 != 0 {
|
|
||||||
paddedSize += 1 + dataSize%31 // Add 1 byte for the first empty byte plus the remainder bytes
|
|
||||||
}
|
|
||||||
|
|
||||||
return paddedSize
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,237 +0,0 @@
|
|||||||
package encoding
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
|
||||||
"github.com/scroll-tech/go-ethereum/common/hexutil"
|
|
||||||
"github.com/scroll-tech/go-ethereum/core/types"
|
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CodecVersion defines the version of encoder and decoder.
|
|
||||||
type CodecVersion int
|
|
||||||
|
|
||||||
const (
|
|
||||||
// CodecV0 represents the version 0 of the encoder and decoder.
|
|
||||||
CodecV0 CodecVersion = iota
|
|
||||||
|
|
||||||
// CodecV1 represents the version 1 of the encoder and decoder.
|
|
||||||
CodecV1
|
|
||||||
|
|
||||||
// txTypeTest is a special transaction type used in unit tests.
|
|
||||||
txTypeTest = 0xff
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
// make sure txTypeTest will not interfere with other transaction types
|
|
||||||
if txTypeTest == types.LegacyTxType || txTypeTest == types.AccessListTxType || txTypeTest == types.DynamicFeeTxType || txTypeTest == types.BlobTxType || txTypeTest == types.L1MessageTxType {
|
|
||||||
log.Crit("txTypeTest is overlapping with existing transaction types")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Block represents an L2 block.
|
|
||||||
type Block struct {
|
|
||||||
Header *types.Header
|
|
||||||
Transactions []*types.TransactionData
|
|
||||||
WithdrawRoot common.Hash `json:"withdraw_trie_root,omitempty"`
|
|
||||||
RowConsumption *types.RowConsumption `json:"row_consumption,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Chunk represents a group of blocks.
|
|
||||||
type Chunk struct {
|
|
||||||
Blocks []*Block `json:"blocks"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Batch represents a batch of chunks.
|
|
||||||
type Batch struct {
|
|
||||||
Index uint64
|
|
||||||
TotalL1MessagePoppedBefore uint64
|
|
||||||
ParentBatchHash common.Hash
|
|
||||||
Chunks []*Chunk
|
|
||||||
}
|
|
||||||
|
|
||||||
// NumL1Messages returns the number of L1 messages in this block.
|
|
||||||
// This number is the sum of included and skipped L1 messages.
|
|
||||||
func (b *Block) NumL1Messages(totalL1MessagePoppedBefore uint64) uint64 {
|
|
||||||
var lastQueueIndex *uint64
|
|
||||||
for _, txData := range b.Transactions {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
lastQueueIndex = &txData.Nonce
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if lastQueueIndex == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
// note: last queue index included before this block is totalL1MessagePoppedBefore - 1
|
|
||||||
// TODO: cache results
|
|
||||||
return *lastQueueIndex - totalL1MessagePoppedBefore + 1
|
|
||||||
}
|
|
||||||
|
|
||||||
// NumL2Transactions returns the number of L2 transactions in this block.
|
|
||||||
func (b *Block) NumL2Transactions() uint64 {
|
|
||||||
var count uint64
|
|
||||||
for _, txData := range b.Transactions {
|
|
||||||
if txData.Type != types.L1MessageTxType {
|
|
||||||
count++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return count
|
|
||||||
}
|
|
||||||
|
|
||||||
// NumL1Messages returns the number of L1 messages in this chunk.
|
|
||||||
// This number is the sum of included and skipped L1 messages.
|
|
||||||
func (c *Chunk) NumL1Messages(totalL1MessagePoppedBefore uint64) uint64 {
|
|
||||||
var numL1Messages uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
numL1MessagesInBlock := block.NumL1Messages(totalL1MessagePoppedBefore)
|
|
||||||
numL1Messages += numL1MessagesInBlock
|
|
||||||
totalL1MessagePoppedBefore += numL1MessagesInBlock
|
|
||||||
}
|
|
||||||
// TODO: cache results
|
|
||||||
return numL1Messages
|
|
||||||
}
|
|
||||||
|
|
||||||
// ConvertTxDataToRLPEncoding transforms []*TransactionData into []*types.Transaction.
|
|
||||||
func ConvertTxDataToRLPEncoding(txData *types.TransactionData) ([]byte, error) {
|
|
||||||
data, err := hexutil.Decode(txData.Data)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to decode txData.Data: data=%v, err=%w", txData.Data, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
var tx *types.Transaction
|
|
||||||
switch txData.Type {
|
|
||||||
case types.LegacyTxType:
|
|
||||||
tx = types.NewTx(&types.LegacyTx{
|
|
||||||
Nonce: txData.Nonce,
|
|
||||||
To: txData.To,
|
|
||||||
Value: txData.Value.ToInt(),
|
|
||||||
Gas: txData.Gas,
|
|
||||||
GasPrice: txData.GasPrice.ToInt(),
|
|
||||||
Data: data,
|
|
||||||
V: txData.V.ToInt(),
|
|
||||||
R: txData.R.ToInt(),
|
|
||||||
S: txData.S.ToInt(),
|
|
||||||
})
|
|
||||||
|
|
||||||
case types.AccessListTxType:
|
|
||||||
tx = types.NewTx(&types.AccessListTx{
|
|
||||||
ChainID: txData.ChainId.ToInt(),
|
|
||||||
Nonce: txData.Nonce,
|
|
||||||
To: txData.To,
|
|
||||||
Value: txData.Value.ToInt(),
|
|
||||||
Gas: txData.Gas,
|
|
||||||
GasPrice: txData.GasPrice.ToInt(),
|
|
||||||
Data: data,
|
|
||||||
AccessList: txData.AccessList,
|
|
||||||
V: txData.V.ToInt(),
|
|
||||||
R: txData.R.ToInt(),
|
|
||||||
S: txData.S.ToInt(),
|
|
||||||
})
|
|
||||||
|
|
||||||
case types.DynamicFeeTxType:
|
|
||||||
tx = types.NewTx(&types.DynamicFeeTx{
|
|
||||||
ChainID: txData.ChainId.ToInt(),
|
|
||||||
Nonce: txData.Nonce,
|
|
||||||
To: txData.To,
|
|
||||||
Value: txData.Value.ToInt(),
|
|
||||||
Gas: txData.Gas,
|
|
||||||
GasTipCap: txData.GasTipCap.ToInt(),
|
|
||||||
GasFeeCap: txData.GasFeeCap.ToInt(),
|
|
||||||
Data: data,
|
|
||||||
AccessList: txData.AccessList,
|
|
||||||
V: txData.V.ToInt(),
|
|
||||||
R: txData.R.ToInt(),
|
|
||||||
S: txData.S.ToInt(),
|
|
||||||
})
|
|
||||||
|
|
||||||
case txTypeTest:
|
|
||||||
// in the tests, we simply use `data` as the RLP-encoded transaction
|
|
||||||
return data, nil
|
|
||||||
|
|
||||||
case types.L1MessageTxType: // L1MessageTxType is not supported
|
|
||||||
default:
|
|
||||||
return nil, fmt.Errorf("unsupported tx type: %d", txData.Type)
|
|
||||||
}
|
|
||||||
|
|
||||||
rlpTxData, err := tx.MarshalBinary()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to marshal binary of the tx: tx=%v, err=%w", tx, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return rlpTxData, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// CrcMax calculates the maximum row consumption of crc.
|
|
||||||
func (c *Chunk) CrcMax() (uint64, error) {
|
|
||||||
// Map sub-circuit name to row count
|
|
||||||
crc := make(map[string]uint64)
|
|
||||||
|
|
||||||
// Iterate over blocks, accumulate row consumption
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
if block.RowConsumption == nil {
|
|
||||||
return 0, fmt.Errorf("block (%d, %v) has nil RowConsumption", block.Header.Number, block.Header.Hash().Hex())
|
|
||||||
}
|
|
||||||
for _, subCircuit := range *block.RowConsumption {
|
|
||||||
crc[subCircuit.Name] += subCircuit.RowNumber
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the maximum row consumption
|
|
||||||
var maxVal uint64
|
|
||||||
for _, value := range crc {
|
|
||||||
if value > maxVal {
|
|
||||||
maxVal = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the maximum row consumption
|
|
||||||
return maxVal, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NumTransactions calculates the total number of transactions in a Chunk.
|
|
||||||
func (c *Chunk) NumTransactions() uint64 {
|
|
||||||
var totalTxNum uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
totalTxNum += uint64(len(block.Transactions))
|
|
||||||
}
|
|
||||||
return totalTxNum
|
|
||||||
}
|
|
||||||
|
|
||||||
// NumL2Transactions calculates the total number of L2 transactions in a Chunk.
|
|
||||||
func (c *Chunk) NumL2Transactions() uint64 {
|
|
||||||
var totalTxNum uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
totalTxNum += block.NumL2Transactions()
|
|
||||||
}
|
|
||||||
return totalTxNum
|
|
||||||
}
|
|
||||||
|
|
||||||
// L2GasUsed calculates the total gas of L2 transactions in a Chunk.
|
|
||||||
func (c *Chunk) L2GasUsed() uint64 {
|
|
||||||
var totalTxNum uint64
|
|
||||||
for _, block := range c.Blocks {
|
|
||||||
totalTxNum += block.Header.GasUsed
|
|
||||||
}
|
|
||||||
return totalTxNum
|
|
||||||
}
|
|
||||||
|
|
||||||
// StateRoot gets the state root after committing/finalizing the batch.
|
|
||||||
func (b *Batch) StateRoot() common.Hash {
|
|
||||||
numChunks := len(b.Chunks)
|
|
||||||
if len(b.Chunks) == 0 {
|
|
||||||
return common.Hash{}
|
|
||||||
}
|
|
||||||
lastChunkBlockNum := len(b.Chunks[numChunks-1].Blocks)
|
|
||||||
return b.Chunks[len(b.Chunks)-1].Blocks[lastChunkBlockNum-1].Header.Root
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithdrawRoot gets the withdraw root after committing/finalizing the batch.
|
|
||||||
func (b *Batch) WithdrawRoot() common.Hash {
|
|
||||||
numChunks := len(b.Chunks)
|
|
||||||
if len(b.Chunks) == 0 {
|
|
||||||
return common.Hash{}
|
|
||||||
}
|
|
||||||
lastChunkBlockNum := len(b.Chunks[numChunks-1].Blocks)
|
|
||||||
return b.Chunks[len(b.Chunks)-1].Blocks[lastChunkBlockNum-1].WithdrawRoot
|
|
||||||
}
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
package encoding
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
|
||||||
"github.com/scroll-tech/go-ethereum/core/types"
|
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
|
||||||
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.LogfmtFormat()))
|
|
||||||
glogger.Verbosity(log.LvlInfo)
|
|
||||||
log.Root().SetHandler(glogger)
|
|
||||||
|
|
||||||
m.Run()
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUtilFunctions(t *testing.T) {
|
|
||||||
block1 := readBlockFromJSON(t, "../../testdata/blockTrace_02.json")
|
|
||||||
block2 := readBlockFromJSON(t, "../../testdata/blockTrace_03.json")
|
|
||||||
block3 := readBlockFromJSON(t, "../../testdata/blockTrace_04.json")
|
|
||||||
block4 := readBlockFromJSON(t, "../../testdata/blockTrace_05.json")
|
|
||||||
block5 := readBlockFromJSON(t, "../../testdata/blockTrace_06.json")
|
|
||||||
block6 := readBlockFromJSON(t, "../../testdata/blockTrace_07.json")
|
|
||||||
|
|
||||||
chunk1 := &Chunk{Blocks: []*Block{block1, block2}}
|
|
||||||
chunk2 := &Chunk{Blocks: []*Block{block3, block4}}
|
|
||||||
chunk3 := &Chunk{Blocks: []*Block{block5, block6}}
|
|
||||||
|
|
||||||
batch := &Batch{Chunks: []*Chunk{chunk1, chunk2, chunk3}}
|
|
||||||
|
|
||||||
// Test Block methods
|
|
||||||
assert.Equal(t, uint64(0), block1.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(2), block1.NumL2Transactions())
|
|
||||||
assert.Equal(t, uint64(0), block2.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(1), block2.NumL2Transactions())
|
|
||||||
assert.Equal(t, uint64(11), block3.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(1), block3.NumL2Transactions())
|
|
||||||
assert.Equal(t, uint64(42), block4.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(0), block4.NumL2Transactions())
|
|
||||||
assert.Equal(t, uint64(10), block5.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(0), block5.NumL2Transactions())
|
|
||||||
assert.Equal(t, uint64(257), block6.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(0), block6.NumL2Transactions())
|
|
||||||
|
|
||||||
// Test Chunk methods
|
|
||||||
assert.Equal(t, uint64(0), chunk1.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(3), chunk1.NumL2Transactions())
|
|
||||||
crc1Max, err := chunk1.CrcMax()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(11), crc1Max)
|
|
||||||
assert.Equal(t, uint64(3), chunk1.NumTransactions())
|
|
||||||
assert.Equal(t, uint64(1194994), chunk1.L2GasUsed())
|
|
||||||
|
|
||||||
assert.Equal(t, uint64(42), chunk2.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(1), chunk2.NumL2Transactions())
|
|
||||||
crc2Max, err := chunk2.CrcMax()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, uint64(0), crc2Max)
|
|
||||||
assert.Equal(t, uint64(7), chunk2.NumTransactions())
|
|
||||||
assert.Equal(t, uint64(144000), chunk2.L2GasUsed())
|
|
||||||
|
|
||||||
assert.Equal(t, uint64(257), chunk3.NumL1Messages(0))
|
|
||||||
assert.Equal(t, uint64(0), chunk3.NumL2Transactions())
|
|
||||||
chunk3.Blocks[0].RowConsumption = nil
|
|
||||||
crc3Max, err := chunk3.CrcMax()
|
|
||||||
assert.Error(t, err)
|
|
||||||
assert.EqualError(t, err, "block (17, 0x003fee335455c0c293dda17ea9365fe0caa94071ed7216baf61f7aeb808e8a28) has nil RowConsumption")
|
|
||||||
assert.Equal(t, uint64(0), crc3Max)
|
|
||||||
assert.Equal(t, uint64(5), chunk3.NumTransactions())
|
|
||||||
assert.Equal(t, uint64(240000), chunk3.L2GasUsed())
|
|
||||||
|
|
||||||
// Test Batch methods
|
|
||||||
assert.Equal(t, block6.Header.Root, batch.StateRoot())
|
|
||||||
assert.Equal(t, block6.WithdrawRoot, batch.WithdrawRoot())
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestConvertTxDataToRLPEncoding(t *testing.T) {
|
|
||||||
blocks := []*Block{
|
|
||||||
readBlockFromJSON(t, "../../testdata/blockTrace_02.json"),
|
|
||||||
readBlockFromJSON(t, "../../testdata/blockTrace_03.json"),
|
|
||||||
readBlockFromJSON(t, "../../testdata/blockTrace_04.json"),
|
|
||||||
readBlockFromJSON(t, "../../testdata/blockTrace_05.json"),
|
|
||||||
readBlockFromJSON(t, "../../testdata/blockTrace_06.json"),
|
|
||||||
readBlockFromJSON(t, "../../testdata/blockTrace_07.json"),
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, block := range blocks {
|
|
||||||
for _, txData := range block.Transactions {
|
|
||||||
if txData.Type == types.L1MessageTxType {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
rlpTxData, err := ConvertTxDataToRLPEncoding(txData)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
var tx types.Transaction
|
|
||||||
err = tx.UnmarshalBinary(rlpTxData)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, txData.TxHash, tx.Hash().Hex())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestEmptyBatchRoots(t *testing.T) {
|
|
||||||
emptyBatch := &Batch{Chunks: []*Chunk{}}
|
|
||||||
assert.Equal(t, common.Hash{}, emptyBatch.StateRoot())
|
|
||||||
assert.Equal(t, common.Hash{}, emptyBatch.WithdrawRoot())
|
|
||||||
}
|
|
||||||
|
|
||||||
func readBlockFromJSON(t *testing.T, filename string) *Block {
|
|
||||||
data, err := os.ReadFile(filename)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
block := &Block{}
|
|
||||||
assert.NoError(t, json.Unmarshal(data, block))
|
|
||||||
return block
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
)
|
)
|
||||||
|
|
||||||
var tag = "v4.4.8"
|
var tag = "v4.4.9"
|
||||||
|
|
||||||
var commit = func() string {
|
var commit = func() string {
|
||||||
if info, ok := debug.ReadBuildInfo(); ok {
|
if info, ok := debug.ReadBuildInfo(); ok {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ require (
|
|||||||
github.com/gin-gonic/gin v1.9.1
|
github.com/gin-gonic/gin v1.9.1
|
||||||
github.com/go-resty/resty/v2 v2.7.0
|
github.com/go-resty/resty/v2 v2.7.0
|
||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/shopspring/decimal v1.3.1
|
github.com/shopspring/decimal v1.3.1
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
github.com/urfave/cli/v2 v2.25.7
|
github.com/urfave/cli/v2 v2.25.7
|
||||||
golang.org/x/arch v0.5.0 // indirect
|
golang.org/x/arch v0.5.0 // indirect
|
||||||
gorm.io/gorm v1.25.5
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -32,26 +32,23 @@ require (
|
|||||||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||||
github.com/leodido/go-urn v1.2.4 // indirect
|
github.com/leodido/go-urn v1.2.4 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||||
github.com/rivo/uniseg v0.4.4 // indirect
|
|
||||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||||
golang.org/x/net v0.18.0 // indirect
|
golang.org/x/net v0.20.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
google.golang.org/protobuf v1.31.0 // indirect
|
google.golang.org/protobuf v1.33.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/prometheus/client_golang v1.16.0
|
github.com/prometheus/client_golang v1.19.0
|
||||||
|
github.com/scroll-tech/da-codec v0.0.0-20240429123441-4aaf9d35e570
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
|
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bits-and-blooms/bitset v1.12.0 // indirect
|
github.com/bits-and-blooms/bitset v1.12.0 // indirect
|
||||||
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
||||||
@@ -59,30 +56,27 @@ require (
|
|||||||
github.com/consensys/bavard v0.1.13 // indirect
|
github.com/consensys/bavard v0.1.13 // indirect
|
||||||
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
|
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
|
||||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||||
github.com/go-stack/stack v1.8.1 // indirect
|
github.com/go-stack/stack v1.8.1 // indirect
|
||||||
github.com/golang/protobuf v1.5.3 // indirect
|
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
|
|
||||||
github.com/google/go-cmp v0.6.0 // indirect
|
|
||||||
github.com/holiman/uint256 v1.2.4 // indirect
|
github.com/holiman/uint256 v1.2.4 // indirect
|
||||||
github.com/iden3/go-iden3-crypto v0.0.15 // indirect
|
github.com/iden3/go-iden3-crypto v0.0.15 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
|
||||||
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/prometheus/client_model v0.4.0 // indirect
|
github.com/prometheus/client_model v0.5.0 // indirect
|
||||||
github.com/prometheus/common v0.42.0 // indirect
|
github.com/prometheus/common v0.48.0 // indirect
|
||||||
github.com/prometheus/procfs v0.12.0 // indirect
|
github.com/prometheus/procfs v0.12.0 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/scroll-tech/zktrie v0.7.1 // indirect
|
github.com/scroll-tech/zktrie v0.8.2 // indirect
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 // indirect
|
github.com/supranational/blst v0.3.11 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
||||||
|
github.com/tklauser/numcpus v0.6.1 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||||
golang.org/x/crypto v0.17.0 // indirect
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sync v0.6.0 // indirect
|
||||||
golang.org/x/sys v0.17.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
|
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
|
||||||
github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o=
|
github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o=
|
||||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
|
||||||
github.com/appleboy/gin-jwt/v2 v2.9.1 h1:l29et8iLW6omcHltsOP6LLk4s3v4g2FbFs0koxGWVZs=
|
github.com/appleboy/gin-jwt/v2 v2.9.1 h1:l29et8iLW6omcHltsOP6LLk4s3v4g2FbFs0koxGWVZs=
|
||||||
github.com/appleboy/gin-jwt/v2 v2.9.1/go.mod h1:jwcPZJ92uoC9nOUTOKWoN/f6JZOgMSKlFSHw5/FrRUk=
|
github.com/appleboy/gin-jwt/v2 v2.9.1/go.mod h1:jwcPZJ92uoC9nOUTOKWoN/f6JZOgMSKlFSHw5/FrRUk=
|
||||||
github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4=
|
github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4=
|
||||||
@@ -37,8 +36,8 @@ github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJ
|
|||||||
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -83,9 +82,6 @@ github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOW
|
|||||||
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
|
||||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
|
||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
@@ -135,8 +131,6 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
|
|||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
||||||
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
|
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
|
||||||
@@ -161,17 +155,16 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
|
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
|
||||||
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
|
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
|
||||||
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY=
|
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
||||||
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
|
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
||||||
github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
|
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
|
||||||
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
|
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
|
||||||
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
||||||
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
||||||
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
|
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
|
||||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
|
||||||
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
||||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
@@ -180,10 +173,12 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR
|
|||||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e h1:FcoK0rykAWI+5E7cQM6ALRLd5CmjBTHRvJztRBH2xeM=
|
github.com/scroll-tech/da-codec v0.0.0-20240429123441-4aaf9d35e570 h1:2oA2bAFPQXDZcUK8TA9qd5zj6AsURpHyBaAha5goP0c=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e/go.mod h1:7Rz2bh9pn42rGuxjh51CG7HL9SKMG3ZugJkL3emdZx8=
|
github.com/scroll-tech/da-codec v0.0.0-20240429123441-4aaf9d35e570/go.mod h1:1wWYii0OPwd5kw+xrz0PFgS420xNadrNF1x/ELJT+TM=
|
||||||
github.com/scroll-tech/zktrie v0.7.1 h1:NrmZNjuBzsbrKePqdHDG+t2cXnimbtezPAFS0+L9ElE=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
||||||
github.com/scroll-tech/zktrie v0.7.1/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
||||||
|
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/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
||||||
@@ -201,8 +196,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
|
|||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 h1:wh1wzwAhZBNiZO37uWS/nDaKiIwHz4mDo4pnA+fqTO0=
|
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
||||||
github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw=
|
github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw=
|
||||||
@@ -237,8 +232,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
|
|||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
@@ -248,10 +243,9 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||||
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||||
@@ -291,11 +285,10 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
|
|||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
@@ -310,8 +303,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde h1:9DShaph9qhkIYw7QF91I/ynrr4cOO2PZra2PFD7Mfeg=
|
||||||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||||
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
|
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
"scroll-tech/common/utils"
|
"scroll-tech/common/utils"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
"scroll-tech/common/utils"
|
"scroll-tech/common/utils"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,12 +6,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// L2Block represents a l2 block in the database.
|
// L2Block represents a l2 block in the database.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -21,7 +22,6 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/testcontainers"
|
"scroll-tech/common/testcontainers"
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
"scroll-tech/common/version"
|
"scroll-tech/common/version"
|
||||||
"scroll-tech/database/migrate"
|
"scroll-tech/database/migrate"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ require (
|
|||||||
github.com/jmoiron/sqlx v1.3.5
|
github.com/jmoiron/sqlx v1.3.5
|
||||||
github.com/lib/pq v1.10.9
|
github.com/lib/pq v1.10.9
|
||||||
github.com/pressly/goose/v3 v3.16.0
|
github.com/pressly/goose/v3 v3.16.0
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
github.com/urfave/cli/v2 v2.25.7
|
github.com/urfave/cli/v2 v2.25.7
|
||||||
)
|
)
|
||||||
@@ -15,15 +15,16 @@ require (
|
|||||||
dario.cat/mergo v1.0.0 // indirect
|
dario.cat/mergo v1.0.0 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/docker/cli v25.0.1+incompatible // indirect
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible // indirect
|
||||||
github.com/docker/docker v25.0.3+incompatible // indirect
|
github.com/docker/docker v26.1.0+incompatible // indirect
|
||||||
github.com/docker/go-connections v0.5.0 // indirect
|
github.com/docker/go-connections v0.5.0 // indirect
|
||||||
github.com/go-stack/stack v1.8.1 // indirect
|
github.com/go-stack/stack v1.8.1 // indirect
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/jackc/pgx/v5 v5.5.4 // indirect
|
github.com/jackc/pgx/v5 v5.5.4 // indirect
|
||||||
github.com/klauspost/compress v1.17.4 // indirect
|
github.com/klauspost/compress v1.17.4 // indirect
|
||||||
github.com/kr/pretty v0.3.1 // indirect
|
github.com/kr/pretty v0.3.1 // indirect
|
||||||
github.com/mattn/go-sqlite3 v1.14.16 // indirect
|
github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
||||||
|
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
||||||
@@ -32,10 +33,13 @@ require (
|
|||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||||
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/mod v0.16.0 // indirect
|
golang.org/x/mod v0.16.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sync v0.6.0 // indirect
|
||||||
golang.org/x/sys v0.17.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
|
golang.org/x/tools v0.17.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
|
||||||
|
google.golang.org/protobuf v1.33.0 // indirect
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
|
|||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbTO1lpcGSkU=
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible h1:xhVCHXq+P5LhT31+RuDuk0xXEbEnd50Fr37J1bGuyWg=
|
||||||
github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
github.com/docker/cli v25.0.4-0.20240305161310-2bf4225ad269+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||||
github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ=
|
github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM=
|
||||||
github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
||||||
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
||||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||||
@@ -85,10 +85,12 @@ github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
|||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||||
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
|
||||||
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
|
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||||
|
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||||
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
|
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
|
||||||
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
|
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
|
||||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||||
@@ -119,8 +121,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR
|
|||||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e h1:FcoK0rykAWI+5E7cQM6ALRLd5CmjBTHRvJztRBH2xeM=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e/go.mod h1:7Rz2bh9pn42rGuxjh51CG7HL9SKMG3ZugJkL3emdZx8=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
||||||
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
||||||
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
||||||
github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=
|
github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=
|
||||||
@@ -153,26 +155,26 @@ go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y
|
|||||||
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
|
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
|
||||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
||||||
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
|
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||||
golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk=
|
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM=
|
||||||
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
||||||
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
||||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
|
|||||||
2
go.work
2
go.work
@@ -1,4 +1,4 @@
|
|||||||
go 1.21
|
go 1.21.0
|
||||||
|
|
||||||
use (
|
use (
|
||||||
./bridge-history-api
|
./bridge-history-api
|
||||||
|
|||||||
1765
go.work.sum
1765
go.work.sum
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ go 1.21
|
|||||||
require (
|
require (
|
||||||
github.com/go-resty/resty/v2 v2.7.0
|
github.com/go-resty/resty/v2 v2.7.0
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
github.com/urfave/cli/v2 v2.25.7
|
github.com/urfave/cli/v2 v2.25.7
|
||||||
go.etcd.io/bbolt v1.3.7
|
go.etcd.io/bbolt v1.3.7
|
||||||
@@ -19,7 +19,7 @@ require (
|
|||||||
github.com/consensys/bavard v0.1.13 // indirect
|
github.com/consensys/bavard v0.1.13 // indirect
|
||||||
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/deckarep/golang-set v1.8.0 // indirect
|
github.com/deckarep/golang-set v1.8.0 // indirect
|
||||||
github.com/edsrzf/mmap-go v1.0.0 // indirect
|
github.com/edsrzf/mmap-go v1.0.0 // indirect
|
||||||
@@ -59,18 +59,18 @@ require (
|
|||||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
||||||
github.com/rs/cors v1.7.0 // indirect
|
github.com/rs/cors v1.7.0 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/scroll-tech/zktrie v0.7.1 // indirect
|
github.com/scroll-tech/zktrie v0.8.2 // indirect
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
||||||
github.com/status-im/keycard-go v0.2.0 // indirect
|
github.com/status-im/keycard-go v0.2.0 // indirect
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 // indirect
|
github.com/supranational/blst v0.3.11 // indirect
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
||||||
github.com/tklauser/numcpus v0.6.1 // indirect
|
github.com/tklauser/numcpus v0.6.1 // indirect
|
||||||
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
|
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||||
golang.org/x/crypto v0.17.0 // indirect
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/net v0.18.0 // indirect
|
golang.org/x/net v0.20.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sync v0.6.0 // indirect
|
||||||
golang.org/x/sys v0.17.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJ
|
|||||||
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -168,10 +168,10 @@ 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/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e h1:FcoK0rykAWI+5E7cQM6ALRLd5CmjBTHRvJztRBH2xeM=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e/go.mod h1:7Rz2bh9pn42rGuxjh51CG7HL9SKMG3ZugJkL3emdZx8=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
||||||
github.com/scroll-tech/zktrie v0.7.1 h1:NrmZNjuBzsbrKePqdHDG+t2cXnimbtezPAFS0+L9ElE=
|
github.com/scroll-tech/zktrie v0.8.2 h1:UMuIfA+jdgWMLmTgTL64Emo+zzMOdcnH0+eYdDcshxQ=
|
||||||
github.com/scroll-tech/zktrie v0.7.1/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
|
github.com/scroll-tech/zktrie v0.8.2/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||||
@@ -184,8 +184,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
|
|||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 h1:wh1wzwAhZBNiZO37uWS/nDaKiIwHz4mDo4pnA+fqTO0=
|
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
||||||
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
||||||
@@ -207,8 +207,8 @@ golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnf
|
|||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
@@ -217,8 +217,8 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/
|
|||||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
|||||||
@@ -1,15 +1,29 @@
|
|||||||
.PHONY: mock_abi rollup_bins event_watcher gas_oracle rollup_relayer test lint clean docker
|
.PHONY: mock_abi libzstd rollup_bins event_watcher gas_oracle rollup_relayer test lint clean docker
|
||||||
|
|
||||||
IMAGE_VERSION=latest
|
IMAGE_VERSION=latest
|
||||||
REPO_ROOT_DIR=./..
|
REPO_ROOT_DIR=./..
|
||||||
|
LIBSCROLL_ZSTD_VERSION=v0.1.0-rc0-ubuntu20.04
|
||||||
|
SCROLL_LIB_PATH=/scroll/lib
|
||||||
|
|
||||||
mock_abi:
|
mock_abi:
|
||||||
cd .. && solc --evm-version cancun --bin --abi --optimize --overwrite -o ./build/bin ./rollup/mock_bridge/MockBridge.sol
|
cd .. && solc --evm-version cancun --bin --abi --optimize --overwrite -o ./build/bin ./rollup/mock_bridge/MockBridge.sol
|
||||||
cd .. && go run github.com/scroll-tech/go-ethereum/cmd/abigen --bin=./build/bin/MockBridge.bin --abi=./build/bin/MockBridge.abi --pkg=mock_bridge --out=./rollup/mock_bridge/MockBridge.go
|
cd .. && go run github.com/scroll-tech/go-ethereum/cmd/abigen --bin=./build/bin/MockBridge.bin --abi=./build/bin/MockBridge.abi --pkg=mock_bridge --out=./rollup/mock_bridge/MockBridge.go
|
||||||
|
|
||||||
rollup_bins: ## Builds the Rollup bins.
|
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/v0.1.0-rc0-ubuntu20.04/libscroll_zstd.so
|
||||||
|
|
||||||
|
rollup_bins: libzstd ## Builds the Rollup bins.
|
||||||
|
export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(SCROLL_LIB_PATH) && \
|
||||||
|
export CGO_LDFLAGS="-L$(SCROLL_LIB_PATH) -Wl,-rpath,$(SCROLL_LIB_PATH)" && \
|
||||||
go build -o $(PWD)/build/bin/event_watcher ./cmd/event_watcher/
|
go build -o $(PWD)/build/bin/event_watcher ./cmd/event_watcher/
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(SCROLL_LIB_PATH) && \
|
||||||
|
export CGO_LDFLAGS="-L$(SCROLL_LIB_PATH) -Wl,-rpath,$(SCROLL_LIB_PATH)" && \
|
||||||
go build -o $(PWD)/build/bin/gas_oracle ./cmd/gas_oracle/
|
go build -o $(PWD)/build/bin/gas_oracle ./cmd/gas_oracle/
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(SCROLL_LIB_PATH) && \
|
||||||
|
export CGO_LDFLAGS="-L$(SCROLL_LIB_PATH) -Wl,-rpath,$(SCROLL_LIB_PATH)" && \
|
||||||
go build -o $(PWD)/build/bin/rollup_relayer ./cmd/rollup_relayer/
|
go build -o $(PWD)/build/bin/rollup_relayer ./cmd/rollup_relayer/
|
||||||
|
|
||||||
event_watcher: ## Builds the event_watcher bin
|
event_watcher: ## Builds the event_watcher bin
|
||||||
|
|||||||
@@ -70,14 +70,15 @@
|
|||||||
"max_l1_commit_calldata_size_per_chunk": 112345,
|
"max_l1_commit_calldata_size_per_chunk": 112345,
|
||||||
"chunk_timeout_sec": 300,
|
"chunk_timeout_sec": 300,
|
||||||
"max_row_consumption_per_chunk": 1048319,
|
"max_row_consumption_per_chunk": 1048319,
|
||||||
"gas_cost_increase_multiplier": 1.2
|
"gas_cost_increase_multiplier": 1.2,
|
||||||
|
"max_uncompressed_batch_bytes_size": 634880
|
||||||
},
|
},
|
||||||
"batch_proposer_config": {
|
"batch_proposer_config": {
|
||||||
"max_chunk_num_per_batch": 112,
|
|
||||||
"max_l1_commit_gas_per_batch": 11234567,
|
"max_l1_commit_gas_per_batch": 11234567,
|
||||||
"max_l1_commit_calldata_size_per_batch": 112345,
|
"max_l1_commit_calldata_size_per_batch": 112345,
|
||||||
"batch_timeout_sec": 300,
|
"batch_timeout_sec": 300,
|
||||||
"gas_cost_increase_multiplier": 1.2
|
"gas_cost_increase_multiplier": 1.2,
|
||||||
|
"max_uncompressed_batch_bytes_size": 634880
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"db_config": {
|
"db_config": {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ require (
|
|||||||
github.com/go-resty/resty/v2 v2.7.0
|
github.com/go-resty/resty/v2 v2.7.0
|
||||||
github.com/holiman/uint256 v1.2.4
|
github.com/holiman/uint256 v1.2.4
|
||||||
github.com/prometheus/client_golang v1.16.0
|
github.com/prometheus/client_golang v1.16.0
|
||||||
|
github.com/scroll-tech/da-codec v0.0.0-20240527110002-d7bcb621a61a
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/smartystreets/goconvey v1.8.0
|
github.com/smartystreets/goconvey v1.8.0
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
@@ -61,7 +62,6 @@ require (
|
|||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/jtolds/gls v4.20.0+incompatible // indirect
|
github.com/jtolds/gls v4.20.0+incompatible // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
|
||||||
github.com/leodido/go-urn v1.2.4 // indirect
|
github.com/leodido/go-urn v1.2.4 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
@@ -84,7 +84,6 @@ require (
|
|||||||
github.com/prometheus/tsdb v0.7.1 // indirect
|
github.com/prometheus/tsdb v0.7.1 // indirect
|
||||||
github.com/rivo/uniseg v0.4.4 // indirect
|
github.com/rivo/uniseg v0.4.4 // indirect
|
||||||
github.com/rjeczalik/notify v0.9.1 // indirect
|
github.com/rjeczalik/notify v0.9.1 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
|
||||||
github.com/rs/cors v1.7.0 // indirect
|
github.com/rs/cors v1.7.0 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/scroll-tech/zktrie v0.8.2 // indirect
|
github.com/scroll-tech/zktrie v0.8.2 // indirect
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0q
|
|||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
|
||||||
github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
|
||||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
@@ -237,6 +236,8 @@ 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/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
|
github.com/scroll-tech/da-codec v0.0.0-20240527110002-d7bcb621a61a h1:5uWQHo/+cXexQGeSrywtXM2z29zRFctmux2vXs3JLrM=
|
||||||
|
github.com/scroll-tech/da-codec v0.0.0-20240527110002-d7bcb621a61a/go.mod h1:1wWYii0OPwd5kw+xrz0PFgS420xNadrNF1x/ELJT+TM=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
||||||
github.com/scroll-tech/zktrie v0.8.2 h1:UMuIfA+jdgWMLmTgTL64Emo+zzMOdcnH0+eYdDcshxQ=
|
github.com/scroll-tech/zktrie v0.8.2 h1:UMuIfA+jdgWMLmTgTL64Emo+zzMOdcnH0+eYdDcshxQ=
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package config
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
@@ -16,13 +15,6 @@ type Config struct {
|
|||||||
DBConfig *database.Config `json:"db_config"`
|
DBConfig *database.Config `json:"db_config"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Config) validate() error {
|
|
||||||
if maxChunkPerBatch := c.L2Config.BatchProposerConfig.MaxChunkNumPerBatch; maxChunkPerBatch <= 0 {
|
|
||||||
return fmt.Errorf("Invalid max_chunk_num_per_batch configuration: %v", maxChunkPerBatch)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewConfig returns a new instance of Config.
|
// NewConfig returns a new instance of Config.
|
||||||
func NewConfig(file string) (*Config, error) {
|
func NewConfig(file string) (*Config, error) {
|
||||||
buf, err := os.ReadFile(filepath.Clean(file))
|
buf, err := os.ReadFile(filepath.Clean(file))
|
||||||
@@ -36,8 +28,5 @@ func NewConfig(file string) (*Config, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := cfg.validate(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return cfg, nil
|
return cfg, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,13 +33,14 @@ type ChunkProposerConfig struct {
|
|||||||
ChunkTimeoutSec uint64 `json:"chunk_timeout_sec"`
|
ChunkTimeoutSec uint64 `json:"chunk_timeout_sec"`
|
||||||
MaxRowConsumptionPerChunk uint64 `json:"max_row_consumption_per_chunk"`
|
MaxRowConsumptionPerChunk uint64 `json:"max_row_consumption_per_chunk"`
|
||||||
GasCostIncreaseMultiplier float64 `json:"gas_cost_increase_multiplier"`
|
GasCostIncreaseMultiplier float64 `json:"gas_cost_increase_multiplier"`
|
||||||
|
MaxUncompressedBatchBytesSize uint64 `json:"max_uncompressed_batch_bytes_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchProposerConfig loads batch_proposer configuration items.
|
// BatchProposerConfig loads batch_proposer configuration items.
|
||||||
type BatchProposerConfig struct {
|
type BatchProposerConfig struct {
|
||||||
MaxChunkNumPerBatch uint64 `json:"max_chunk_num_per_batch"`
|
|
||||||
MaxL1CommitGasPerBatch uint64 `json:"max_l1_commit_gas_per_batch"`
|
MaxL1CommitGasPerBatch uint64 `json:"max_l1_commit_gas_per_batch"`
|
||||||
MaxL1CommitCalldataSizePerBatch uint64 `json:"max_l1_commit_calldata_size_per_batch"`
|
MaxL1CommitCalldataSizePerBatch uint64 `json:"max_l1_commit_calldata_size_per_batch"`
|
||||||
BatchTimeoutSec uint64 `json:"batch_timeout_sec"`
|
BatchTimeoutSec uint64 `json:"batch_timeout_sec"`
|
||||||
GasCostIncreaseMultiplier float64 `json:"gas_cost_increase_multiplier"`
|
GasCostIncreaseMultiplier float64 `json:"gas_cost_increase_multiplier"`
|
||||||
|
MaxUncompressedBatchBytesSize uint64 `json:"max_uncompressed_batch_bytes_size"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv1"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv2"
|
||||||
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
@@ -20,9 +24,6 @@ import (
|
|||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
"scroll-tech/common/types/encoding/codecv1"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
"scroll-tech/common/utils"
|
"scroll-tech/common/utils"
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ import (
|
|||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
"scroll-tech/rollup/internal/controller/sender"
|
"scroll-tech/rollup/internal/controller/sender"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
|
rutils "scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Layer2Relayer is responsible for
|
// Layer2Relayer is responsible for
|
||||||
@@ -196,7 +198,7 @@ func (r *Layer2Relayer) initializeGenesis() error {
|
|||||||
|
|
||||||
err = r.db.Transaction(func(dbTX *gorm.DB) error {
|
err = r.db.Transaction(func(dbTX *gorm.DB) error {
|
||||||
var dbChunk *orm.Chunk
|
var dbChunk *orm.Chunk
|
||||||
dbChunk, err = r.chunkOrm.InsertChunk(r.ctx, chunk, encoding.CodecV0, dbTX)
|
dbChunk, err = r.chunkOrm.InsertChunk(r.ctx, chunk, encoding.CodecV0, rutils.ChunkMetrics{}, dbTX)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to insert chunk: %v", err)
|
return fmt.Errorf("failed to insert chunk: %v", err)
|
||||||
}
|
}
|
||||||
@@ -213,7 +215,7 @@ func (r *Layer2Relayer) initializeGenesis() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dbBatch *orm.Batch
|
var dbBatch *orm.Batch
|
||||||
dbBatch, err = r.batchOrm.InsertBatch(r.ctx, batch, encoding.CodecV0, dbTX)
|
dbBatch, err = r.batchOrm.InsertBatch(r.ctx, batch, encoding.CodecV0, rutils.BatchMetrics{}, dbTX)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to insert batch: %v", err)
|
return fmt.Errorf("failed to insert batch: %v", err)
|
||||||
}
|
}
|
||||||
@@ -380,12 +382,18 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
|
|||||||
log.Error("failed to construct commitBatch payload codecv0", "index", dbBatch.Index, "err", err)
|
log.Error("failed to construct commitBatch payload codecv0", "index", dbBatch.Index, "err", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else { // codecv1
|
} else if !r.chainCfg.IsCurie(new(big.Int).SetUint64(dbChunks[0].StartBlockNumber)) { // codecv1
|
||||||
calldata, blob, err = r.constructCommitBatchPayloadCodecV1(dbBatch, dbParentBatch, dbChunks, chunks)
|
calldata, blob, err = r.constructCommitBatchPayloadCodecV1(dbBatch, dbParentBatch, dbChunks, chunks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("failed to construct commitBatch payload codecv1", "index", dbBatch.Index, "err", err)
|
log.Error("failed to construct commitBatch payload codecv1", "index", dbBatch.Index, "err", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else { // codecv2
|
||||||
|
calldata, blob, err = r.constructCommitBatchPayloadCodecV2(dbBatch, dbParentBatch, dbChunks, chunks)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("failed to construct commitBatch payload codecv2", "index", dbBatch.Index, "err", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fallbackGasLimit is non-zero only in sending non-blob transactions.
|
// fallbackGasLimit is non-zero only in sending non-blob transactions.
|
||||||
@@ -540,7 +548,7 @@ func (r *Layer2Relayer) finalizeBatch(dbBatch *orm.Batch, withProof bool) error
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to construct commitBatch payload codecv0, index: %v, err: %w", dbBatch.Index, err)
|
return fmt.Errorf("failed to construct commitBatch payload codecv0, index: %v, err: %w", dbBatch.Index, err)
|
||||||
}
|
}
|
||||||
} else { // codecv1
|
} else if !r.chainCfg.IsCurie(new(big.Int).SetUint64(dbChunks[0].StartBlockNumber)) { // codecv1
|
||||||
chunks := make([]*encoding.Chunk, len(dbChunks))
|
chunks := make([]*encoding.Chunk, len(dbChunks))
|
||||||
for i, c := range dbChunks {
|
for i, c := range dbChunks {
|
||||||
blocks, dbErr := r.l2BlockOrm.GetL2BlocksInRange(r.ctx, c.StartBlockNumber, c.EndBlockNumber)
|
blocks, dbErr := r.l2BlockOrm.GetL2BlocksInRange(r.ctx, c.StartBlockNumber, c.EndBlockNumber)
|
||||||
@@ -554,6 +562,20 @@ func (r *Layer2Relayer) finalizeBatch(dbBatch *orm.Batch, withProof bool) error
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to construct commitBatch payload codecv1, index: %v, err: %w", dbBatch.Index, err)
|
return fmt.Errorf("failed to construct commitBatch payload codecv1, index: %v, err: %w", dbBatch.Index, err)
|
||||||
}
|
}
|
||||||
|
} else { // codecv2
|
||||||
|
chunks := make([]*encoding.Chunk, len(dbChunks))
|
||||||
|
for i, c := range dbChunks {
|
||||||
|
blocks, dbErr := r.l2BlockOrm.GetL2BlocksInRange(r.ctx, c.StartBlockNumber, c.EndBlockNumber)
|
||||||
|
if dbErr != nil {
|
||||||
|
return fmt.Errorf("failed to fetch blocks: %w", dbErr)
|
||||||
|
}
|
||||||
|
chunks[i] = &encoding.Chunk{Blocks: blocks}
|
||||||
|
}
|
||||||
|
|
||||||
|
calldata, err = r.constructFinalizeBatchPayloadCodecV2(dbBatch, dbParentBatch, dbChunks, chunks, aggProof)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to construct commitBatch payload codecv1, index: %v, err: %w", dbBatch.Index, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
txHash, err := r.finalizeSender.SendTransaction(dbBatch.Hash, &r.cfg.RollupContractAddress, calldata, nil, 0)
|
txHash, err := r.finalizeSender.SendTransaction(dbBatch.Hash, &r.cfg.RollupContractAddress, calldata, nil, 0)
|
||||||
@@ -787,6 +809,35 @@ func (r *Layer2Relayer) constructCommitBatchPayloadCodecV1(dbBatch *orm.Batch, d
|
|||||||
return calldata, daBatch.Blob(), nil
|
return calldata, daBatch.Blob(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Layer2Relayer) constructCommitBatchPayloadCodecV2(dbBatch *orm.Batch, dbParentBatch *orm.Batch, dbChunks []*orm.Chunk, chunks []*encoding.Chunk) ([]byte, *kzg4844.Blob, error) {
|
||||||
|
batch := &encoding.Batch{
|
||||||
|
Index: dbBatch.Index,
|
||||||
|
TotalL1MessagePoppedBefore: dbChunks[0].TotalL1MessagesPoppedBefore,
|
||||||
|
ParentBatchHash: common.HexToHash(dbParentBatch.Hash),
|
||||||
|
Chunks: chunks,
|
||||||
|
}
|
||||||
|
|
||||||
|
daBatch, createErr := codecv2.NewDABatch(batch)
|
||||||
|
if createErr != nil {
|
||||||
|
return nil, nil, fmt.Errorf("failed to create DA batch: %w", createErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
encodedChunks := make([][]byte, len(dbChunks))
|
||||||
|
for i, c := range dbChunks {
|
||||||
|
daChunk, createErr := codecv2.NewDAChunk(chunks[i], c.TotalL1MessagesPoppedBefore)
|
||||||
|
if createErr != nil {
|
||||||
|
return nil, nil, fmt.Errorf("failed to create DA chunk: %w", createErr)
|
||||||
|
}
|
||||||
|
encodedChunks[i] = daChunk.Encode()
|
||||||
|
}
|
||||||
|
|
||||||
|
calldata, packErr := r.l1RollupABI.Pack("commitBatch", daBatch.Version, dbParentBatch.BatchHeader, encodedChunks, daBatch.SkippedL1MessageBitmap)
|
||||||
|
if packErr != nil {
|
||||||
|
return nil, nil, fmt.Errorf("failed to pack commitBatch: %w", packErr)
|
||||||
|
}
|
||||||
|
return calldata, daBatch.Blob(), nil
|
||||||
|
}
|
||||||
|
|
||||||
func (r *Layer2Relayer) constructFinalizeBatchPayloadCodecV0(dbBatch *orm.Batch, dbParentBatch *orm.Batch, aggProof *message.BatchProof) ([]byte, error) {
|
func (r *Layer2Relayer) constructFinalizeBatchPayloadCodecV0(dbBatch *orm.Batch, dbParentBatch *orm.Batch, aggProof *message.BatchProof) ([]byte, error) {
|
||||||
if aggProof != nil { // finalizeBatch with proof.
|
if aggProof != nil { // finalizeBatch with proof.
|
||||||
calldata, packErr := r.l1RollupABI.Pack(
|
calldata, packErr := r.l1RollupABI.Pack(
|
||||||
@@ -866,6 +917,55 @@ func (r *Layer2Relayer) constructFinalizeBatchPayloadCodecV1(dbBatch *orm.Batch,
|
|||||||
return calldata, nil
|
return calldata, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Layer2Relayer) constructFinalizeBatchPayloadCodecV2(dbBatch *orm.Batch, dbParentBatch *orm.Batch, dbChunks []*orm.Chunk, chunks []*encoding.Chunk, aggProof *message.BatchProof) ([]byte, error) {
|
||||||
|
batch := &encoding.Batch{
|
||||||
|
Index: dbBatch.Index,
|
||||||
|
TotalL1MessagePoppedBefore: dbChunks[0].TotalL1MessagesPoppedBefore,
|
||||||
|
ParentBatchHash: common.HexToHash(dbParentBatch.Hash),
|
||||||
|
Chunks: chunks,
|
||||||
|
}
|
||||||
|
|
||||||
|
daBatch, createErr := codecv2.NewDABatch(batch)
|
||||||
|
if createErr != nil {
|
||||||
|
return nil, fmt.Errorf("failed to create DA batch: %w", createErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
blobDataProof, getErr := daBatch.BlobDataProof()
|
||||||
|
if getErr != nil {
|
||||||
|
return nil, fmt.Errorf("failed to get blob data proof: %w", getErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
if aggProof != nil { // finalizeBatch4844 with proof.
|
||||||
|
calldata, packErr := r.l1RollupABI.Pack(
|
||||||
|
"finalizeBatchWithProof4844",
|
||||||
|
dbBatch.BatchHeader,
|
||||||
|
common.HexToHash(dbParentBatch.StateRoot),
|
||||||
|
common.HexToHash(dbBatch.StateRoot),
|
||||||
|
common.HexToHash(dbBatch.WithdrawRoot),
|
||||||
|
blobDataProof,
|
||||||
|
aggProof.Proof,
|
||||||
|
)
|
||||||
|
if packErr != nil {
|
||||||
|
return nil, fmt.Errorf("failed to pack finalizeBatchWithProof4844: %w", packErr)
|
||||||
|
}
|
||||||
|
return calldata, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// finalizeBatch4844 without proof.
|
||||||
|
calldata, packErr := r.l1RollupABI.Pack(
|
||||||
|
"finalizeBatch4844",
|
||||||
|
dbBatch.BatchHeader,
|
||||||
|
common.HexToHash(dbParentBatch.StateRoot),
|
||||||
|
common.HexToHash(dbBatch.StateRoot),
|
||||||
|
common.HexToHash(dbBatch.WithdrawRoot),
|
||||||
|
blobDataProof,
|
||||||
|
)
|
||||||
|
if packErr != nil {
|
||||||
|
return nil, fmt.Errorf("failed to pack finalizeBatch4844: %w", packErr)
|
||||||
|
}
|
||||||
|
return calldata, nil
|
||||||
|
}
|
||||||
|
|
||||||
// StopSenders stops the senders of the rollup-relayer to prevent querying the removed pending_transaction table in unit tests.
|
// StopSenders stops the senders of the rollup-relayer to prevent querying the removed pending_transaction table in unit tests.
|
||||||
// for unit test
|
// for unit test
|
||||||
func (r *Layer2Relayer) StopSenders() {
|
func (r *Layer2Relayer) StopSenders() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/agiledragon/gomonkey/v2"
|
"github.com/agiledragon/gomonkey/v2"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/crypto/kzg4844"
|
"github.com/scroll-tech/go-ethereum/crypto/kzg4844"
|
||||||
@@ -21,7 +22,6 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
"scroll-tech/common/utils"
|
"scroll-tech/common/utils"
|
||||||
|
|
||||||
@@ -29,6 +29,7 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/rollup/internal/controller/sender"
|
"scroll-tech/rollup/internal/controller/sender"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
|
rutils "scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setupL2RelayerDB(t *testing.T) *gorm.DB {
|
func setupL2RelayerDB(t *testing.T) *gorm.DB {
|
||||||
@@ -50,7 +51,7 @@ func testCreateNewRelayer(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testL2RelayerProcessPendingBatches(t *testing.T) {
|
func testL2RelayerProcessPendingBatches(t *testing.T) {
|
||||||
codecVersions := []encoding.CodecVersion{encoding.CodecV0, encoding.CodecV1}
|
codecVersions := []encoding.CodecVersion{encoding.CodecV0, encoding.CodecV1, encoding.CodecV2}
|
||||||
for _, codecVersion := range codecVersions {
|
for _, codecVersion := range codecVersions {
|
||||||
db := setupL2RelayerDB(t)
|
db := setupL2RelayerDB(t)
|
||||||
defer database.CloseDB(db)
|
defer database.CloseDB(db)
|
||||||
@@ -72,9 +73,9 @@ func testL2RelayerProcessPendingBatches(t *testing.T) {
|
|||||||
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err = chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion)
|
_, err = chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
_, err = chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion)
|
_, err = chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
@@ -85,7 +86,7 @@ func testL2RelayerProcessPendingBatches(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion)
|
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
relayer.ProcessPendingBatches()
|
relayer.ProcessPendingBatches()
|
||||||
@@ -100,7 +101,7 @@ func testL2RelayerProcessPendingBatches(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testL2RelayerProcessCommittedBatches(t *testing.T) {
|
func testL2RelayerProcessCommittedBatches(t *testing.T) {
|
||||||
codecVersions := []encoding.CodecVersion{encoding.CodecV0, encoding.CodecV1}
|
codecVersions := []encoding.CodecVersion{encoding.CodecV0, encoding.CodecV1, encoding.CodecV2}
|
||||||
for _, codecVersion := range codecVersions {
|
for _, codecVersion := range codecVersions {
|
||||||
db := setupL2RelayerDB(t)
|
db := setupL2RelayerDB(t)
|
||||||
defer database.CloseDB(db)
|
defer database.CloseDB(db)
|
||||||
@@ -117,9 +118,9 @@ func testL2RelayerProcessCommittedBatches(t *testing.T) {
|
|||||||
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err = chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion)
|
_, err = chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
_, err = chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion)
|
_, err = chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
@@ -130,7 +131,7 @@ func testL2RelayerProcessCommittedBatches(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion)
|
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
err = batchOrm.UpdateRollupStatus(context.Background(), dbBatch.Hash, types.RollupCommitted)
|
err = batchOrm.UpdateRollupStatus(context.Background(), dbBatch.Hash, types.RollupCommitted)
|
||||||
@@ -163,7 +164,7 @@ func testL2RelayerProcessCommittedBatches(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testL2RelayerFinalizeTimeoutBatches(t *testing.T) {
|
func testL2RelayerFinalizeTimeoutBatches(t *testing.T) {
|
||||||
codecVersions := []encoding.CodecVersion{encoding.CodecV0, encoding.CodecV1}
|
codecVersions := []encoding.CodecVersion{encoding.CodecV0, encoding.CodecV1, encoding.CodecV2}
|
||||||
for _, codecVersion := range codecVersions {
|
for _, codecVersion := range codecVersions {
|
||||||
db := setupL2RelayerDB(t)
|
db := setupL2RelayerDB(t)
|
||||||
defer database.CloseDB(db)
|
defer database.CloseDB(db)
|
||||||
@@ -182,9 +183,9 @@ func testL2RelayerFinalizeTimeoutBatches(t *testing.T) {
|
|||||||
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
chunkDB1, err := chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion)
|
chunkDB1, err := chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
chunkDB2, err := chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion)
|
chunkDB2, err := chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
@@ -195,7 +196,7 @@ func testL2RelayerFinalizeTimeoutBatches(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion)
|
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
err = batchOrm.UpdateRollupStatus(context.Background(), dbBatch.Hash, types.RollupCommitted)
|
err = batchOrm.UpdateRollupStatus(context.Background(), dbBatch.Hash, types.RollupCommitted)
|
||||||
@@ -255,7 +256,7 @@ func testL2RelayerCommitConfirm(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk1, chunk2},
|
Chunks: []*encoding.Chunk{chunk1, chunk2},
|
||||||
}
|
}
|
||||||
|
|
||||||
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batchHashes[i] = dbBatch.Hash
|
batchHashes[i] = dbBatch.Hash
|
||||||
}
|
}
|
||||||
@@ -311,7 +312,7 @@ func testL2RelayerFinalizeConfirm(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk1, chunk2},
|
Chunks: []*encoding.Chunk{chunk1, chunk2},
|
||||||
}
|
}
|
||||||
|
|
||||||
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batchHashes[i] = dbBatch.Hash
|
batchHashes[i] = dbBatch.Hash
|
||||||
}
|
}
|
||||||
@@ -355,7 +356,7 @@ func testL2RelayerGasOracleConfirm(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
dbBatch1, err := batchOrm.InsertBatch(context.Background(), batch1, encoding.CodecV0)
|
dbBatch1, err := batchOrm.InsertBatch(context.Background(), batch1, encoding.CodecV0, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
batch2 := &encoding.Batch{
|
batch2 := &encoding.Batch{
|
||||||
@@ -365,7 +366,7 @@ func testL2RelayerGasOracleConfirm(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk2},
|
Chunks: []*encoding.Chunk{chunk2},
|
||||||
}
|
}
|
||||||
|
|
||||||
dbBatch2, err := batchOrm.InsertBatch(context.Background(), batch2, encoding.CodecV0)
|
dbBatch2, err := batchOrm.InsertBatch(context.Background(), batch2, encoding.CodecV0, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Create and set up the Layer2 Relayer.
|
// Create and set up the Layer2 Relayer.
|
||||||
@@ -517,9 +518,9 @@ func testGetBatchStatusByIndex(t *testing.T) {
|
|||||||
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err = chunkOrm.InsertChunk(context.Background(), chunk1, encoding.CodecV0)
|
_, err = chunkOrm.InsertChunk(context.Background(), chunk1, encoding.CodecV0, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
_, err = chunkOrm.InsertChunk(context.Background(), chunk2, encoding.CodecV0)
|
_, err = chunkOrm.InsertChunk(context.Background(), chunk2, encoding.CodecV0, rutils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
@@ -530,7 +531,7 @@ func testGetBatchStatusByIndex(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
dbBatch, err := batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, rutils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
status, err := relayer.getBatchStatusByIndex(dbBatch)
|
status, err := relayer.getBatchStatusByIndex(dbBatch)
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
"github.com/scroll-tech/go-ethereum/ethclient"
|
"github.com/scroll-tech/go-ethereum/ethclient"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
@@ -15,8 +17,6 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/testcontainers"
|
"scroll-tech/common/testcontainers"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -749,7 +749,10 @@ func testBlobTransactionWithBlobhashOpContractCall(t *testing.T) {
|
|||||||
assert.True(t, ok)
|
assert.True(t, ok)
|
||||||
pointHash := crypto.Keccak256Hash(versionedHash.Bytes())
|
pointHash := crypto.Keccak256Hash(versionedHash.Bytes())
|
||||||
pointBigInt := new(big.Int).SetBytes(pointHash.Bytes())
|
pointBigInt := new(big.Int).SetBytes(pointHash.Bytes())
|
||||||
point := kzg4844.Point(new(big.Int).Mod(pointBigInt, blsModulo).Bytes())
|
pointBytes := new(big.Int).Mod(pointBigInt, blsModulo).Bytes()
|
||||||
|
start := 32 - len(pointBytes)
|
||||||
|
var point kzg4844.Point
|
||||||
|
copy(point[start:], pointBytes)
|
||||||
commitment := sideCar.Commitments[0]
|
commitment := sideCar.Commitments[0]
|
||||||
proof, claim, err := kzg4844.ComputeProof(blob, point)
|
proof, claim, err := kzg4844.ComputeProof(blob, point)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import (
|
|||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/forks"
|
"scroll-tech/common/forks"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
@@ -30,11 +30,11 @@ type BatchProposer struct {
|
|||||||
chunkOrm *orm.Chunk
|
chunkOrm *orm.Chunk
|
||||||
l2BlockOrm *orm.L2Block
|
l2BlockOrm *orm.L2Block
|
||||||
|
|
||||||
maxChunkNumPerBatch uint64
|
|
||||||
maxL1CommitGasPerBatch uint64
|
maxL1CommitGasPerBatch uint64
|
||||||
maxL1CommitCalldataSizePerBatch uint64
|
maxL1CommitCalldataSizePerBatch uint64
|
||||||
batchTimeoutSec uint64
|
batchTimeoutSec uint64
|
||||||
gasCostIncreaseMultiplier float64
|
gasCostIncreaseMultiplier float64
|
||||||
|
maxUncompressedBatchBytesSize uint64
|
||||||
forkMap map[uint64]bool
|
forkMap map[uint64]bool
|
||||||
|
|
||||||
chainCfg *params.ChainConfig
|
chainCfg *params.ChainConfig
|
||||||
@@ -49,17 +49,20 @@ type BatchProposer struct {
|
|||||||
batchChunksNum prometheus.Gauge
|
batchChunksNum prometheus.Gauge
|
||||||
batchFirstBlockTimeoutReached prometheus.Counter
|
batchFirstBlockTimeoutReached prometheus.Counter
|
||||||
batchChunksProposeNotEnoughTotal prometheus.Counter
|
batchChunksProposeNotEnoughTotal prometheus.Counter
|
||||||
|
batchEstimateGasTime prometheus.Gauge
|
||||||
|
batchEstimateCalldataSizeTime prometheus.Gauge
|
||||||
|
batchEstimateBlobSizeTime prometheus.Gauge
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBatchProposer creates a new BatchProposer instance.
|
// NewBatchProposer creates a new BatchProposer instance.
|
||||||
func NewBatchProposer(ctx context.Context, cfg *config.BatchProposerConfig, chainCfg *params.ChainConfig, db *gorm.DB, reg prometheus.Registerer) *BatchProposer {
|
func NewBatchProposer(ctx context.Context, cfg *config.BatchProposerConfig, chainCfg *params.ChainConfig, db *gorm.DB, reg prometheus.Registerer) *BatchProposer {
|
||||||
forkHeights, forkMap, _ := forks.CollectSortedForkHeights(chainCfg)
|
forkHeights, forkMap, _ := forks.CollectSortedForkHeights(chainCfg)
|
||||||
log.Debug("new batch proposer",
|
log.Debug("new batch proposer",
|
||||||
"maxChunkNumPerBatch", cfg.MaxChunkNumPerBatch,
|
|
||||||
"maxL1CommitGasPerBatch", cfg.MaxL1CommitGasPerBatch,
|
"maxL1CommitGasPerBatch", cfg.MaxL1CommitGasPerBatch,
|
||||||
"maxL1CommitCalldataSizePerBatch", cfg.MaxL1CommitCalldataSizePerBatch,
|
"maxL1CommitCalldataSizePerBatch", cfg.MaxL1CommitCalldataSizePerBatch,
|
||||||
"batchTimeoutSec", cfg.BatchTimeoutSec,
|
"batchTimeoutSec", cfg.BatchTimeoutSec,
|
||||||
"gasCostIncreaseMultiplier", cfg.GasCostIncreaseMultiplier,
|
"gasCostIncreaseMultiplier", cfg.GasCostIncreaseMultiplier,
|
||||||
|
"maxUncompressedBatchBytesSize", cfg.MaxUncompressedBatchBytesSize,
|
||||||
"forkHeights", forkHeights)
|
"forkHeights", forkHeights)
|
||||||
|
|
||||||
p := &BatchProposer{
|
p := &BatchProposer{
|
||||||
@@ -68,11 +71,11 @@ func NewBatchProposer(ctx context.Context, cfg *config.BatchProposerConfig, chai
|
|||||||
batchOrm: orm.NewBatch(db),
|
batchOrm: orm.NewBatch(db),
|
||||||
chunkOrm: orm.NewChunk(db),
|
chunkOrm: orm.NewChunk(db),
|
||||||
l2BlockOrm: orm.NewL2Block(db),
|
l2BlockOrm: orm.NewL2Block(db),
|
||||||
maxChunkNumPerBatch: cfg.MaxChunkNumPerBatch,
|
|
||||||
maxL1CommitGasPerBatch: cfg.MaxL1CommitGasPerBatch,
|
maxL1CommitGasPerBatch: cfg.MaxL1CommitGasPerBatch,
|
||||||
maxL1CommitCalldataSizePerBatch: cfg.MaxL1CommitCalldataSizePerBatch,
|
maxL1CommitCalldataSizePerBatch: cfg.MaxL1CommitCalldataSizePerBatch,
|
||||||
batchTimeoutSec: cfg.BatchTimeoutSec,
|
batchTimeoutSec: cfg.BatchTimeoutSec,
|
||||||
gasCostIncreaseMultiplier: cfg.GasCostIncreaseMultiplier,
|
gasCostIncreaseMultiplier: cfg.GasCostIncreaseMultiplier,
|
||||||
|
maxUncompressedBatchBytesSize: cfg.MaxUncompressedBatchBytesSize,
|
||||||
forkMap: forkMap,
|
forkMap: forkMap,
|
||||||
chainCfg: chainCfg,
|
chainCfg: chainCfg,
|
||||||
|
|
||||||
@@ -116,6 +119,18 @@ func NewBatchProposer(ctx context.Context, cfg *config.BatchProposerConfig, chai
|
|||||||
Name: "rollup_propose_batch_chunks_propose_not_enough_total",
|
Name: "rollup_propose_batch_chunks_propose_not_enough_total",
|
||||||
Help: "Total number of batch chunk propose not enough",
|
Help: "Total number of batch chunk propose not enough",
|
||||||
}),
|
}),
|
||||||
|
batchEstimateGasTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "rollup_propose_batch_estimate_gas_time",
|
||||||
|
Help: "Time taken to estimate gas for the chunk.",
|
||||||
|
}),
|
||||||
|
batchEstimateCalldataSizeTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "rollup_propose_batch_estimate_calldata_size_time",
|
||||||
|
Help: "Time taken to estimate calldata size for the chunk.",
|
||||||
|
}),
|
||||||
|
batchEstimateBlobSizeTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "rollup_propose_batch_estimate_blob_size_time",
|
||||||
|
Help: "Time taken to estimate blob size for the chunk.",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
return p
|
return p
|
||||||
@@ -131,9 +146,9 @@ func (p *BatchProposer) TryProposeBatch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *BatchProposer) updateDBBatchInfo(batch *encoding.Batch, codecVersion encoding.CodecVersion) error {
|
func (p *BatchProposer) updateDBBatchInfo(batch *encoding.Batch, codecVersion encoding.CodecVersion, metrics utils.BatchMetrics) error {
|
||||||
err := p.db.Transaction(func(dbTX *gorm.DB) error {
|
err := p.db.Transaction(func(dbTX *gorm.DB) error {
|
||||||
dbBatch, dbErr := p.batchOrm.InsertBatch(p.ctx, batch, codecVersion, dbTX)
|
dbBatch, dbErr := p.batchOrm.InsertBatch(p.ctx, batch, codecVersion, metrics, dbTX)
|
||||||
if dbErr != nil {
|
if dbErr != nil {
|
||||||
log.Warn("BatchProposer.updateBatchInfoInDB insert batch failure", "index", batch.Index, "parent hash", batch.ParentBatchHash.Hex(), "error", dbErr)
|
log.Warn("BatchProposer.updateBatchInfoInDB insert batch failure", "index", batch.Index, "parent hash", batch.ParentBatchHash.Hex(), "error", dbErr)
|
||||||
return dbErr
|
return dbErr
|
||||||
@@ -152,13 +167,33 @@ func (p *BatchProposer) updateDBBatchInfo(batch *encoding.Batch, codecVersion en
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *BatchProposer) proposeBatch() error {
|
func (p *BatchProposer) proposeBatch() error {
|
||||||
unbatchedChunkIndex, err := p.batchOrm.GetFirstUnbatchedChunkIndex(p.ctx)
|
firstUnbatchedChunkIndex, err := p.batchOrm.GetFirstUnbatchedChunkIndex(p.ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// select at most p.maxChunkNumPerBatch chunks
|
firstUnbatchedChunk, err := p.chunkOrm.GetChunkByIndex(p.ctx, firstUnbatchedChunkIndex)
|
||||||
dbChunks, err := p.chunkOrm.GetChunksGEIndex(p.ctx, unbatchedChunkIndex, int(p.maxChunkNumPerBatch))
|
if err != nil || firstUnbatchedChunk == nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
startBlockNum := new(big.Int).SetUint64(firstUnbatchedChunk.StartBlockNumber)
|
||||||
|
|
||||||
|
var codecVersion encoding.CodecVersion
|
||||||
|
var maxChunksThisBatch uint64
|
||||||
|
if !p.chainCfg.IsBernoulli(startBlockNum) {
|
||||||
|
codecVersion = encoding.CodecV0
|
||||||
|
maxChunksThisBatch = 15
|
||||||
|
} else if !p.chainCfg.IsCurie(startBlockNum) {
|
||||||
|
codecVersion = encoding.CodecV1
|
||||||
|
maxChunksThisBatch = 15
|
||||||
|
} else {
|
||||||
|
codecVersion = encoding.CodecV2
|
||||||
|
maxChunksThisBatch = 45
|
||||||
|
}
|
||||||
|
|
||||||
|
// select at most maxChunkNumPerBatch chunks
|
||||||
|
dbChunks, err := p.chunkOrm.GetChunksGEIndex(p.ctx, firstUnbatchedChunkIndex, int(maxChunksThisBatch))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -167,7 +202,6 @@ func (p *BatchProposer) proposeBatch() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
maxChunksThisBatch := p.maxChunkNumPerBatch
|
|
||||||
for i, chunk := range dbChunks {
|
for i, chunk := range dbChunks {
|
||||||
// if a chunk is starting at a fork boundary, only consider earlier chunks
|
// if a chunk is starting at a fork boundary, only consider earlier chunks
|
||||||
if i != 0 && p.forkMap[chunk.StartBlockNumber] {
|
if i != 0 && p.forkMap[chunk.StartBlockNumber] {
|
||||||
@@ -179,11 +213,6 @@ func (p *BatchProposer) proposeBatch() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
codecVersion := encoding.CodecV0
|
|
||||||
if p.chainCfg.IsBernoulli(new(big.Int).SetUint64(dbChunks[0].StartBlockNumber)) {
|
|
||||||
codecVersion = encoding.CodecV1
|
|
||||||
}
|
|
||||||
|
|
||||||
daChunks, err := p.getDAChunks(dbChunks)
|
daChunks, err := p.getDAChunks(dbChunks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -197,16 +226,7 @@ func (p *BatchProposer) proposeBatch() error {
|
|||||||
var batch encoding.Batch
|
var batch encoding.Batch
|
||||||
batch.Index = dbParentBatch.Index + 1
|
batch.Index = dbParentBatch.Index + 1
|
||||||
batch.ParentBatchHash = common.HexToHash(dbParentBatch.Hash)
|
batch.ParentBatchHash = common.HexToHash(dbParentBatch.Hash)
|
||||||
parentBatchEndBlockNumber := daChunks[0].Blocks[0].Header.Number.Uint64() - 1
|
batch.TotalL1MessagePoppedBefore = firstUnbatchedChunk.TotalL1MessagesPoppedBefore
|
||||||
parentBatchCodecVersion := encoding.CodecV0
|
|
||||||
// Genesis batch uses codecv0 encoding, otherwise using bernoulli fork to choose codec version.
|
|
||||||
if dbParentBatch.Index > 0 && p.chainCfg.IsBernoulli(new(big.Int).SetUint64(parentBatchEndBlockNumber)) {
|
|
||||||
parentBatchCodecVersion = encoding.CodecV1
|
|
||||||
}
|
|
||||||
batch.TotalL1MessagePoppedBefore, err = utils.GetTotalL1MessagePoppedBeforeBatch(dbParentBatch.BatchHeader, parentBatchCodecVersion)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
for i, chunk := range daChunks {
|
for i, chunk := range daChunks {
|
||||||
batch.Chunks = append(batch.Chunks, chunk)
|
batch.Chunks = append(batch.Chunks, chunk)
|
||||||
@@ -214,21 +234,28 @@ func (p *BatchProposer) proposeBatch() error {
|
|||||||
if calcErr != nil {
|
if calcErr != nil {
|
||||||
return fmt.Errorf("failed to calculate batch metrics: %w", calcErr)
|
return fmt.Errorf("failed to calculate batch metrics: %w", calcErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.recordTimerBatchMetrics(metrics)
|
||||||
|
|
||||||
totalOverEstimateL1CommitGas := uint64(p.gasCostIncreaseMultiplier * float64(metrics.L1CommitGas))
|
totalOverEstimateL1CommitGas := uint64(p.gasCostIncreaseMultiplier * float64(metrics.L1CommitGas))
|
||||||
if metrics.L1CommitCalldataSize > p.maxL1CommitCalldataSizePerBatch ||
|
if metrics.L1CommitCalldataSize > p.maxL1CommitCalldataSizePerBatch || totalOverEstimateL1CommitGas > p.maxL1CommitGasPerBatch ||
|
||||||
totalOverEstimateL1CommitGas > p.maxL1CommitGasPerBatch ||
|
metrics.L1CommitBlobSize > maxBlobSize || metrics.L1CommitUncompressedBatchBytesSize > p.maxUncompressedBatchBytesSize {
|
||||||
metrics.L1CommitBlobSize > maxBlobSize {
|
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
// The first chunk exceeds hard limits, which indicates a bug in the chunk-proposer, manual fix is needed.
|
// The first chunk exceeds hard limits, which indicates a bug in the chunk-proposer, manual fix is needed.
|
||||||
return fmt.Errorf("the first chunk exceeds limits; start block number: %v, end block number: %v, limits: %+v, maxChunkNum: %v, maxL1CommitCalldataSize: %v, maxL1CommitGas: %v, maxBlobSize: %v",
|
return fmt.Errorf("the first chunk exceeds limits; start block number: %v, end block number: %v, limits: %+v, maxChunkNum: %v, maxL1CommitCalldataSize: %v, maxL1CommitGas: %v, maxBlobSize: %v, maxUncompressedBatchBytesSize: %v",
|
||||||
dbChunks[0].StartBlockNumber, dbChunks[0].EndBlockNumber, metrics, p.maxChunkNumPerBatch, p.maxL1CommitCalldataSizePerBatch, p.maxL1CommitGasPerBatch, maxBlobSize)
|
dbChunks[0].StartBlockNumber, dbChunks[0].EndBlockNumber, metrics, maxChunksThisBatch, p.maxL1CommitCalldataSizePerBatch, p.maxL1CommitGasPerBatch, maxBlobSize, p.maxUncompressedBatchBytesSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("breaking limit condition in batching",
|
log.Debug("breaking limit condition in batching",
|
||||||
"currentL1CommitCalldataSize", metrics.L1CommitCalldataSize,
|
"l1CommitCalldataSize", metrics.L1CommitCalldataSize,
|
||||||
"maxL1CommitCalldataSizePerBatch", p.maxL1CommitCalldataSizePerBatch,
|
"maxL1CommitCalldataSize", p.maxL1CommitCalldataSizePerBatch,
|
||||||
"currentOverEstimateL1CommitGas", totalOverEstimateL1CommitGas,
|
"l1CommitGas", metrics.L1CommitGas,
|
||||||
"maxL1CommitGasPerBatch", p.maxL1CommitGasPerBatch)
|
"overEstimateL1CommitGas", totalOverEstimateL1CommitGas,
|
||||||
|
"maxL1CommitGas", p.maxL1CommitGasPerBatch,
|
||||||
|
"l1CommitBlobSize", metrics.L1CommitBlobSize,
|
||||||
|
"maxBlobSize", maxBlobSize,
|
||||||
|
"L1CommitUncompressedBatchBytesSize", metrics.L1CommitUncompressedBatchBytesSize,
|
||||||
|
"maxUncompressedBatchBytesSize", p.maxUncompressedBatchBytesSize)
|
||||||
|
|
||||||
batch.Chunks = batch.Chunks[:len(batch.Chunks)-1]
|
batch.Chunks = batch.Chunks[:len(batch.Chunks)-1]
|
||||||
|
|
||||||
@@ -237,8 +264,8 @@ func (p *BatchProposer) proposeBatch() error {
|
|||||||
return fmt.Errorf("failed to calculate batch metrics: %w", err)
|
return fmt.Errorf("failed to calculate batch metrics: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.recordBatchMetrics(metrics)
|
p.recordAllBatchMetrics(metrics)
|
||||||
return p.updateDBBatchInfo(&batch, codecVersion)
|
return p.updateDBBatchInfo(&batch, codecVersion, *metrics)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,11 +282,12 @@ func (p *BatchProposer) proposeBatch() error {
|
|||||||
"current time", currentTimeSec)
|
"current time", currentTimeSec)
|
||||||
|
|
||||||
p.batchFirstBlockTimeoutReached.Inc()
|
p.batchFirstBlockTimeoutReached.Inc()
|
||||||
p.recordBatchMetrics(metrics)
|
p.recordAllBatchMetrics(metrics)
|
||||||
return p.updateDBBatchInfo(&batch, codecVersion)
|
return p.updateDBBatchInfo(&batch, codecVersion, *metrics)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("pending chunks do not reach one of the constraints or contain a timeout block")
|
log.Debug("pending chunks do not reach one of the constraints or contain a timeout block")
|
||||||
|
p.recordTimerBatchMetrics(metrics)
|
||||||
p.batchChunksProposeNotEnoughTotal.Inc()
|
p.batchChunksProposeNotEnoughTotal.Inc()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -279,9 +307,18 @@ func (p *BatchProposer) getDAChunks(dbChunks []*orm.Chunk) ([]*encoding.Chunk, e
|
|||||||
return chunks, nil
|
return chunks, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *BatchProposer) recordBatchMetrics(metrics *utils.BatchMetrics) {
|
func (p *BatchProposer) recordAllBatchMetrics(metrics *utils.BatchMetrics) {
|
||||||
p.totalL1CommitGas.Set(float64(metrics.L1CommitGas))
|
p.totalL1CommitGas.Set(float64(metrics.L1CommitGas))
|
||||||
p.totalL1CommitCalldataSize.Set(float64(metrics.L1CommitCalldataSize))
|
p.totalL1CommitCalldataSize.Set(float64(metrics.L1CommitCalldataSize))
|
||||||
p.batchChunksNum.Set(float64(metrics.NumChunks))
|
p.batchChunksNum.Set(float64(metrics.NumChunks))
|
||||||
p.totalL1CommitBlobSize.Set(float64(metrics.L1CommitBlobSize))
|
p.totalL1CommitBlobSize.Set(float64(metrics.L1CommitBlobSize))
|
||||||
|
p.batchEstimateGasTime.Set(float64(metrics.EstimateGasTime))
|
||||||
|
p.batchEstimateCalldataSizeTime.Set(float64(metrics.EstimateCalldataSizeTime))
|
||||||
|
p.batchEstimateBlobSizeTime.Set(float64(metrics.EstimateBlobSizeTime))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *BatchProposer) recordTimerBatchMetrics(metrics *utils.BatchMetrics) {
|
||||||
|
p.batchEstimateGasTime.Set(float64(metrics.EstimateGasTime))
|
||||||
|
p.batchEstimateCalldataSizeTime.Set(float64(metrics.EstimateCalldataSizeTime))
|
||||||
|
p.batchEstimateBlobSizeTime.Set(float64(metrics.EstimateBlobSizeTime))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
@@ -13,16 +14,15 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
|
"scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testBatchProposerCodecv0Limits(t *testing.T) {
|
func testBatchProposerCodecv0Limits(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
maxChunkNum uint64
|
|
||||||
maxL1CommitGas uint64
|
maxL1CommitGas uint64
|
||||||
maxL1CommitCalldataSize uint64
|
maxL1CommitCalldataSize uint64
|
||||||
batchTimeoutSec uint64
|
batchTimeoutSec uint64
|
||||||
@@ -32,7 +32,6 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "NoLimitReached",
|
name: "NoLimitReached",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -40,7 +39,6 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Timeout",
|
name: "Timeout",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 0,
|
batchTimeoutSec: 0,
|
||||||
@@ -49,7 +47,6 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitGasPerBatchIs0",
|
name: "MaxL1CommitGasPerBatchIs0",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 0,
|
maxL1CommitGas: 0,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -57,24 +54,13 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitCalldataSizePerBatchIs0",
|
name: "MaxL1CommitCalldataSizePerBatchIs0",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 0,
|
maxL1CommitCalldataSize: 0,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
expectedBatchesLen: 0,
|
expectedBatchesLen: 0,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "MaxChunkNumPerBatchIs1",
|
|
||||||
maxChunkNum: 1,
|
|
||||||
maxL1CommitGas: 50000000000,
|
|
||||||
maxL1CommitCalldataSize: 1000000,
|
|
||||||
batchTimeoutSec: 1000000000000,
|
|
||||||
expectedBatchesLen: 1,
|
|
||||||
expectedChunksInFirstBatch: 1,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitGasPerBatchIsFirstChunk",
|
name: "MaxL1CommitGasPerBatchIsFirstChunk",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 200000,
|
maxL1CommitGas: 200000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -83,7 +69,6 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitCalldataSizePerBatchIsFirstChunk",
|
name: "MaxL1CommitCalldataSizePerBatchIsFirstChunk",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 298,
|
maxL1CommitCalldataSize: 298,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -92,7 +77,6 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ForkBlockReached",
|
name: "ForkBlockReached",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -118,7 +102,7 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
Blocks: []*encoding.Block{block},
|
Blocks: []*encoding.Block{block},
|
||||||
}
|
}
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0)
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@@ -127,7 +111,7 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk},
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
}
|
}
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
@@ -156,13 +140,13 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
assert.Equal(t, uint64(5737), chunks[1].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(5737), chunks[1].TotalL1CommitCalldataSize)
|
||||||
|
|
||||||
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: tt.maxChunkNum,
|
|
||||||
MaxL1CommitGasPerBatch: tt.maxL1CommitGas,
|
MaxL1CommitGasPerBatch: tt.maxL1CommitGas,
|
||||||
MaxL1CommitCalldataSizePerBatch: tt.maxL1CommitCalldataSize,
|
MaxL1CommitCalldataSizePerBatch: tt.maxL1CommitCalldataSize,
|
||||||
BatchTimeoutSec: tt.batchTimeoutSec,
|
BatchTimeoutSec: tt.batchTimeoutSec,
|
||||||
GasCostIncreaseMultiplier: 1.2,
|
GasCostIncreaseMultiplier: 1.2,
|
||||||
}, ¶ms.ChainConfig{
|
}, ¶ms.ChainConfig{
|
||||||
HomesteadBlock: tt.forkBlock,
|
HomesteadBlock: tt.forkBlock,
|
||||||
|
CurieBlock: big.NewInt(0),
|
||||||
}, db, nil)
|
}, db, nil)
|
||||||
bp.TryProposeBatch()
|
bp.TryProposeBatch()
|
||||||
|
|
||||||
@@ -191,7 +175,6 @@ func testBatchProposerCodecv0Limits(t *testing.T) {
|
|||||||
func testBatchProposerCodecv1Limits(t *testing.T) {
|
func testBatchProposerCodecv1Limits(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
maxChunkNum uint64
|
|
||||||
maxL1CommitGas uint64
|
maxL1CommitGas uint64
|
||||||
maxL1CommitCalldataSize uint64
|
maxL1CommitCalldataSize uint64
|
||||||
batchTimeoutSec uint64
|
batchTimeoutSec uint64
|
||||||
@@ -201,7 +184,6 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "NoLimitReached",
|
name: "NoLimitReached",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -209,7 +191,6 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Timeout",
|
name: "Timeout",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 0,
|
batchTimeoutSec: 0,
|
||||||
@@ -218,7 +199,6 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitGasPerBatchIs0",
|
name: "MaxL1CommitGasPerBatchIs0",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 0,
|
maxL1CommitGas: 0,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -226,25 +206,14 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitCalldataSizePerBatchIs0",
|
name: "MaxL1CommitCalldataSizePerBatchIs0",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 0,
|
maxL1CommitCalldataSize: 0,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
expectedBatchesLen: 0,
|
expectedBatchesLen: 0,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "MaxChunkNumPerBatchIs1",
|
|
||||||
maxChunkNum: 1,
|
|
||||||
maxL1CommitGas: 50000000000,
|
|
||||||
maxL1CommitCalldataSize: 1000000,
|
|
||||||
batchTimeoutSec: 1000000000000,
|
|
||||||
expectedBatchesLen: 1,
|
|
||||||
expectedChunksInFirstBatch: 1,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitGasPerBatchIsFirstChunk",
|
name: "MaxL1CommitGasPerBatchIsFirstChunk",
|
||||||
maxChunkNum: 10,
|
maxL1CommitGas: 190330,
|
||||||
maxL1CommitGas: 190352,
|
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
expectedBatchesLen: 1,
|
expectedBatchesLen: 1,
|
||||||
@@ -252,7 +221,6 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MaxL1CommitCalldataSizePerBatchIsFirstChunk",
|
name: "MaxL1CommitCalldataSizePerBatchIsFirstChunk",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 60,
|
maxL1CommitCalldataSize: 60,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -261,7 +229,6 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ForkBlockReached",
|
name: "ForkBlockReached",
|
||||||
maxChunkNum: 10,
|
|
||||||
maxL1CommitGas: 50000000000,
|
maxL1CommitGas: 50000000000,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
batchTimeoutSec: 1000000000000,
|
batchTimeoutSec: 1000000000000,
|
||||||
@@ -287,7 +254,7 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
Blocks: []*encoding.Block{block},
|
Blocks: []*encoding.Block{block},
|
||||||
}
|
}
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0)
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@@ -296,7 +263,7 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk},
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
}
|
}
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
@@ -320,13 +287,12 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
|
|
||||||
chunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
chunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, uint64(2084), chunks[0].TotalL1CommitGas)
|
assert.Equal(t, uint64(1124), chunks[0].TotalL1CommitGas)
|
||||||
assert.Equal(t, uint64(60), chunks[0].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(60), chunks[0].TotalL1CommitCalldataSize)
|
||||||
assert.Equal(t, uint64(2084), chunks[1].TotalL1CommitGas)
|
assert.Equal(t, uint64(1124), chunks[1].TotalL1CommitGas)
|
||||||
assert.Equal(t, uint64(60), chunks[1].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(60), chunks[1].TotalL1CommitCalldataSize)
|
||||||
|
|
||||||
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: tt.maxChunkNum,
|
|
||||||
MaxL1CommitGasPerBatch: tt.maxL1CommitGas,
|
MaxL1CommitGasPerBatch: tt.maxL1CommitGas,
|
||||||
MaxL1CommitCalldataSizePerBatch: tt.maxL1CommitCalldataSize,
|
MaxL1CommitCalldataSizePerBatch: tt.maxL1CommitCalldataSize,
|
||||||
BatchTimeoutSec: tt.batchTimeoutSec,
|
BatchTimeoutSec: tt.batchTimeoutSec,
|
||||||
@@ -359,6 +325,163 @@ func testBatchProposerCodecv1Limits(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testBatchProposerCodecv2Limits(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
maxL1CommitGas uint64
|
||||||
|
maxL1CommitCalldataSize uint64
|
||||||
|
batchTimeoutSec uint64
|
||||||
|
forkBlock *big.Int
|
||||||
|
expectedBatchesLen int
|
||||||
|
expectedChunksInFirstBatch uint64 // only be checked when expectedBatchesLen > 0
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "NoLimitReached",
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
batchTimeoutSec: 1000000000000,
|
||||||
|
expectedBatchesLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Timeout",
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
batchTimeoutSec: 0,
|
||||||
|
expectedBatchesLen: 1,
|
||||||
|
expectedChunksInFirstBatch: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitGasPerBatchIs0",
|
||||||
|
maxL1CommitGas: 0,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
batchTimeoutSec: 1000000000000,
|
||||||
|
expectedBatchesLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitCalldataSizePerBatchIs0",
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 0,
|
||||||
|
batchTimeoutSec: 1000000000000,
|
||||||
|
expectedBatchesLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitGasPerBatchIsFirstChunk",
|
||||||
|
maxL1CommitGas: 190330,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
batchTimeoutSec: 1000000000000,
|
||||||
|
expectedBatchesLen: 1,
|
||||||
|
expectedChunksInFirstBatch: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitCalldataSizePerBatchIsFirstChunk",
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 60,
|
||||||
|
batchTimeoutSec: 1000000000000,
|
||||||
|
expectedBatchesLen: 1,
|
||||||
|
expectedChunksInFirstBatch: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ForkBlockReached",
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
batchTimeoutSec: 1000000000000,
|
||||||
|
expectedBatchesLen: 1,
|
||||||
|
expectedChunksInFirstBatch: 1,
|
||||||
|
forkBlock: big.NewInt(3),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
db := setupDB(t)
|
||||||
|
defer database.CloseDB(db)
|
||||||
|
|
||||||
|
// Add genesis batch.
|
||||||
|
block := &encoding.Block{
|
||||||
|
Header: &gethTypes.Header{
|
||||||
|
Number: big.NewInt(0),
|
||||||
|
},
|
||||||
|
RowConsumption: &gethTypes.RowConsumption{},
|
||||||
|
}
|
||||||
|
chunk := &encoding.Chunk{
|
||||||
|
Blocks: []*encoding.Block{block},
|
||||||
|
}
|
||||||
|
chunkOrm := orm.NewChunk(db)
|
||||||
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
batch := &encoding.Batch{
|
||||||
|
Index: 0,
|
||||||
|
TotalL1MessagePoppedBefore: 0,
|
||||||
|
ParentBatchHash: common.Hash{},
|
||||||
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
|
}
|
||||||
|
batchOrm := orm.NewBatch(db)
|
||||||
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: 1,
|
||||||
|
MaxTxNumPerChunk: 10000,
|
||||||
|
MaxL1CommitGasPerChunk: 50000000000,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: 1000000,
|
||||||
|
MaxRowConsumptionPerChunk: 1000000,
|
||||||
|
ChunkTimeoutSec: 300,
|
||||||
|
GasCostIncreaseMultiplier: 1.2,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, ¶ms.ChainConfig{
|
||||||
|
BernoulliBlock: big.NewInt(0),
|
||||||
|
CurieBlock: big.NewInt(0),
|
||||||
|
HomesteadBlock: tt.forkBlock,
|
||||||
|
}, db, nil)
|
||||||
|
cp.TryProposeChunk() // chunk1 contains block1
|
||||||
|
cp.TryProposeChunk() // chunk2 contains block2
|
||||||
|
|
||||||
|
chunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, uint64(1124), chunks[0].TotalL1CommitGas)
|
||||||
|
assert.Equal(t, uint64(60), chunks[0].TotalL1CommitCalldataSize)
|
||||||
|
assert.Equal(t, uint64(1124), chunks[1].TotalL1CommitGas)
|
||||||
|
assert.Equal(t, uint64(60), chunks[1].TotalL1CommitCalldataSize)
|
||||||
|
|
||||||
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
|
MaxL1CommitGasPerBatch: tt.maxL1CommitGas,
|
||||||
|
MaxL1CommitCalldataSizePerBatch: tt.maxL1CommitCalldataSize,
|
||||||
|
BatchTimeoutSec: tt.batchTimeoutSec,
|
||||||
|
GasCostIncreaseMultiplier: 1.2,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, ¶ms.ChainConfig{
|
||||||
|
BernoulliBlock: big.NewInt(0),
|
||||||
|
CurieBlock: big.NewInt(0),
|
||||||
|
HomesteadBlock: tt.forkBlock,
|
||||||
|
}, db, nil)
|
||||||
|
bp.TryProposeBatch()
|
||||||
|
|
||||||
|
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, []string{}, 0)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, batches, tt.expectedBatchesLen+1)
|
||||||
|
batches = batches[1:]
|
||||||
|
if tt.expectedBatchesLen > 0 {
|
||||||
|
assert.Equal(t, uint64(1), batches[0].StartChunkIndex)
|
||||||
|
assert.Equal(t, tt.expectedChunksInFirstBatch, batches[0].EndChunkIndex)
|
||||||
|
assert.Equal(t, types.RollupPending, types.RollupStatus(batches[0].RollupStatus))
|
||||||
|
assert.Equal(t, types.ProvingTaskUnassigned, types.ProvingStatus(batches[0].ProvingStatus))
|
||||||
|
|
||||||
|
dbChunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, tt.expectedChunksInFirstBatch)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, dbChunks, int(tt.expectedChunksInFirstBatch))
|
||||||
|
for _, chunk := range dbChunks {
|
||||||
|
assert.Equal(t, batches[0].Hash, chunk.BatchHash)
|
||||||
|
assert.Equal(t, types.ProvingTaskUnassigned, types.ProvingStatus(chunk.ProvingStatus))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func testBatchCommitGasAndCalldataSizeCodecv0Estimation(t *testing.T) {
|
func testBatchCommitGasAndCalldataSizeCodecv0Estimation(t *testing.T) {
|
||||||
db := setupDB(t)
|
db := setupDB(t)
|
||||||
defer database.CloseDB(db)
|
defer database.CloseDB(db)
|
||||||
@@ -374,7 +497,7 @@ func testBatchCommitGasAndCalldataSizeCodecv0Estimation(t *testing.T) {
|
|||||||
Blocks: []*encoding.Block{block},
|
Blocks: []*encoding.Block{block},
|
||||||
}
|
}
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0)
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@@ -383,7 +506,7 @@ func testBatchCommitGasAndCalldataSizeCodecv0Estimation(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk},
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
}
|
}
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
@@ -410,7 +533,6 @@ func testBatchCommitGasAndCalldataSizeCodecv0Estimation(t *testing.T) {
|
|||||||
assert.Equal(t, uint64(5737), chunks[1].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(5737), chunks[1].TotalL1CommitCalldataSize)
|
||||||
|
|
||||||
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: 10,
|
|
||||||
MaxL1CommitGasPerBatch: 50000000000,
|
MaxL1CommitGasPerBatch: 50000000000,
|
||||||
MaxL1CommitCalldataSizePerBatch: 1000000,
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
||||||
BatchTimeoutSec: 0,
|
BatchTimeoutSec: 0,
|
||||||
@@ -454,7 +576,7 @@ func testBatchCommitGasAndCalldataSizeCodecv1Estimation(t *testing.T) {
|
|||||||
Blocks: []*encoding.Block{block},
|
Blocks: []*encoding.Block{block},
|
||||||
}
|
}
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0)
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@@ -463,7 +585,7 @@ func testBatchCommitGasAndCalldataSizeCodecv1Estimation(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk},
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
}
|
}
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
@@ -484,13 +606,12 @@ func testBatchCommitGasAndCalldataSizeCodecv1Estimation(t *testing.T) {
|
|||||||
|
|
||||||
chunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
chunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, uint64(2084), chunks[0].TotalL1CommitGas)
|
assert.Equal(t, uint64(1124), chunks[0].TotalL1CommitGas)
|
||||||
assert.Equal(t, uint64(60), chunks[0].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(60), chunks[0].TotalL1CommitCalldataSize)
|
||||||
assert.Equal(t, uint64(2084), chunks[1].TotalL1CommitGas)
|
assert.Equal(t, uint64(1124), chunks[1].TotalL1CommitGas)
|
||||||
assert.Equal(t, uint64(60), chunks[1].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(60), chunks[1].TotalL1CommitCalldataSize)
|
||||||
|
|
||||||
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: 10,
|
|
||||||
MaxL1CommitGasPerBatch: 50000000000,
|
MaxL1CommitGasPerBatch: 50000000000,
|
||||||
MaxL1CommitCalldataSizePerBatch: 1000000,
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
||||||
BatchTimeoutSec: 0,
|
BatchTimeoutSec: 0,
|
||||||
@@ -515,11 +636,11 @@ func testBatchCommitGasAndCalldataSizeCodecv1Estimation(t *testing.T) {
|
|||||||
assert.Equal(t, types.ProvingTaskUnassigned, types.ProvingStatus(chunk.ProvingStatus))
|
assert.Equal(t, types.ProvingTaskUnassigned, types.ProvingStatus(chunk.ProvingStatus))
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.Equal(t, uint64(161270), batches[0].TotalL1CommitGas)
|
assert.Equal(t, uint64(159350), batches[0].TotalL1CommitGas)
|
||||||
assert.Equal(t, uint64(120), batches[0].TotalL1CommitCalldataSize)
|
assert.Equal(t, uint64(120), batches[0].TotalL1CommitCalldataSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testBatchProposerBlobSizeLimit(t *testing.T) {
|
func testBatchCommitGasAndCalldataSizeCodecv2Estimation(t *testing.T) {
|
||||||
db := setupDB(t)
|
db := setupDB(t)
|
||||||
defer database.CloseDB(db)
|
defer database.CloseDB(db)
|
||||||
|
|
||||||
@@ -534,7 +655,7 @@ func testBatchProposerBlobSizeLimit(t *testing.T) {
|
|||||||
Blocks: []*encoding.Block{block},
|
Blocks: []*encoding.Block{block},
|
||||||
}
|
}
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV1)
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
batch := &encoding.Batch{
|
batch := &encoding.Batch{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@@ -543,51 +664,232 @@ func testBatchProposerBlobSizeLimit(t *testing.T) {
|
|||||||
Chunks: []*encoding.Chunk{chunk},
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
}
|
}
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV1)
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
MaxBlockNumPerChunk: math.MaxUint64,
|
MaxBlockNumPerChunk: 1,
|
||||||
MaxTxNumPerChunk: math.MaxUint64,
|
MaxTxNumPerChunk: 10000,
|
||||||
MaxL1CommitGasPerChunk: math.MaxUint64,
|
MaxL1CommitGasPerChunk: 50000000000,
|
||||||
MaxL1CommitCalldataSizePerChunk: math.MaxUint64,
|
MaxL1CommitCalldataSizePerChunk: 1000000,
|
||||||
MaxRowConsumptionPerChunk: math.MaxUint64,
|
MaxRowConsumptionPerChunk: 1000000,
|
||||||
ChunkTimeoutSec: math.MaxUint64,
|
ChunkTimeoutSec: 300,
|
||||||
GasCostIncreaseMultiplier: 1,
|
GasCostIncreaseMultiplier: 1.2,
|
||||||
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}, db, nil)
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0)}, db, nil)
|
||||||
|
cp.TryProposeChunk() // chunk1 contains block1
|
||||||
|
cp.TryProposeChunk() // chunk2 contains block2
|
||||||
|
|
||||||
block = readBlockFromJSON(t, "../../../testdata/blockTrace_03.json")
|
chunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
||||||
for total := int64(0); total < 7; total++ {
|
assert.NoError(t, err)
|
||||||
for i := int64(0); i < 10; i++ {
|
assert.Equal(t, uint64(1124), chunks[0].TotalL1CommitGas)
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
assert.Equal(t, uint64(60), chunks[0].TotalL1CommitCalldataSize)
|
||||||
block.Header.Number = big.NewInt(total*10 + i + 1)
|
assert.Equal(t, uint64(1124), chunks[1].TotalL1CommitGas)
|
||||||
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block})
|
assert.Equal(t, uint64(60), chunks[1].TotalL1CommitCalldataSize)
|
||||||
assert.NoError(t, err)
|
|
||||||
}
|
|
||||||
cp.TryProposeChunk()
|
|
||||||
}
|
|
||||||
|
|
||||||
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: math.MaxUint64,
|
MaxL1CommitGasPerBatch: 50000000000,
|
||||||
MaxL1CommitGasPerBatch: math.MaxUint64,
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
||||||
MaxL1CommitCalldataSizePerBatch: math.MaxUint64,
|
BatchTimeoutSec: 0,
|
||||||
BatchTimeoutSec: math.MaxUint64,
|
GasCostIncreaseMultiplier: 1.2,
|
||||||
GasCostIncreaseMultiplier: 1,
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}, db, nil)
|
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0)}, db, nil)
|
||||||
|
bp.TryProposeBatch()
|
||||||
for i := 0; i < 10; i++ {
|
|
||||||
bp.TryProposeBatch()
|
|
||||||
}
|
|
||||||
|
|
||||||
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, []string{}, 0)
|
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, []string{}, 0)
|
||||||
batches = batches[1:]
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Len(t, batches, 4)
|
assert.Len(t, batches, 2)
|
||||||
for i, batch := range batches {
|
batches = batches[1:]
|
||||||
expected := uint64(2 * (i + 1))
|
assert.Equal(t, uint64(1), batches[0].StartChunkIndex)
|
||||||
if expected > 7 {
|
assert.Equal(t, uint64(2), batches[0].EndChunkIndex)
|
||||||
expected = 7
|
assert.Equal(t, types.RollupPending, types.RollupStatus(batches[0].RollupStatus))
|
||||||
|
assert.Equal(t, types.ProvingTaskUnassigned, types.ProvingStatus(batches[0].ProvingStatus))
|
||||||
|
|
||||||
|
dbChunks, err := chunkOrm.GetChunksInRange(context.Background(), 1, 2)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, dbChunks, 2)
|
||||||
|
for _, chunk := range dbChunks {
|
||||||
|
assert.Equal(t, batches[0].Hash, chunk.BatchHash)
|
||||||
|
assert.Equal(t, types.ProvingTaskUnassigned, types.ProvingStatus(chunk.ProvingStatus))
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.Equal(t, uint64(159350), batches[0].TotalL1CommitGas)
|
||||||
|
assert.Equal(t, uint64(120), batches[0].TotalL1CommitCalldataSize)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testBatchProposerBlobSizeLimit(t *testing.T) {
|
||||||
|
compressionTests := []bool{false, true} // false for uncompressed, true for compressed
|
||||||
|
for _, compressed := range compressionTests {
|
||||||
|
db := setupDB(t)
|
||||||
|
|
||||||
|
// Add genesis batch.
|
||||||
|
block := &encoding.Block{
|
||||||
|
Header: &gethTypes.Header{
|
||||||
|
Number: big.NewInt(0),
|
||||||
|
},
|
||||||
|
RowConsumption: &gethTypes.RowConsumption{},
|
||||||
}
|
}
|
||||||
assert.Equal(t, expected, batch.EndChunkIndex)
|
chunk := &encoding.Chunk{
|
||||||
|
Blocks: []*encoding.Block{block},
|
||||||
|
}
|
||||||
|
chunkOrm := orm.NewChunk(db)
|
||||||
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
batch := &encoding.Batch{
|
||||||
|
Index: 0,
|
||||||
|
TotalL1MessagePoppedBefore: 0,
|
||||||
|
ParentBatchHash: common.Hash{},
|
||||||
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
|
}
|
||||||
|
batchOrm := orm.NewBatch(db)
|
||||||
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
var chainConfig *params.ChainConfig
|
||||||
|
if compressed {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0)}
|
||||||
|
} else {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}
|
||||||
|
}
|
||||||
|
|
||||||
|
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: math.MaxUint64,
|
||||||
|
MaxTxNumPerChunk: math.MaxUint64,
|
||||||
|
MaxL1CommitGasPerChunk: math.MaxUint64,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: math.MaxUint64,
|
||||||
|
MaxRowConsumptionPerChunk: math.MaxUint64,
|
||||||
|
ChunkTimeoutSec: 0,
|
||||||
|
GasCostIncreaseMultiplier: 1,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
blockHeight := int64(0)
|
||||||
|
block = readBlockFromJSON(t, "../../../testdata/blockTrace_03.json")
|
||||||
|
for total := int64(0); total < 20; total++ {
|
||||||
|
for i := int64(0); i < 30; i++ {
|
||||||
|
blockHeight++
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
block.Header.Number = big.NewInt(blockHeight)
|
||||||
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
}
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
}
|
||||||
|
|
||||||
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
|
MaxL1CommitGasPerBatch: math.MaxUint64,
|
||||||
|
MaxL1CommitCalldataSizePerBatch: math.MaxUint64,
|
||||||
|
BatchTimeoutSec: math.MaxUint64,
|
||||||
|
GasCostIncreaseMultiplier: 1,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
for i := 0; i < 30; i++ {
|
||||||
|
bp.TryProposeBatch()
|
||||||
|
}
|
||||||
|
|
||||||
|
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, []string{}, 0)
|
||||||
|
batches = batches[1:]
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
var expectedNumBatches int
|
||||||
|
var numChunksMultiplier uint64
|
||||||
|
if compressed {
|
||||||
|
expectedNumBatches = 1
|
||||||
|
numChunksMultiplier = 20
|
||||||
|
} else {
|
||||||
|
expectedNumBatches = 20
|
||||||
|
numChunksMultiplier = 1
|
||||||
|
}
|
||||||
|
assert.Len(t, batches, expectedNumBatches)
|
||||||
|
|
||||||
|
for i, batch := range batches {
|
||||||
|
assert.Equal(t, numChunksMultiplier*(uint64(i)+1), batch.EndChunkIndex)
|
||||||
|
}
|
||||||
|
database.CloseDB(db)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testBatchProposerMaxChunkNumPerBatchLimit(t *testing.T) {
|
||||||
|
compressionTests := []bool{false, true} // false for uncompressed, true for compressed
|
||||||
|
for _, compressed := range compressionTests {
|
||||||
|
db := setupDB(t)
|
||||||
|
|
||||||
|
// Add genesis batch.
|
||||||
|
block := &encoding.Block{
|
||||||
|
Header: &gethTypes.Header{
|
||||||
|
Number: big.NewInt(0),
|
||||||
|
},
|
||||||
|
RowConsumption: &gethTypes.RowConsumption{},
|
||||||
|
}
|
||||||
|
chunk := &encoding.Chunk{
|
||||||
|
Blocks: []*encoding.Block{block},
|
||||||
|
}
|
||||||
|
chunkOrm := orm.NewChunk(db)
|
||||||
|
_, err := chunkOrm.InsertChunk(context.Background(), chunk, encoding.CodecV0, utils.ChunkMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
batch := &encoding.Batch{
|
||||||
|
Index: 0,
|
||||||
|
TotalL1MessagePoppedBefore: 0,
|
||||||
|
ParentBatchHash: common.Hash{},
|
||||||
|
Chunks: []*encoding.Chunk{chunk},
|
||||||
|
}
|
||||||
|
batchOrm := orm.NewBatch(db)
|
||||||
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
var chainConfig *params.ChainConfig
|
||||||
|
if compressed {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0)}
|
||||||
|
} else {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}
|
||||||
|
}
|
||||||
|
|
||||||
|
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: math.MaxUint64,
|
||||||
|
MaxTxNumPerChunk: math.MaxUint64,
|
||||||
|
MaxL1CommitGasPerChunk: math.MaxUint64,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: math.MaxUint64,
|
||||||
|
MaxRowConsumptionPerChunk: math.MaxUint64,
|
||||||
|
ChunkTimeoutSec: 0,
|
||||||
|
GasCostIncreaseMultiplier: 1,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
block = readBlockFromJSON(t, "../../../testdata/blockTrace_03.json")
|
||||||
|
for blockHeight := int64(1); blockHeight <= 60; blockHeight++ {
|
||||||
|
block.Header.Number = big.NewInt(blockHeight)
|
||||||
|
err = orm.NewL2Block(db).InsertL2Blocks(context.Background(), []*encoding.Block{block})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
}
|
||||||
|
|
||||||
|
bp := NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
|
MaxL1CommitGasPerBatch: math.MaxUint64,
|
||||||
|
MaxL1CommitCalldataSizePerBatch: math.MaxUint64,
|
||||||
|
BatchTimeoutSec: math.MaxUint64,
|
||||||
|
GasCostIncreaseMultiplier: 1,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
bp.TryProposeBatch()
|
||||||
|
|
||||||
|
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, []string{}, 0)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, batches, 2)
|
||||||
|
dbBatch := batches[1]
|
||||||
|
|
||||||
|
var expectedChunkNum uint64
|
||||||
|
if compressed {
|
||||||
|
expectedChunkNum = 45
|
||||||
|
} else {
|
||||||
|
expectedChunkNum = 15
|
||||||
|
}
|
||||||
|
assert.Equal(t, expectedChunkNum, dbBatch.EndChunkIndex)
|
||||||
|
|
||||||
|
database.CloseDB(db)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,18 @@ import (
|
|||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/forks"
|
"scroll-tech/common/forks"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
"scroll-tech/rollup/internal/utils"
|
"scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxBlobSize = uint64(131072)
|
|
||||||
|
|
||||||
// ChunkProposer proposes chunks based on available unchunked blocks.
|
// ChunkProposer proposes chunks based on available unchunked blocks.
|
||||||
type ChunkProposer struct {
|
type ChunkProposer struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
@@ -36,6 +34,7 @@ type ChunkProposer struct {
|
|||||||
maxRowConsumptionPerChunk uint64
|
maxRowConsumptionPerChunk uint64
|
||||||
chunkTimeoutSec uint64
|
chunkTimeoutSec uint64
|
||||||
gasCostIncreaseMultiplier float64
|
gasCostIncreaseMultiplier float64
|
||||||
|
maxUncompressedBatchBytesSize uint64
|
||||||
forkHeights []uint64
|
forkHeights []uint64
|
||||||
|
|
||||||
chainCfg *params.ChainConfig
|
chainCfg *params.ChainConfig
|
||||||
@@ -52,6 +51,9 @@ type ChunkProposer struct {
|
|||||||
chunkBlocksNum prometheus.Gauge
|
chunkBlocksNum prometheus.Gauge
|
||||||
chunkFirstBlockTimeoutReached prometheus.Counter
|
chunkFirstBlockTimeoutReached prometheus.Counter
|
||||||
chunkBlocksProposeNotEnoughTotal prometheus.Counter
|
chunkBlocksProposeNotEnoughTotal prometheus.Counter
|
||||||
|
chunkEstimateGasTime prometheus.Gauge
|
||||||
|
chunkEstimateCalldataSizeTime prometheus.Gauge
|
||||||
|
chunkEstimateBlobSizeTime prometheus.Gauge
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewChunkProposer creates a new ChunkProposer instance.
|
// NewChunkProposer creates a new ChunkProposer instance.
|
||||||
@@ -64,6 +66,7 @@ func NewChunkProposer(ctx context.Context, cfg *config.ChunkProposerConfig, chai
|
|||||||
"maxRowConsumptionPerChunk", cfg.MaxRowConsumptionPerChunk,
|
"maxRowConsumptionPerChunk", cfg.MaxRowConsumptionPerChunk,
|
||||||
"chunkTimeoutSec", cfg.ChunkTimeoutSec,
|
"chunkTimeoutSec", cfg.ChunkTimeoutSec,
|
||||||
"gasCostIncreaseMultiplier", cfg.GasCostIncreaseMultiplier,
|
"gasCostIncreaseMultiplier", cfg.GasCostIncreaseMultiplier,
|
||||||
|
"maxUncompressedBatchBytesSize", cfg.MaxUncompressedBatchBytesSize,
|
||||||
"forkHeights", forkHeights)
|
"forkHeights", forkHeights)
|
||||||
|
|
||||||
p := &ChunkProposer{
|
p := &ChunkProposer{
|
||||||
@@ -78,6 +81,7 @@ func NewChunkProposer(ctx context.Context, cfg *config.ChunkProposerConfig, chai
|
|||||||
maxRowConsumptionPerChunk: cfg.MaxRowConsumptionPerChunk,
|
maxRowConsumptionPerChunk: cfg.MaxRowConsumptionPerChunk,
|
||||||
chunkTimeoutSec: cfg.ChunkTimeoutSec,
|
chunkTimeoutSec: cfg.ChunkTimeoutSec,
|
||||||
gasCostIncreaseMultiplier: cfg.GasCostIncreaseMultiplier,
|
gasCostIncreaseMultiplier: cfg.GasCostIncreaseMultiplier,
|
||||||
|
maxUncompressedBatchBytesSize: cfg.MaxUncompressedBatchBytesSize,
|
||||||
forkHeights: forkHeights,
|
forkHeights: forkHeights,
|
||||||
chainCfg: chainCfg,
|
chainCfg: chainCfg,
|
||||||
|
|
||||||
@@ -129,6 +133,18 @@ func NewChunkProposer(ctx context.Context, cfg *config.ChunkProposerConfig, chai
|
|||||||
Name: "rollup_propose_chunk_blocks_propose_not_enough_total",
|
Name: "rollup_propose_chunk_blocks_propose_not_enough_total",
|
||||||
Help: "Total number of chunk block propose not enough",
|
Help: "Total number of chunk block propose not enough",
|
||||||
}),
|
}),
|
||||||
|
chunkEstimateGasTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "rollup_propose_chunk_estimate_gas_time",
|
||||||
|
Help: "Time taken to estimate gas for the chunk.",
|
||||||
|
}),
|
||||||
|
chunkEstimateCalldataSizeTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "rollup_propose_chunk_estimate_calldata_size_time",
|
||||||
|
Help: "Time taken to estimate calldata size for the chunk.",
|
||||||
|
}),
|
||||||
|
chunkEstimateBlobSizeTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "rollup_propose_chunk_estimate_blob_size_time",
|
||||||
|
Help: "Time taken to estimate blob size for the chunk.",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
return p
|
return p
|
||||||
@@ -144,14 +160,14 @@ func (p *ChunkProposer) TryProposeChunk() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ChunkProposer) updateDBChunkInfo(chunk *encoding.Chunk, codecVersion encoding.CodecVersion) error {
|
func (p *ChunkProposer) updateDBChunkInfo(chunk *encoding.Chunk, codecVersion encoding.CodecVersion, metrics utils.ChunkMetrics) error {
|
||||||
if chunk == nil {
|
if chunk == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
p.proposeChunkUpdateInfoTotal.Inc()
|
p.proposeChunkUpdateInfoTotal.Inc()
|
||||||
err := p.db.Transaction(func(dbTX *gorm.DB) error {
|
err := p.db.Transaction(func(dbTX *gorm.DB) error {
|
||||||
dbChunk, err := p.chunkOrm.InsertChunk(p.ctx, chunk, codecVersion, dbTX)
|
dbChunk, err := p.chunkOrm.InsertChunk(p.ctx, chunk, codecVersion, metrics, dbTX)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("ChunkProposer.InsertChunk failed", "err", err)
|
log.Warn("ChunkProposer.InsertChunk failed", "err", err)
|
||||||
return err
|
return err
|
||||||
@@ -171,6 +187,7 @@ func (p *ChunkProposer) updateDBChunkInfo(chunk *encoding.Chunk, codecVersion en
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *ChunkProposer) proposeChunk() error {
|
func (p *ChunkProposer) proposeChunk() error {
|
||||||
|
// unchunkedBlockHeight >= 1, assuming genesis batch with chunk 0, block 0 is committed.
|
||||||
unchunkedBlockHeight, err := p.chunkOrm.GetUnchunkedBlockHeight(p.ctx)
|
unchunkedBlockHeight, err := p.chunkOrm.GetUnchunkedBlockHeight(p.ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -192,9 +209,24 @@ func (p *ChunkProposer) proposeChunk() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
codecVersion := encoding.CodecV0
|
var codecVersion encoding.CodecVersion
|
||||||
if p.chainCfg.IsBernoulli(blocks[0].Header.Number) {
|
if !p.chainCfg.IsBernoulli(blocks[0].Header.Number) {
|
||||||
|
codecVersion = encoding.CodecV0
|
||||||
|
} else if !p.chainCfg.IsCurie(blocks[0].Header.Number) {
|
||||||
codecVersion = encoding.CodecV1
|
codecVersion = encoding.CodecV1
|
||||||
|
} else {
|
||||||
|
codecVersion = encoding.CodecV2
|
||||||
|
}
|
||||||
|
|
||||||
|
// Including Curie block in a sole chunk.
|
||||||
|
if p.chainCfg.CurieBlock != nil && blocks[0].Header.Number.Cmp(p.chainCfg.CurieBlock) == 0 {
|
||||||
|
chunk := encoding.Chunk{Blocks: blocks[:1]}
|
||||||
|
metrics, calcErr := utils.CalculateChunkMetrics(&chunk, codecVersion)
|
||||||
|
if calcErr != nil {
|
||||||
|
return fmt.Errorf("failed to calculate chunk metrics: %w", calcErr)
|
||||||
|
}
|
||||||
|
p.recordTimerChunkMetrics(metrics)
|
||||||
|
return p.updateDBChunkInfo(&chunk, codecVersion, *metrics)
|
||||||
}
|
}
|
||||||
|
|
||||||
var chunk encoding.Chunk
|
var chunk encoding.Chunk
|
||||||
@@ -206,16 +238,19 @@ func (p *ChunkProposer) proposeChunk() error {
|
|||||||
return fmt.Errorf("failed to calculate chunk metrics: %w", calcErr)
|
return fmt.Errorf("failed to calculate chunk metrics: %w", calcErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.recordTimerChunkMetrics(metrics)
|
||||||
|
|
||||||
overEstimatedL1CommitGas := uint64(p.gasCostIncreaseMultiplier * float64(metrics.L1CommitGas))
|
overEstimatedL1CommitGas := uint64(p.gasCostIncreaseMultiplier * float64(metrics.L1CommitGas))
|
||||||
if metrics.TxNum > p.maxTxNumPerChunk ||
|
if metrics.TxNum > p.maxTxNumPerChunk ||
|
||||||
metrics.L1CommitCalldataSize > p.maxL1CommitCalldataSizePerChunk ||
|
metrics.L1CommitCalldataSize > p.maxL1CommitCalldataSizePerChunk ||
|
||||||
overEstimatedL1CommitGas > p.maxL1CommitGasPerChunk ||
|
overEstimatedL1CommitGas > p.maxL1CommitGasPerChunk ||
|
||||||
metrics.CrcMax > p.maxRowConsumptionPerChunk ||
|
metrics.CrcMax > p.maxRowConsumptionPerChunk ||
|
||||||
metrics.L1CommitBlobSize > maxBlobSize {
|
metrics.L1CommitBlobSize > maxBlobSize ||
|
||||||
|
metrics.L1CommitUncompressedBatchBytesSize > p.maxUncompressedBatchBytesSize {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
// The first block exceeds hard limits, which indicates a bug in the sequencer, manual fix is needed.
|
// The first block exceeds hard limits, which indicates a bug in the sequencer, manual fix is needed.
|
||||||
return fmt.Errorf("the first block exceeds limits; block number: %v, limits: %+v, maxTxNum: %v, maxL1CommitCalldataSize: %v, maxL1CommitGas: %v, maxRowConsumption: %v, maxBlobSize: %v",
|
return fmt.Errorf("the first block exceeds limits; block number: %v, limits: %+v, maxTxNum: %v, maxL1CommitCalldataSize: %v, maxL1CommitGas: %v, maxRowConsumption: %v, maxBlobSize: %v, maxUncompressedBatchBytesSize: %v",
|
||||||
block.Header.Number, metrics, p.maxTxNumPerChunk, p.maxL1CommitCalldataSizePerChunk, p.maxL1CommitGasPerChunk, p.maxRowConsumptionPerChunk, maxBlobSize)
|
block.Header.Number, metrics, p.maxTxNumPerChunk, p.maxL1CommitCalldataSizePerChunk, p.maxL1CommitGasPerChunk, p.maxRowConsumptionPerChunk, maxBlobSize, p.maxUncompressedBatchBytesSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("breaking limit condition in chunking",
|
log.Debug("breaking limit condition in chunking",
|
||||||
@@ -223,11 +258,15 @@ func (p *ChunkProposer) proposeChunk() error {
|
|||||||
"maxTxNum", p.maxTxNumPerChunk,
|
"maxTxNum", p.maxTxNumPerChunk,
|
||||||
"l1CommitCalldataSize", metrics.L1CommitCalldataSize,
|
"l1CommitCalldataSize", metrics.L1CommitCalldataSize,
|
||||||
"maxL1CommitCalldataSize", p.maxL1CommitCalldataSizePerChunk,
|
"maxL1CommitCalldataSize", p.maxL1CommitCalldataSizePerChunk,
|
||||||
|
"l1CommitGas", metrics.L1CommitGas,
|
||||||
"overEstimatedL1CommitGas", overEstimatedL1CommitGas,
|
"overEstimatedL1CommitGas", overEstimatedL1CommitGas,
|
||||||
"maxL1CommitGas", p.maxL1CommitGasPerChunk,
|
"maxL1CommitGas", p.maxL1CommitGasPerChunk,
|
||||||
"rowConsumption", metrics.CrcMax,
|
"rowConsumption", metrics.CrcMax,
|
||||||
"maxRowConsumption", p.maxRowConsumptionPerChunk,
|
"maxRowConsumption", p.maxRowConsumptionPerChunk,
|
||||||
"maxBlobSize", maxBlobSize)
|
"l1CommitBlobSize", metrics.L1CommitBlobSize,
|
||||||
|
"maxBlobSize", maxBlobSize,
|
||||||
|
"L1CommitUncompressedBatchBytesSize", metrics.L1CommitUncompressedBatchBytesSize,
|
||||||
|
"maxUncompressedBatchBytesSize", p.maxUncompressedBatchBytesSize)
|
||||||
|
|
||||||
chunk.Blocks = chunk.Blocks[:len(chunk.Blocks)-1]
|
chunk.Blocks = chunk.Blocks[:len(chunk.Blocks)-1]
|
||||||
|
|
||||||
@@ -236,8 +275,8 @@ func (p *ChunkProposer) proposeChunk() error {
|
|||||||
return fmt.Errorf("failed to calculate chunk metrics: %w", calcErr)
|
return fmt.Errorf("failed to calculate chunk metrics: %w", calcErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.recordChunkMetrics(metrics)
|
p.recordAllChunkMetrics(metrics)
|
||||||
return p.updateDBChunkInfo(&chunk, codecVersion)
|
return p.updateDBChunkInfo(&chunk, codecVersion, *metrics)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,20 +295,30 @@ func (p *ChunkProposer) proposeChunk() error {
|
|||||||
"current time", currentTimeSec)
|
"current time", currentTimeSec)
|
||||||
|
|
||||||
p.chunkFirstBlockTimeoutReached.Inc()
|
p.chunkFirstBlockTimeoutReached.Inc()
|
||||||
p.recordChunkMetrics(metrics)
|
p.recordAllChunkMetrics(metrics)
|
||||||
return p.updateDBChunkInfo(&chunk, codecVersion)
|
return p.updateDBChunkInfo(&chunk, codecVersion, *metrics)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("pending blocks do not reach one of the constraints or contain a timeout block")
|
log.Debug("pending blocks do not reach one of the constraints or contain a timeout block")
|
||||||
|
p.recordTimerChunkMetrics(metrics)
|
||||||
p.chunkBlocksProposeNotEnoughTotal.Inc()
|
p.chunkBlocksProposeNotEnoughTotal.Inc()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ChunkProposer) recordChunkMetrics(metrics *utils.ChunkMetrics) {
|
func (p *ChunkProposer) recordAllChunkMetrics(metrics *utils.ChunkMetrics) {
|
||||||
p.chunkTxNum.Set(float64(metrics.TxNum))
|
p.chunkTxNum.Set(float64(metrics.TxNum))
|
||||||
p.maxTxConsumption.Set(float64(metrics.CrcMax))
|
p.maxTxConsumption.Set(float64(metrics.CrcMax))
|
||||||
p.chunkBlocksNum.Set(float64(metrics.NumBlocks))
|
p.chunkBlocksNum.Set(float64(metrics.NumBlocks))
|
||||||
p.totalL1CommitCalldataSize.Set(float64(metrics.L1CommitCalldataSize))
|
p.totalL1CommitCalldataSize.Set(float64(metrics.L1CommitCalldataSize))
|
||||||
p.chunkEstimateL1CommitGas.Set(float64(metrics.L1CommitGas))
|
p.chunkEstimateL1CommitGas.Set(float64(metrics.L1CommitGas))
|
||||||
p.totalL1CommitBlobSize.Set(float64(metrics.L1CommitBlobSize))
|
p.totalL1CommitBlobSize.Set(float64(metrics.L1CommitBlobSize))
|
||||||
|
p.chunkEstimateGasTime.Set(float64(metrics.EstimateGasTime))
|
||||||
|
p.chunkEstimateCalldataSizeTime.Set(float64(metrics.EstimateCalldataSizeTime))
|
||||||
|
p.chunkEstimateBlobSizeTime.Set(float64(metrics.EstimateBlobSizeTime))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *ChunkProposer) recordTimerChunkMetrics(metrics *utils.ChunkMetrics) {
|
||||||
|
p.chunkEstimateGasTime.Set(float64(metrics.EstimateGasTime))
|
||||||
|
p.chunkEstimateCalldataSizeTime.Set(float64(metrics.EstimateCalldataSizeTime))
|
||||||
|
p.chunkEstimateBlobSizeTime.Set(float64(metrics.EstimateBlobSizeTime))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common/math"
|
"github.com/scroll-tech/go-ethereum/common/math"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
@@ -300,7 +300,7 @@ func testChunkProposerCodecv1Limits(t *testing.T) {
|
|||||||
name: "MaxL1CommitGasPerChunkIsFirstBlock",
|
name: "MaxL1CommitGasPerChunkIsFirstBlock",
|
||||||
maxBlockNum: 10,
|
maxBlockNum: 10,
|
||||||
maxTxNum: 10000,
|
maxTxNum: 10000,
|
||||||
maxL1CommitGas: 2522,
|
maxL1CommitGas: 2500,
|
||||||
maxL1CommitCalldataSize: 1000000,
|
maxL1CommitCalldataSize: 1000000,
|
||||||
maxRowConsumption: 1000000,
|
maxRowConsumption: 1000000,
|
||||||
chunkTimeoutSec: 1000000000000,
|
chunkTimeoutSec: 1000000000000,
|
||||||
@@ -384,14 +384,255 @@ func testChunkProposerCodecv1Limits(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func testChunkProposerCodecv1BlobSizeLimit(t *testing.T) {
|
func testChunkProposerCodecv2Limits(t *testing.T) {
|
||||||
db := setupDB(t)
|
tests := []struct {
|
||||||
defer database.CloseDB(db)
|
name string
|
||||||
|
maxBlockNum uint64
|
||||||
|
maxTxNum uint64
|
||||||
|
maxL1CommitGas uint64
|
||||||
|
maxL1CommitCalldataSize uint64
|
||||||
|
maxRowConsumption uint64
|
||||||
|
chunkTimeoutSec uint64
|
||||||
|
forkBlock *big.Int
|
||||||
|
expectedChunksLen int
|
||||||
|
expectedBlocksInFirstChunk int // only be checked when expectedChunksLen > 0
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "NoLimitReached",
|
||||||
|
maxBlockNum: 100,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Timeout",
|
||||||
|
maxBlockNum: 100,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 0,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxTxNumPerChunkIs0",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 0,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitGasPerChunkIs0",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 0,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitCalldataSizePerChunkIs0",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 0,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxRowConsumptionPerChunkIs0",
|
||||||
|
maxBlockNum: 100,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 0,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxBlockNumPerChunkIs1",
|
||||||
|
maxBlockNum: 1,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxTxNumPerChunkIsFirstBlock",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 2,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitGasPerChunkIsFirstBlock",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 2500,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxL1CommitCalldataSizePerChunkIsFirstBlock",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 60,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MaxRowConsumptionPerChunkIs1",
|
||||||
|
maxBlockNum: 10,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ForkBlockReached",
|
||||||
|
maxBlockNum: 100,
|
||||||
|
maxTxNum: 10000,
|
||||||
|
maxL1CommitGas: 50000000000,
|
||||||
|
maxL1CommitCalldataSize: 1000000,
|
||||||
|
maxRowConsumption: 1000000,
|
||||||
|
chunkTimeoutSec: 1000000000000,
|
||||||
|
expectedChunksLen: 1,
|
||||||
|
expectedBlocksInFirstChunk: 1,
|
||||||
|
forkBlock: big.NewInt(2),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
db := setupDB(t)
|
||||||
|
defer database.CloseDB(db)
|
||||||
|
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
err := l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block1, block2})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: tt.maxBlockNum,
|
||||||
|
MaxTxNumPerChunk: tt.maxTxNum,
|
||||||
|
MaxL1CommitGasPerChunk: tt.maxL1CommitGas,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: tt.maxL1CommitCalldataSize,
|
||||||
|
MaxRowConsumptionPerChunk: tt.maxRowConsumption,
|
||||||
|
ChunkTimeoutSec: tt.chunkTimeoutSec,
|
||||||
|
GasCostIncreaseMultiplier: 1.2,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0), HomesteadBlock: tt.forkBlock}, db, nil)
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
|
||||||
|
chunkOrm := orm.NewChunk(db)
|
||||||
|
chunks, err := chunkOrm.GetChunksGEIndex(context.Background(), 0, 0)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, chunks, tt.expectedChunksLen)
|
||||||
|
|
||||||
|
if len(chunks) > 0 {
|
||||||
|
blockOrm := orm.NewL2Block(db)
|
||||||
|
chunkHashes, err := blockOrm.GetChunkHashes(context.Background(), tt.expectedBlocksInFirstChunk)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, chunkHashes, tt.expectedBlocksInFirstChunk)
|
||||||
|
firstChunkHash := chunks[0].Hash
|
||||||
|
for _, chunkHash := range chunkHashes {
|
||||||
|
assert.Equal(t, firstChunkHash, chunkHash)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testChunkProposerBlobSizeLimit(t *testing.T) {
|
||||||
|
compressionTests := []bool{false, true} // false for uncompressed, true for compressed
|
||||||
|
for _, compressed := range compressionTests {
|
||||||
|
db := setupDB(t)
|
||||||
|
block := readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
||||||
|
for i := int64(0); i < 2000; i++ {
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
block.Header.Number = big.NewInt(i + 1)
|
||||||
|
err := l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var chainConfig *params.ChainConfig
|
||||||
|
if compressed {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0)}
|
||||||
|
} else {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}
|
||||||
|
}
|
||||||
|
|
||||||
|
cp := NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: math.MaxUint64,
|
||||||
|
MaxTxNumPerChunk: math.MaxUint64,
|
||||||
|
MaxL1CommitGasPerChunk: math.MaxUint64,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: math.MaxUint64,
|
||||||
|
MaxRowConsumptionPerChunk: math.MaxUint64,
|
||||||
|
ChunkTimeoutSec: math.MaxUint64,
|
||||||
|
GasCostIncreaseMultiplier: 1,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
for i := 0; i < 10; i++ {
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
}
|
||||||
|
|
||||||
|
chunkOrm := orm.NewChunk(db)
|
||||||
|
chunks, err := chunkOrm.GetChunksGEIndex(context.Background(), 0, 0)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
var expectedNumChunks int
|
||||||
|
var numBlocksMultiplier uint64
|
||||||
|
if compressed {
|
||||||
|
expectedNumChunks = 1
|
||||||
|
numBlocksMultiplier = 2000
|
||||||
|
} else {
|
||||||
|
expectedNumChunks = 4
|
||||||
|
numBlocksMultiplier = 551
|
||||||
|
}
|
||||||
|
assert.Len(t, chunks, expectedNumChunks)
|
||||||
|
|
||||||
|
for i, chunk := range chunks {
|
||||||
|
expected := numBlocksMultiplier * (uint64(i) + 1)
|
||||||
|
if expected > 2000 {
|
||||||
|
expected = 2000
|
||||||
|
}
|
||||||
|
assert.Equal(t, expected, chunk.EndBlockNumber)
|
||||||
|
}
|
||||||
|
database.CloseDB(db)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testChunkProposerIncludeCurieBlockInOneChunk(t *testing.T) {
|
||||||
|
db := setupDB(t)
|
||||||
block := readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
block := readBlockFromJSON(t, "../../../testdata/blockTrace_02.json")
|
||||||
for i := int64(0); i < 2000; i++ {
|
for i := int64(0); i < 10; i++ {
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
block.Header.Number = big.NewInt(i + 1)
|
block.Header.Number = big.NewInt(i)
|
||||||
err := l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block})
|
err := l2BlockOrm.InsertL2Blocks(context.Background(), []*encoding.Block{block})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
@@ -404,21 +645,20 @@ func testChunkProposerCodecv1BlobSizeLimit(t *testing.T) {
|
|||||||
MaxRowConsumptionPerChunk: math.MaxUint64,
|
MaxRowConsumptionPerChunk: math.MaxUint64,
|
||||||
ChunkTimeoutSec: math.MaxUint64,
|
ChunkTimeoutSec: math.MaxUint64,
|
||||||
GasCostIncreaseMultiplier: 1,
|
GasCostIncreaseMultiplier: 1,
|
||||||
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}, db, nil)
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, ¶ms.ChainConfig{BernoulliBlock: big.NewInt(1), CurieBlock: big.NewInt(2)}, db, nil)
|
||||||
|
|
||||||
for i := 0; i < 10; i++ {
|
for i := 0; i < 2; i++ {
|
||||||
cp.TryProposeChunk()
|
cp.TryProposeChunk()
|
||||||
}
|
}
|
||||||
|
|
||||||
chunkOrm := orm.NewChunk(db)
|
chunkOrm := orm.NewChunk(db)
|
||||||
chunks, err := chunkOrm.GetChunksGEIndex(context.Background(), 0, 0)
|
chunks, err := chunkOrm.GetChunksGEIndex(context.Background(), 0, 0)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Len(t, chunks, 4)
|
|
||||||
|
assert.Len(t, chunks, 2)
|
||||||
for i, chunk := range chunks {
|
for i, chunk := range chunks {
|
||||||
expected := uint64(551 * (i + 1))
|
assert.Equal(t, uint64(i+1), chunk.EndBlockNumber)
|
||||||
if expected > 2000 {
|
|
||||||
expected = 2000
|
|
||||||
}
|
|
||||||
assert.Equal(t, expected, chunk.EndBlockNumber)
|
|
||||||
}
|
}
|
||||||
|
database.CloseDB(db)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
package watcher
|
package watcher
|
||||||
|
|
||||||
const contractEventsBlocksFetchLimit = int64(10)
|
const contractEventsBlocksFetchLimit = int64(10)
|
||||||
|
|
||||||
|
const maxBlobSize = uint64(131072)
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
"github.com/scroll-tech/go-ethereum/common/hexutil"
|
"github.com/scroll-tech/go-ethereum/common/hexutil"
|
||||||
@@ -16,9 +18,6 @@ import (
|
|||||||
"github.com/scroll-tech/go-ethereum/rpc"
|
"github.com/scroll-tech/go-ethereum/rpc"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
|
|
||||||
bridgeAbi "scroll-tech/rollup/abi"
|
bridgeAbi "scroll-tech/rollup/abi"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/ethclient"
|
"github.com/scroll-tech/go-ethereum/ethclient"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -12,7 +13,6 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/testcontainers"
|
"scroll-tech/common/testcontainers"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/database/migrate"
|
"scroll-tech/database/migrate"
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
@@ -107,14 +107,19 @@ func TestFunction(t *testing.T) {
|
|||||||
// Run chunk proposer test cases.
|
// Run chunk proposer test cases.
|
||||||
t.Run("TestChunkProposerCodecv0Limits", testChunkProposerCodecv0Limits)
|
t.Run("TestChunkProposerCodecv0Limits", testChunkProposerCodecv0Limits)
|
||||||
t.Run("TestChunkProposerCodecv1Limits", testChunkProposerCodecv1Limits)
|
t.Run("TestChunkProposerCodecv1Limits", testChunkProposerCodecv1Limits)
|
||||||
t.Run("TestChunkProposerCodecv1BlobSizeLimit", testChunkProposerCodecv1BlobSizeLimit)
|
t.Run("TestChunkProposerCodecv2Limits", testChunkProposerCodecv2Limits)
|
||||||
|
t.Run("TestChunkProposerBlobSizeLimit", testChunkProposerBlobSizeLimit)
|
||||||
|
t.Run("TestChunkProposerIncludeCurieBlockInOneChunk", testChunkProposerIncludeCurieBlockInOneChunk)
|
||||||
|
|
||||||
// Run batch proposer test cases.
|
// Run batch proposer test cases.
|
||||||
t.Run("TestBatchProposerCodecv0Limits", testBatchProposerCodecv0Limits)
|
t.Run("TestBatchProposerCodecv0Limits", testBatchProposerCodecv0Limits)
|
||||||
t.Run("TestBatchProposerCodecv1Limits", testBatchProposerCodecv1Limits)
|
t.Run("TestBatchProposerCodecv1Limits", testBatchProposerCodecv1Limits)
|
||||||
|
t.Run("TestBatchProposerCodecv2Limits", testBatchProposerCodecv2Limits)
|
||||||
t.Run("TestBatchCommitGasAndCalldataSizeCodecv0Estimation", testBatchCommitGasAndCalldataSizeCodecv0Estimation)
|
t.Run("TestBatchCommitGasAndCalldataSizeCodecv0Estimation", testBatchCommitGasAndCalldataSizeCodecv0Estimation)
|
||||||
t.Run("TestBatchCommitGasAndCalldataSizeCodecv1Estimation", testBatchCommitGasAndCalldataSizeCodecv1Estimation)
|
t.Run("TestBatchCommitGasAndCalldataSizeCodecv1Estimation", testBatchCommitGasAndCalldataSizeCodecv1Estimation)
|
||||||
|
t.Run("TestBatchCommitGasAndCalldataSizeCodecv2Estimation", testBatchCommitGasAndCalldataSizeCodecv2Estimation)
|
||||||
t.Run("TestBatchProposerBlobSizeLimit", testBatchProposerBlobSizeLimit)
|
t.Run("TestBatchProposerBlobSizeLimit", testBatchProposerBlobSizeLimit)
|
||||||
|
t.Run("TestBatchProposerMaxChunkNumPerBatchLimit", testBatchProposerMaxChunkNumPerBatchLimit)
|
||||||
}
|
}
|
||||||
|
|
||||||
func readBlockFromJSON(t *testing.T, filename string) *encoding.Block {
|
func readBlockFromJSON(t *testing.T, filename string) *encoding.Block {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
"scroll-tech/common/utils"
|
"scroll-tech/common/utils"
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ func (o *Batch) GetBatchByIndex(ctx context.Context, index uint64) (*Batch, erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
// InsertBatch inserts a new batch into the database.
|
// InsertBatch inserts a new batch into the database.
|
||||||
func (o *Batch) InsertBatch(ctx context.Context, batch *encoding.Batch, codecVersion encoding.CodecVersion, dbTX ...*gorm.DB) (*Batch, error) {
|
func (o *Batch) InsertBatch(ctx context.Context, batch *encoding.Batch, codecVersion encoding.CodecVersion, metrics rutils.BatchMetrics, dbTX ...*gorm.DB) (*Batch, error) {
|
||||||
if batch == nil {
|
if batch == nil {
|
||||||
return nil, errors.New("invalid args: batch is nil")
|
return nil, errors.New("invalid args: batch is nil")
|
||||||
}
|
}
|
||||||
@@ -234,13 +234,6 @@ func (o *Batch) InsertBatch(ctx context.Context, batch *encoding.Batch, codecVer
|
|||||||
return nil, errors.New("invalid args: batch contains 0 chunk")
|
return nil, errors.New("invalid args: batch contains 0 chunk")
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics, err := rutils.CalculateBatchMetrics(batch, codecVersion)
|
|
||||||
if err != nil {
|
|
||||||
log.Error("failed to calculate batch metrics",
|
|
||||||
"index", batch.Index, "total l1 message popped before", batch.TotalL1MessagePoppedBefore,
|
|
||||||
"parent hash", batch.ParentBatchHash, "number of chunks", numChunks, "err", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
var startChunkIndex uint64
|
var startChunkIndex uint64
|
||||||
if batch.Index > 0 {
|
if batch.Index > 0 {
|
||||||
parentBatch, getErr := o.GetBatchByIndex(ctx, batch.Index-1)
|
parentBatch, getErr := o.GetBatchByIndex(ctx, batch.Index-1)
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/utils"
|
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
|
"scroll-tech/common/types"
|
||||||
|
|
||||||
|
"scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Chunk represents a chunk of blocks in the database.
|
// Chunk represents a chunk of blocks in the database.
|
||||||
@@ -144,6 +144,22 @@ func (o *Chunk) GetChunksGEIndex(ctx context.Context, index uint64, limit int) (
|
|||||||
return chunks, nil
|
return chunks, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetChunkByIndex retrieves a chunk that has the exact chunk index as given.
|
||||||
|
func (o *Chunk) GetChunkByIndex(ctx context.Context, index uint64) (*Chunk, error) {
|
||||||
|
db := o.db.WithContext(ctx)
|
||||||
|
db = db.Model(&Chunk{})
|
||||||
|
db = db.Where("index = ?", index)
|
||||||
|
|
||||||
|
var chunk Chunk
|
||||||
|
if err := db.First(&chunk).Error; err != nil {
|
||||||
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("Chunk.GetChunkByIndex error: %w", err)
|
||||||
|
}
|
||||||
|
return &chunk, nil
|
||||||
|
}
|
||||||
|
|
||||||
// GetChunksByBatchHash retrieves chunks by batch hash
|
// GetChunksByBatchHash retrieves chunks by batch hash
|
||||||
// for test
|
// for test
|
||||||
func (o *Chunk) GetChunksByBatchHash(ctx context.Context, batchHash string) ([]*Chunk, error) {
|
func (o *Chunk) GetChunksByBatchHash(ctx context.Context, batchHash string) ([]*Chunk, error) {
|
||||||
@@ -159,7 +175,7 @@ func (o *Chunk) GetChunksByBatchHash(ctx context.Context, batchHash string) ([]*
|
|||||||
}
|
}
|
||||||
|
|
||||||
// InsertChunk inserts a new chunk into the database.
|
// InsertChunk inserts a new chunk into the database.
|
||||||
func (o *Chunk) InsertChunk(ctx context.Context, chunk *encoding.Chunk, codecVersion encoding.CodecVersion, dbTX ...*gorm.DB) (*Chunk, error) {
|
func (o *Chunk) InsertChunk(ctx context.Context, chunk *encoding.Chunk, codecVersion encoding.CodecVersion, metrics utils.ChunkMetrics, dbTX ...*gorm.DB) (*Chunk, error) {
|
||||||
if chunk == nil || len(chunk.Blocks) == 0 {
|
if chunk == nil || len(chunk.Blocks) == 0 {
|
||||||
return nil, errors.New("invalid args")
|
return nil, errors.New("invalid args")
|
||||||
}
|
}
|
||||||
@@ -184,12 +200,6 @@ func (o *Chunk) InsertChunk(ctx context.Context, chunk *encoding.Chunk, codecVer
|
|||||||
parentChunkStateRoot = parentChunk.StateRoot
|
parentChunkStateRoot = parentChunk.StateRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics, err := utils.CalculateChunkMetrics(chunk, codecVersion)
|
|
||||||
if err != nil {
|
|
||||||
log.Error("failed to calculate chunk metrics", "err", err)
|
|
||||||
return nil, fmt.Errorf("Chunk.InsertChunk error: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
chunkHash, err := utils.GetChunkHash(chunk, totalL1MessagePoppedBefore, codecVersion)
|
chunkHash, err := utils.GetChunkHash(chunk, totalL1MessagePoppedBefore, codecVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("failed to get chunk hash", "err", err)
|
log.Error("failed to get chunk hash", "err", err)
|
||||||
|
|||||||
@@ -6,12 +6,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// L2Block represents a l2 block in the database.
|
// L2Block represents a l2 block in the database.
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv1"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -14,10 +17,9 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/testcontainers"
|
"scroll-tech/common/testcontainers"
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
"scroll-tech/common/types/encoding/codecv1"
|
|
||||||
"scroll-tech/database/migrate"
|
"scroll-tech/database/migrate"
|
||||||
|
|
||||||
|
"scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -194,11 +196,11 @@ func TestChunkOrm(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
dbChunk1, err := chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion)
|
dbChunk1, err := chunkOrm.InsertChunk(context.Background(), chunk1, codecVersion, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, dbChunk1.Hash, chunkHash1.Hex())
|
assert.Equal(t, dbChunk1.Hash, chunkHash1.Hex())
|
||||||
|
|
||||||
dbChunk2, err := chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion)
|
dbChunk2, err := chunkOrm.InsertChunk(context.Background(), chunk2, codecVersion, utils.ChunkMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, dbChunk2.Hash, chunkHash2.Hex())
|
assert.Equal(t, dbChunk2.Hash, chunkHash2.Hex())
|
||||||
|
|
||||||
@@ -250,7 +252,7 @@ func TestBatchOrm(t *testing.T) {
|
|||||||
ParentBatchHash: common.Hash{},
|
ParentBatchHash: common.Hash{},
|
||||||
Chunks: []*encoding.Chunk{chunk1},
|
Chunks: []*encoding.Chunk{chunk1},
|
||||||
}
|
}
|
||||||
batch1, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion)
|
batch1, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
hash1 := batch1.Hash
|
hash1 := batch1.Hash
|
||||||
|
|
||||||
@@ -275,7 +277,7 @@ func TestBatchOrm(t *testing.T) {
|
|||||||
ParentBatchHash: common.Hash{},
|
ParentBatchHash: common.Hash{},
|
||||||
Chunks: []*encoding.Chunk{chunk2},
|
Chunks: []*encoding.Chunk{chunk2},
|
||||||
}
|
}
|
||||||
batch2, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion)
|
batch2, err := batchOrm.InsertBatch(context.Background(), batch, codecVersion, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
hash2 := batch2.Hash
|
hash2 := batch2.Hash
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,17 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv1"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv2"
|
||||||
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
"github.com/scroll-tech/go-ethereum/accounts/abi"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
"github.com/scroll-tech/go-ethereum/core/types"
|
"github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/crypto"
|
"github.com/scroll-tech/go-ethereum/crypto"
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
"scroll-tech/common/types/encoding/codecv1"
|
|
||||||
|
|
||||||
bridgeAbi "scroll-tech/rollup/abi"
|
bridgeAbi "scroll-tech/rollup/abi"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -81,6 +82,14 @@ type ChunkMetrics struct {
|
|||||||
|
|
||||||
// codecv1 metrics, default 0 for codecv0
|
// codecv1 metrics, default 0 for codecv0
|
||||||
L1CommitBlobSize uint64
|
L1CommitBlobSize uint64
|
||||||
|
|
||||||
|
// codecv2 metrics, default 0 for codecv0 & codecv1
|
||||||
|
L1CommitUncompressedBatchBytesSize uint64
|
||||||
|
|
||||||
|
// timing metrics
|
||||||
|
EstimateGasTime time.Duration
|
||||||
|
EstimateCalldataSizeTime time.Duration
|
||||||
|
EstimateBlobSizeTime time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// CalculateChunkMetrics calculates chunk metrics.
|
// CalculateChunkMetrics calculates chunk metrics.
|
||||||
@@ -97,21 +106,50 @@ func CalculateChunkMetrics(chunk *encoding.Chunk, codecVersion encoding.CodecVer
|
|||||||
}
|
}
|
||||||
switch codecVersion {
|
switch codecVersion {
|
||||||
case encoding.CodecV0:
|
case encoding.CodecV0:
|
||||||
metrics.L1CommitCalldataSize, err = codecv0.EstimateChunkL1CommitCalldataSize(chunk)
|
start := time.Now()
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to estimate chunk L1 commit calldata size: %w", err)
|
|
||||||
}
|
|
||||||
metrics.L1CommitGas, err = codecv0.EstimateChunkL1CommitGas(chunk)
|
metrics.L1CommitGas, err = codecv0.EstimateChunkL1CommitGas(chunk)
|
||||||
|
metrics.EstimateGasTime = time.Since(start)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to estimate chunk L1 commit gas: %w", err)
|
return nil, fmt.Errorf("failed to estimate codecv0 chunk L1 commit gas: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
|
metrics.L1CommitCalldataSize, err = codecv0.EstimateChunkL1CommitCalldataSize(chunk)
|
||||||
|
metrics.EstimateCalldataSizeTime = time.Since(start)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to estimate codecv0 chunk L1 commit calldata size: %w", err)
|
||||||
}
|
}
|
||||||
return metrics, nil
|
return metrics, nil
|
||||||
case encoding.CodecV1:
|
case encoding.CodecV1:
|
||||||
|
start := time.Now()
|
||||||
metrics.L1CommitGas = codecv1.EstimateChunkL1CommitGas(chunk)
|
metrics.L1CommitGas = codecv1.EstimateChunkL1CommitGas(chunk)
|
||||||
|
metrics.EstimateGasTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
metrics.L1CommitCalldataSize = codecv1.EstimateChunkL1CommitCalldataSize(chunk)
|
metrics.L1CommitCalldataSize = codecv1.EstimateChunkL1CommitCalldataSize(chunk)
|
||||||
|
metrics.EstimateCalldataSizeTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
metrics.L1CommitBlobSize, err = codecv1.EstimateChunkL1CommitBlobSize(chunk)
|
metrics.L1CommitBlobSize, err = codecv1.EstimateChunkL1CommitBlobSize(chunk)
|
||||||
|
metrics.EstimateBlobSizeTime = time.Since(start)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to estimate chunk L1 commit blob size: %w", err)
|
return nil, fmt.Errorf("failed to estimate codecv1 chunk L1 commit blob size: %w", err)
|
||||||
|
}
|
||||||
|
return metrics, nil
|
||||||
|
case encoding.CodecV2:
|
||||||
|
start := time.Now()
|
||||||
|
metrics.L1CommitGas = codecv2.EstimateChunkL1CommitGas(chunk)
|
||||||
|
metrics.EstimateGasTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
|
metrics.L1CommitCalldataSize = codecv2.EstimateChunkL1CommitCalldataSize(chunk)
|
||||||
|
metrics.EstimateCalldataSizeTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
|
metrics.L1CommitUncompressedBatchBytesSize, metrics.L1CommitBlobSize, err = codecv2.EstimateChunkL1CommitBatchSizeAndBlobSize(chunk)
|
||||||
|
metrics.EstimateBlobSizeTime = time.Since(start)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to estimate codecv2 chunk L1 commit blob size: %w", err)
|
||||||
}
|
}
|
||||||
return metrics, nil
|
return metrics, nil
|
||||||
default:
|
default:
|
||||||
@@ -130,6 +168,14 @@ type BatchMetrics struct {
|
|||||||
|
|
||||||
// codecv1 metrics, default 0 for codecv0
|
// codecv1 metrics, default 0 for codecv0
|
||||||
L1CommitBlobSize uint64
|
L1CommitBlobSize uint64
|
||||||
|
|
||||||
|
// codecv2 metrics, default 0 for codecv0 & codecv1
|
||||||
|
L1CommitUncompressedBatchBytesSize uint64
|
||||||
|
|
||||||
|
// timing metrics
|
||||||
|
EstimateGasTime time.Duration
|
||||||
|
EstimateCalldataSizeTime time.Duration
|
||||||
|
EstimateBlobSizeTime time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// CalculateBatchMetrics calculates batch metrics.
|
// CalculateBatchMetrics calculates batch metrics.
|
||||||
@@ -141,21 +187,49 @@ func CalculateBatchMetrics(batch *encoding.Batch, codecVersion encoding.CodecVer
|
|||||||
}
|
}
|
||||||
switch codecVersion {
|
switch codecVersion {
|
||||||
case encoding.CodecV0:
|
case encoding.CodecV0:
|
||||||
|
start := time.Now()
|
||||||
metrics.L1CommitGas, err = codecv0.EstimateBatchL1CommitGas(batch)
|
metrics.L1CommitGas, err = codecv0.EstimateBatchL1CommitGas(batch)
|
||||||
|
metrics.EstimateGasTime = time.Since(start)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to estimate batch L1 commit gas: %w", err)
|
return nil, fmt.Errorf("failed to estimate codecv0 batch L1 commit gas: %w", err)
|
||||||
}
|
}
|
||||||
|
start = time.Now()
|
||||||
metrics.L1CommitCalldataSize, err = codecv0.EstimateBatchL1CommitCalldataSize(batch)
|
metrics.L1CommitCalldataSize, err = codecv0.EstimateBatchL1CommitCalldataSize(batch)
|
||||||
|
metrics.EstimateCalldataSizeTime = time.Since(start)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to estimate batch L1 commit calldata size: %w", err)
|
return nil, fmt.Errorf("failed to estimate codecv0 batch L1 commit calldata size: %w", err)
|
||||||
}
|
}
|
||||||
return metrics, nil
|
return metrics, nil
|
||||||
case encoding.CodecV1:
|
case encoding.CodecV1:
|
||||||
|
start := time.Now()
|
||||||
metrics.L1CommitGas = codecv1.EstimateBatchL1CommitGas(batch)
|
metrics.L1CommitGas = codecv1.EstimateBatchL1CommitGas(batch)
|
||||||
|
metrics.EstimateGasTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
metrics.L1CommitCalldataSize = codecv1.EstimateBatchL1CommitCalldataSize(batch)
|
metrics.L1CommitCalldataSize = codecv1.EstimateBatchL1CommitCalldataSize(batch)
|
||||||
|
metrics.EstimateCalldataSizeTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
metrics.L1CommitBlobSize, err = codecv1.EstimateBatchL1CommitBlobSize(batch)
|
metrics.L1CommitBlobSize, err = codecv1.EstimateBatchL1CommitBlobSize(batch)
|
||||||
|
metrics.EstimateBlobSizeTime = time.Since(start)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to estimate chunk L1 commit blob size: %w", err)
|
return nil, fmt.Errorf("failed to estimate codecv1 batch L1 commit blob size: %w", err)
|
||||||
|
}
|
||||||
|
return metrics, nil
|
||||||
|
case encoding.CodecV2:
|
||||||
|
start := time.Now()
|
||||||
|
metrics.L1CommitGas = codecv2.EstimateBatchL1CommitGas(batch)
|
||||||
|
metrics.EstimateGasTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
|
metrics.L1CommitCalldataSize = codecv2.EstimateBatchL1CommitCalldataSize(batch)
|
||||||
|
metrics.EstimateCalldataSizeTime = time.Since(start)
|
||||||
|
|
||||||
|
start = time.Now()
|
||||||
|
metrics.L1CommitUncompressedBatchBytesSize, metrics.L1CommitBlobSize, err = codecv2.EstimateBatchL1CommitBatchSizeAndBlobSize(batch)
|
||||||
|
metrics.EstimateBlobSizeTime = time.Since(start)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to estimate codecv2 batch L1 commit blob size: %w", err)
|
||||||
}
|
}
|
||||||
return metrics, nil
|
return metrics, nil
|
||||||
default:
|
default:
|
||||||
@@ -186,6 +260,16 @@ func GetChunkHash(chunk *encoding.Chunk, totalL1MessagePoppedBefore uint64, code
|
|||||||
return common.Hash{}, fmt.Errorf("failed to get codecv1 DA chunk hash: %w", err)
|
return common.Hash{}, fmt.Errorf("failed to get codecv1 DA chunk hash: %w", err)
|
||||||
}
|
}
|
||||||
return chunkHash, nil
|
return chunkHash, nil
|
||||||
|
case encoding.CodecV2:
|
||||||
|
daChunk, err := codecv2.NewDAChunk(chunk, totalL1MessagePoppedBefore)
|
||||||
|
if err != nil {
|
||||||
|
return common.Hash{}, fmt.Errorf("failed to create codecv2 DA chunk: %w", err)
|
||||||
|
}
|
||||||
|
chunkHash, err := daChunk.Hash()
|
||||||
|
if err != nil {
|
||||||
|
return common.Hash{}, fmt.Errorf("failed to get codecv2 DA chunk hash: %w", err)
|
||||||
|
}
|
||||||
|
return chunkHash, nil
|
||||||
default:
|
default:
|
||||||
return common.Hash{}, fmt.Errorf("unsupported codec version: %v", codecVersion)
|
return common.Hash{}, fmt.Errorf("unsupported codec version: %v", codecVersion)
|
||||||
}
|
}
|
||||||
@@ -281,27 +365,45 @@ func GetBatchMetadata(batch *encoding.Batch, codecVersion encoding.CodecVersion)
|
|||||||
return nil, fmt.Errorf("failed to get codecv1 end DA chunk hash: %w", err)
|
return nil, fmt.Errorf("failed to get codecv1 end DA chunk hash: %w", err)
|
||||||
}
|
}
|
||||||
return batchMeta, nil
|
return batchMeta, nil
|
||||||
|
case encoding.CodecV2:
|
||||||
|
daBatch, err := codecv2.NewDABatch(batch)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to create codecv2 DA batch: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
blobDataProof, err := daBatch.BlobDataProof()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to get codecv2 blob data proof: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
batchMeta := &BatchMetadata{
|
||||||
|
BatchHash: daBatch.Hash(),
|
||||||
|
BatchDataHash: daBatch.DataHash,
|
||||||
|
BatchBlobDataProof: blobDataProof,
|
||||||
|
BatchBytes: daBatch.Encode(),
|
||||||
|
}
|
||||||
|
|
||||||
|
startDAChunk, err := codecv2.NewDAChunk(batch.Chunks[0], batch.TotalL1MessagePoppedBefore)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to create codecv2 start DA chunk: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
batchMeta.StartChunkHash, err = startDAChunk.Hash()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to get codecv2 start DA chunk hash: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
endDAChunk, err := codecv2.NewDAChunk(batch.Chunks[numChunks-1], totalL1MessagePoppedBeforeEndDAChunk)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to create codecv2 end DA chunk: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
batchMeta.EndChunkHash, err = endDAChunk.Hash()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to get codecv2 end DA chunk hash: %w", err)
|
||||||
|
}
|
||||||
|
return batchMeta, nil
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unsupported codec version: %v", codecVersion)
|
return nil, fmt.Errorf("unsupported codec version: %v", codecVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTotalL1MessagePoppedBeforeBatch retrieves the total L1 messages popped before the batch.
|
|
||||||
func GetTotalL1MessagePoppedBeforeBatch(parentBatchBytes []byte, codecVersion encoding.CodecVersion) (uint64, error) {
|
|
||||||
switch codecVersion {
|
|
||||||
case encoding.CodecV0:
|
|
||||||
parentDABatch, err := codecv0.NewDABatchFromBytes(parentBatchBytes)
|
|
||||||
if err != nil {
|
|
||||||
return 0, fmt.Errorf("failed to create parent DA batch from bytes using codecv0, err: %w", err)
|
|
||||||
}
|
|
||||||
return parentDABatch.TotalL1MessagePopped, nil
|
|
||||||
case encoding.CodecV1:
|
|
||||||
parentDABatch, err := codecv1.NewDABatchFromBytes(parentBatchBytes)
|
|
||||||
if err != nil {
|
|
||||||
return 0, fmt.Errorf("failed to create parent DA batch from bytes using codecv1, err: %w", err)
|
|
||||||
}
|
|
||||||
return parentDABatch.TotalL1MessagePopped, nil
|
|
||||||
default:
|
|
||||||
return 0, fmt.Errorf("unsupported codec version: %v", codecVersion)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ contract MockBridge {
|
|||||||
_totalL1MessagesPoppedOverall := add(_totalL1MessagesPoppedOverall, _totalL1MessagesPoppedInBatch)
|
_totalL1MessagesPoppedOverall := add(_totalL1MessagesPoppedOverall, _totalL1MessagesPoppedInBatch)
|
||||||
}
|
}
|
||||||
// store entries, the order matters
|
// store entries, the order matters
|
||||||
BatchHeaderV0Codec.storeVersion(batchPtr, 0);
|
BatchHeaderV0Codec.storeVersion(batchPtr, _version);
|
||||||
BatchHeaderV0Codec.storeBatchIndex(batchPtr, _batchIndex);
|
BatchHeaderV0Codec.storeBatchIndex(batchPtr, _batchIndex);
|
||||||
BatchHeaderV0Codec.storeL1MessagePopped(batchPtr, _totalL1MessagesPoppedInBatch);
|
BatchHeaderV0Codec.storeL1MessagePopped(batchPtr, _totalL1MessagesPoppedInBatch);
|
||||||
BatchHeaderV0Codec.storeTotalL1MessagePopped(batchPtr, _totalL1MessagesPoppedOverall);
|
BatchHeaderV0Codec.storeTotalL1MessagePopped(batchPtr, _totalL1MessagesPoppedOverall);
|
||||||
@@ -177,7 +177,7 @@ contract MockBridge {
|
|||||||
batchPtr,
|
batchPtr,
|
||||||
BatchHeaderV0Codec.BATCH_HEADER_FIXED_LENGTH
|
BatchHeaderV0Codec.BATCH_HEADER_FIXED_LENGTH
|
||||||
);
|
);
|
||||||
} else if (_version == 1) {
|
} else {
|
||||||
bytes32 blobVersionedHash;
|
bytes32 blobVersionedHash;
|
||||||
(blobVersionedHash, _dataHash, _totalL1MessagesPoppedInBatch) = _commitChunksV1(
|
(blobVersionedHash, _dataHash, _totalL1MessagesPoppedInBatch) = _commitChunksV1(
|
||||||
_totalL1MessagesPoppedOverall,
|
_totalL1MessagesPoppedOverall,
|
||||||
@@ -188,7 +188,7 @@ contract MockBridge {
|
|||||||
_totalL1MessagesPoppedOverall := add(_totalL1MessagesPoppedOverall, _totalL1MessagesPoppedInBatch)
|
_totalL1MessagesPoppedOverall := add(_totalL1MessagesPoppedOverall, _totalL1MessagesPoppedInBatch)
|
||||||
}
|
}
|
||||||
// store entries, the order matters
|
// store entries, the order matters
|
||||||
BatchHeaderV1Codec.storeVersion(batchPtr, 1);
|
BatchHeaderV1Codec.storeVersion(batchPtr, _version);
|
||||||
BatchHeaderV1Codec.storeBatchIndex(batchPtr, _batchIndex);
|
BatchHeaderV1Codec.storeBatchIndex(batchPtr, _batchIndex);
|
||||||
BatchHeaderV1Codec.storeL1MessagePopped(batchPtr, _totalL1MessagesPoppedInBatch);
|
BatchHeaderV1Codec.storeL1MessagePopped(batchPtr, _totalL1MessagesPoppedInBatch);
|
||||||
BatchHeaderV1Codec.storeTotalL1MessagePopped(batchPtr, _totalL1MessagesPoppedOverall);
|
BatchHeaderV1Codec.storeTotalL1MessagePopped(batchPtr, _totalL1MessagesPoppedOverall);
|
||||||
@@ -200,8 +200,6 @@ contract MockBridge {
|
|||||||
batchPtr,
|
batchPtr,
|
||||||
BatchHeaderV1Codec.BATCH_HEADER_FIXED_LENGTH
|
BatchHeaderV1Codec.BATCH_HEADER_FIXED_LENGTH
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
revert ErrorInvalidBatchHeaderVersion();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
committedBatches[_batchIndex] = _batchHash;
|
committedBatches[_batchIndex] = _batchHash;
|
||||||
@@ -432,12 +430,10 @@ contract MockBridge {
|
|||||||
(batchPtr, _length) = BatchHeaderV0Codec.loadAndValidate(_batchHeader);
|
(batchPtr, _length) = BatchHeaderV0Codec.loadAndValidate(_batchHeader);
|
||||||
_batchHash = BatchHeaderV0Codec.computeBatchHash(batchPtr, _length);
|
_batchHash = BatchHeaderV0Codec.computeBatchHash(batchPtr, _length);
|
||||||
_batchIndex = BatchHeaderV0Codec.getBatchIndex(batchPtr);
|
_batchIndex = BatchHeaderV0Codec.getBatchIndex(batchPtr);
|
||||||
} else if (version == 1) {
|
} else {
|
||||||
(batchPtr, _length) = BatchHeaderV1Codec.loadAndValidate(_batchHeader);
|
(batchPtr, _length) = BatchHeaderV1Codec.loadAndValidate(_batchHeader);
|
||||||
_batchHash = BatchHeaderV1Codec.computeBatchHash(batchPtr, _length);
|
_batchHash = BatchHeaderV1Codec.computeBatchHash(batchPtr, _length);
|
||||||
_batchIndex = BatchHeaderV1Codec.getBatchIndex(batchPtr);
|
_batchIndex = BatchHeaderV1Codec.getBatchIndex(batchPtr);
|
||||||
} else {
|
|
||||||
revert ErrorInvalidBatchHeaderVersion();
|
|
||||||
}
|
}
|
||||||
// only check when genesis is imported
|
// only check when genesis is imported
|
||||||
if (committedBatches[_batchIndex] != _batchHash && finalizedStateRoots[0] != bytes32(0)) {
|
if (committedBatches[_batchIndex] != _batchHash && finalizedStateRoots[0] != bytes32(0)) {
|
||||||
|
|||||||
16
rollup/run_test.sh
Executable file
16
rollup/run_test.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/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"
|
||||||
|
|
||||||
|
# Run module tests
|
||||||
|
go test -v -race -gcflags="-l" -ldflags="-s=false" -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
@@ -208,7 +208,8 @@ func TestFunction(t *testing.T) {
|
|||||||
t.Run("TestCommitAndFinalizeGenesisBatch", testCommitAndFinalizeGenesisBatch)
|
t.Run("TestCommitAndFinalizeGenesisBatch", testCommitAndFinalizeGenesisBatch)
|
||||||
t.Run("TestCommitBatchAndFinalizeBatch", testCommitBatchAndFinalizeBatch)
|
t.Run("TestCommitBatchAndFinalizeBatch", testCommitBatchAndFinalizeBatch)
|
||||||
t.Run("TestCommitBatchAndFinalizeBatch4844", testCommitBatchAndFinalizeBatch4844)
|
t.Run("TestCommitBatchAndFinalizeBatch4844", testCommitBatchAndFinalizeBatch4844)
|
||||||
t.Run("TestCommitBatchAndFinalizeBatchBeforeAndPost4844", testCommitBatchAndFinalizeBatchBeforeAndPost4844)
|
t.Run("TestCommitBatchAndFinalizeBatchBeforeAndAfter4844", testCommitBatchAndFinalizeBatchBeforeAndAfter4844)
|
||||||
|
t.Run("TestCommitBatchAndFinalizeBatchBeforeAndAfterCompression", testCommitBatchAndFinalizeBatchBeforeAndAfterCompression)
|
||||||
|
|
||||||
// l1/l2 gas oracle
|
// l1/l2 gas oracle
|
||||||
t.Run("TestImportL1GasPrice", testImportL1GasPrice)
|
t.Run("TestImportL1GasPrice", testImportL1GasPrice)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
@@ -12,11 +13,11 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/controller/relayer"
|
"scroll-tech/rollup/internal/controller/relayer"
|
||||||
"scroll-tech/rollup/internal/controller/watcher"
|
"scroll-tech/rollup/internal/controller/watcher"
|
||||||
"scroll-tech/rollup/internal/orm"
|
"scroll-tech/rollup/internal/orm"
|
||||||
|
"scroll-tech/rollup/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testImportL1GasPrice(t *testing.T) {
|
func testImportL1GasPrice(t *testing.T) {
|
||||||
@@ -143,7 +144,7 @@ func testImportL2GasPrice(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
batchOrm := orm.NewBatch(db)
|
||||||
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0)
|
_, err = batchOrm.InsertBatch(context.Background(), batch, encoding.CodecV0, utils.BatchMetrics{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// check db status
|
// check db status
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package tests
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"math"
|
||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/scroll-tech/go-ethereum/params"
|
"github.com/scroll-tech/go-ethereum/params"
|
||||||
@@ -13,7 +15,6 @@ import (
|
|||||||
|
|
||||||
"scroll-tech/common/database"
|
"scroll-tech/common/database"
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/message"
|
"scroll-tech/common/types/message"
|
||||||
|
|
||||||
"scroll-tech/rollup/internal/config"
|
"scroll-tech/rollup/internal/config"
|
||||||
@@ -99,7 +100,6 @@ func testCommitBatchAndFinalizeBatch(t *testing.T) {
|
|||||||
}, ¶ms.ChainConfig{}, db, nil)
|
}, ¶ms.ChainConfig{}, db, nil)
|
||||||
|
|
||||||
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: 10,
|
|
||||||
MaxL1CommitGasPerBatch: 50000000000,
|
MaxL1CommitGasPerBatch: 50000000000,
|
||||||
MaxL1CommitCalldataSizePerBatch: 1000000,
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
||||||
BatchTimeoutSec: 300,
|
BatchTimeoutSec: 300,
|
||||||
@@ -180,135 +180,279 @@ func testCommitBatchAndFinalizeBatch(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testCommitBatchAndFinalizeBatch4844(t *testing.T) {
|
func testCommitBatchAndFinalizeBatch4844(t *testing.T) {
|
||||||
db := setupDB(t)
|
compressionTests := []bool{false, true} // false for uncompressed, true for compressed
|
||||||
defer database.CloseDB(db)
|
for _, compressed := range compressionTests {
|
||||||
|
db := setupDB(t)
|
||||||
|
|
||||||
prepareContracts(t)
|
prepareContracts(t)
|
||||||
|
|
||||||
// Create L2Relayer
|
// Create L2Relayer
|
||||||
l2Cfg := rollupApp.Config.L2Config
|
l2Cfg := rollupApp.Config.L2Config
|
||||||
chainConfig := ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}
|
var chainConfig *params.ChainConfig
|
||||||
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
if compressed {
|
||||||
assert.NoError(t, err)
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0)}
|
||||||
defer l2Relayer.StopSenders()
|
} else {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0)}
|
||||||
// Create L1Watcher
|
|
||||||
l1Cfg := rollupApp.Config.L1Config
|
|
||||||
l1Watcher := watcher.NewL1WatcherClient(context.Background(), l1Client, 0, l1Cfg.Confirmations, l1Cfg.L1MessageQueueAddress, l1Cfg.ScrollChainContractAddress, db, nil)
|
|
||||||
|
|
||||||
// add some blocks to db
|
|
||||||
var blocks []*encoding.Block
|
|
||||||
for i := int64(0); i < 10; i++ {
|
|
||||||
header := gethTypes.Header{
|
|
||||||
Number: big.NewInt(i + 1),
|
|
||||||
ParentHash: common.Hash{},
|
|
||||||
Difficulty: big.NewInt(0),
|
|
||||||
BaseFee: big.NewInt(0),
|
|
||||||
Root: common.HexToHash("0x1"),
|
|
||||||
}
|
}
|
||||||
blocks = append(blocks, &encoding.Block{
|
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
||||||
Header: &header,
|
|
||||||
Transactions: nil,
|
|
||||||
WithdrawRoot: common.HexToHash("0x2"),
|
|
||||||
RowConsumption: &gethTypes.RowConsumption{},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
l2BlockOrm := orm.NewL2Block(db)
|
|
||||||
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
cp := watcher.NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
|
||||||
MaxBlockNumPerChunk: 100,
|
|
||||||
MaxTxNumPerChunk: 10000,
|
|
||||||
MaxL1CommitGasPerChunk: 1000000,
|
|
||||||
MaxL1CommitCalldataSizePerChunk: 100000,
|
|
||||||
MaxRowConsumptionPerChunk: 1048319,
|
|
||||||
ChunkTimeoutSec: 300,
|
|
||||||
}, chainConfig, db, nil)
|
|
||||||
|
|
||||||
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
|
||||||
MaxChunkNumPerBatch: 10,
|
|
||||||
MaxL1CommitGasPerBatch: 1000000,
|
|
||||||
MaxL1CommitCalldataSizePerBatch: 100000,
|
|
||||||
BatchTimeoutSec: 300,
|
|
||||||
}, chainConfig, db, nil)
|
|
||||||
|
|
||||||
cp.TryProposeChunk()
|
|
||||||
|
|
||||||
batchOrm := orm.NewBatch(db)
|
|
||||||
unbatchedChunkIndex, err := batchOrm.GetFirstUnbatchedChunkIndex(context.Background())
|
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
chunkOrm := orm.NewChunk(db)
|
|
||||||
chunks, err := chunkOrm.GetChunksGEIndex(context.Background(), unbatchedChunkIndex, 0)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Len(t, chunks, 1)
|
|
||||||
|
|
||||||
bp.TryProposeBatch()
|
|
||||||
|
|
||||||
l2Relayer.ProcessPendingBatches()
|
|
||||||
batch, err := batchOrm.GetLatestBatch(context.Background())
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.NotNil(t, batch)
|
|
||||||
|
|
||||||
// fetch rollup events
|
|
||||||
assert.Eventually(t, func() bool {
|
|
||||||
err = l1Watcher.FetchContractEvent()
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
var statuses []types.RollupStatus
|
|
||||||
statuses, err = batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
|
||||||
return err == nil && len(statuses) == 1 && types.RollupCommitted == statuses[0]
|
|
||||||
}, 30*time.Second, time.Second)
|
|
||||||
|
|
||||||
assert.Eventually(t, func() bool {
|
// Create L1Watcher
|
||||||
batch, err = batchOrm.GetLatestBatch(context.Background())
|
l1Cfg := rollupApp.Config.L1Config
|
||||||
|
l1Watcher := watcher.NewL1WatcherClient(context.Background(), l1Client, 0, l1Cfg.Confirmations, l1Cfg.L1MessageQueueAddress, l1Cfg.ScrollChainContractAddress, db, nil)
|
||||||
|
|
||||||
|
// add some blocks to db
|
||||||
|
var blocks []*encoding.Block
|
||||||
|
for i := int64(0); i < 10; i++ {
|
||||||
|
header := gethTypes.Header{
|
||||||
|
Number: big.NewInt(i + 1),
|
||||||
|
ParentHash: common.Hash{},
|
||||||
|
Difficulty: big.NewInt(0),
|
||||||
|
BaseFee: big.NewInt(0),
|
||||||
|
Root: common.HexToHash("0x1"),
|
||||||
|
}
|
||||||
|
blocks = append(blocks, &encoding.Block{
|
||||||
|
Header: &header,
|
||||||
|
Transactions: nil,
|
||||||
|
WithdrawRoot: common.HexToHash("0x2"),
|
||||||
|
RowConsumption: &gethTypes.RowConsumption{},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
cp := watcher.NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: 100,
|
||||||
|
MaxTxNumPerChunk: 10000,
|
||||||
|
MaxL1CommitGasPerChunk: 1,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: 100000,
|
||||||
|
MaxRowConsumptionPerChunk: 1048319,
|
||||||
|
ChunkTimeoutSec: 300,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
|
MaxL1CommitGasPerBatch: 1,
|
||||||
|
MaxL1CommitCalldataSizePerBatch: 100000,
|
||||||
|
BatchTimeoutSec: 300,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
|
||||||
|
batchOrm := orm.NewBatch(db)
|
||||||
|
unbatchedChunkIndex, err := batchOrm.GetFirstUnbatchedChunkIndex(context.Background())
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
chunkOrm := orm.NewChunk(db)
|
||||||
|
chunks, err := chunkOrm.GetChunksGEIndex(context.Background(), unbatchedChunkIndex, 0)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, chunks, 1)
|
||||||
|
|
||||||
|
bp.TryProposeBatch()
|
||||||
|
|
||||||
|
l2Relayer.ProcessPendingBatches()
|
||||||
|
batch, err := batchOrm.GetLatestBatch(context.Background())
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.NotNil(t, batch)
|
assert.NotNil(t, batch)
|
||||||
assert.NotEmpty(t, batch.CommitTxHash)
|
|
||||||
var receipt *gethTypes.Receipt
|
|
||||||
receipt, err = l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.CommitTxHash))
|
|
||||||
return err == nil && receipt.Status == gethTypes.ReceiptStatusSuccessful
|
|
||||||
}, 30*time.Second, time.Second)
|
|
||||||
|
|
||||||
// add dummy proof
|
// fetch rollup events
|
||||||
proof := &message.BatchProof{
|
assert.Eventually(t, func() bool {
|
||||||
Proof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
err = l1Watcher.FetchContractEvent()
|
||||||
|
assert.NoError(t, err)
|
||||||
|
var statuses []types.RollupStatus
|
||||||
|
statuses, err = batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
||||||
|
return err == nil && len(statuses) == 1 && types.RollupCommitted == statuses[0]
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
batch, err = batchOrm.GetLatestBatch(context.Background())
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, batch)
|
||||||
|
assert.NotEmpty(t, batch.CommitTxHash)
|
||||||
|
var receipt *gethTypes.Receipt
|
||||||
|
receipt, err = l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.CommitTxHash))
|
||||||
|
return err == nil && receipt.Status == gethTypes.ReceiptStatusSuccessful
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
// add dummy proof
|
||||||
|
proof := &message.BatchProof{
|
||||||
|
Proof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
||||||
|
}
|
||||||
|
err = batchOrm.UpdateProofByHash(context.Background(), batch.Hash, proof, 100)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
err = batchOrm.UpdateProvingStatus(context.Background(), batch.Hash, types.ProvingTaskVerified)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// process committed batch and check status
|
||||||
|
l2Relayer.ProcessCommittedBatches()
|
||||||
|
|
||||||
|
statuses, err := batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, 1, len(statuses))
|
||||||
|
assert.Equal(t, types.RollupFinalizing, statuses[0])
|
||||||
|
|
||||||
|
// fetch rollup events
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
err = l1Watcher.FetchContractEvent()
|
||||||
|
assert.NoError(t, err)
|
||||||
|
var statuses []types.RollupStatus
|
||||||
|
statuses, err = batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
||||||
|
return err == nil && len(statuses) == 1 && types.RollupFinalized == statuses[0]
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
batch, err = batchOrm.GetLatestBatch(context.Background())
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, batch)
|
||||||
|
assert.NotEmpty(t, batch.FinalizeTxHash)
|
||||||
|
var receipt *gethTypes.Receipt
|
||||||
|
receipt, err = l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.FinalizeTxHash))
|
||||||
|
return err == nil && receipt.Status == gethTypes.ReceiptStatusSuccessful
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
l2Relayer.StopSenders()
|
||||||
|
database.CloseDB(db)
|
||||||
}
|
}
|
||||||
err = batchOrm.UpdateProofByHash(context.Background(), batch.Hash, proof, 100)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
err = batchOrm.UpdateProvingStatus(context.Background(), batch.Hash, types.ProvingTaskVerified)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
// process committed batch and check status
|
|
||||||
l2Relayer.ProcessCommittedBatches()
|
|
||||||
|
|
||||||
statuses, err := batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, 1, len(statuses))
|
|
||||||
assert.Equal(t, types.RollupFinalizing, statuses[0])
|
|
||||||
|
|
||||||
// fetch rollup events
|
|
||||||
assert.Eventually(t, func() bool {
|
|
||||||
err = l1Watcher.FetchContractEvent()
|
|
||||||
assert.NoError(t, err)
|
|
||||||
var statuses []types.RollupStatus
|
|
||||||
statuses, err = batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
|
||||||
return err == nil && len(statuses) == 1 && types.RollupFinalized == statuses[0]
|
|
||||||
}, 30*time.Second, time.Second)
|
|
||||||
|
|
||||||
assert.Eventually(t, func() bool {
|
|
||||||
batch, err = batchOrm.GetLatestBatch(context.Background())
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.NotNil(t, batch)
|
|
||||||
assert.NotEmpty(t, batch.FinalizeTxHash)
|
|
||||||
var receipt *gethTypes.Receipt
|
|
||||||
receipt, err = l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.FinalizeTxHash))
|
|
||||||
return err == nil && receipt.Status == gethTypes.ReceiptStatusSuccessful
|
|
||||||
}, 30*time.Second, time.Second)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func testCommitBatchAndFinalizeBatchBeforeAndPost4844(t *testing.T) {
|
func testCommitBatchAndFinalizeBatchBeforeAndAfter4844(t *testing.T) {
|
||||||
|
compressionTests := []bool{false, true} // false for uncompressed, true for compressed
|
||||||
|
for _, compressed := range compressionTests {
|
||||||
|
db := setupDB(t)
|
||||||
|
|
||||||
|
prepareContracts(t)
|
||||||
|
|
||||||
|
// Create L2Relayer
|
||||||
|
l2Cfg := rollupApp.Config.L2Config
|
||||||
|
var chainConfig *params.ChainConfig
|
||||||
|
if compressed {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(5), CurieBlock: big.NewInt(5)}
|
||||||
|
} else {
|
||||||
|
chainConfig = ¶ms.ChainConfig{BernoulliBlock: big.NewInt(5)}
|
||||||
|
}
|
||||||
|
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Create L1Watcher
|
||||||
|
l1Cfg := rollupApp.Config.L1Config
|
||||||
|
l1Watcher := watcher.NewL1WatcherClient(context.Background(), l1Client, 0, l1Cfg.Confirmations, l1Cfg.L1MessageQueueAddress, l1Cfg.ScrollChainContractAddress, db, nil)
|
||||||
|
|
||||||
|
// add some blocks to db
|
||||||
|
var blocks []*encoding.Block
|
||||||
|
for i := int64(0); i < 10; i++ {
|
||||||
|
header := gethTypes.Header{
|
||||||
|
Number: big.NewInt(i + 1),
|
||||||
|
ParentHash: common.Hash{},
|
||||||
|
Difficulty: big.NewInt(0),
|
||||||
|
BaseFee: big.NewInt(0),
|
||||||
|
Root: common.HexToHash("0x1"),
|
||||||
|
}
|
||||||
|
blocks = append(blocks, &encoding.Block{
|
||||||
|
Header: &header,
|
||||||
|
Transactions: nil,
|
||||||
|
WithdrawRoot: common.HexToHash("0x2"),
|
||||||
|
RowConsumption: &gethTypes.RowConsumption{},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
l2BlockOrm := orm.NewL2Block(db)
|
||||||
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
cp := watcher.NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
||||||
|
MaxBlockNumPerChunk: 100,
|
||||||
|
MaxTxNumPerChunk: 10000,
|
||||||
|
MaxL1CommitGasPerChunk: 50000000000,
|
||||||
|
MaxL1CommitCalldataSizePerChunk: 1000000,
|
||||||
|
MaxRowConsumptionPerChunk: 1048319,
|
||||||
|
ChunkTimeoutSec: 300,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
|
MaxL1CommitGasPerBatch: 50000000000,
|
||||||
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
||||||
|
BatchTimeoutSec: 300,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
cp.TryProposeChunk()
|
||||||
|
bp.TryProposeBatch()
|
||||||
|
bp.TryProposeBatch()
|
||||||
|
|
||||||
|
for i := uint64(0); i < 2; i++ {
|
||||||
|
l2Relayer.ProcessPendingBatches()
|
||||||
|
batchOrm := orm.NewBatch(db)
|
||||||
|
batch, err := batchOrm.GetBatchByIndex(context.Background(), i+1)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, batch)
|
||||||
|
|
||||||
|
// fetch rollup events
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
err = l1Watcher.FetchContractEvent()
|
||||||
|
assert.NoError(t, err)
|
||||||
|
var statuses []types.RollupStatus
|
||||||
|
statuses, err = batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
||||||
|
return err == nil && len(statuses) == 1 && types.RollupCommitted == statuses[0]
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
batch, err = batchOrm.GetBatchByIndex(context.Background(), i+1)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, batch)
|
||||||
|
assert.NotEmpty(t, batch.CommitTxHash)
|
||||||
|
var receipt *gethTypes.Receipt
|
||||||
|
receipt, err = l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.CommitTxHash))
|
||||||
|
return err == nil && receipt.Status == gethTypes.ReceiptStatusSuccessful
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
// add dummy proof
|
||||||
|
proof := &message.BatchProof{
|
||||||
|
Proof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
||||||
|
}
|
||||||
|
err = batchOrm.UpdateProofByHash(context.Background(), batch.Hash, proof, 100)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
err = batchOrm.UpdateProvingStatus(context.Background(), batch.Hash, types.ProvingTaskVerified)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// process committed batch and check status
|
||||||
|
l2Relayer.ProcessCommittedBatches()
|
||||||
|
|
||||||
|
statuses, err := batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, 1, len(statuses))
|
||||||
|
assert.Equal(t, types.RollupFinalizing, statuses[0])
|
||||||
|
|
||||||
|
// fetch rollup events
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
err = l1Watcher.FetchContractEvent()
|
||||||
|
assert.NoError(t, err)
|
||||||
|
var statuses []types.RollupStatus
|
||||||
|
statuses, err = batchOrm.GetRollupStatusByHashList(context.Background(), []string{batch.Hash})
|
||||||
|
return err == nil && len(statuses) == 1 && types.RollupFinalized == statuses[0]
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
|
||||||
|
assert.Eventually(t, func() bool {
|
||||||
|
batch, err = batchOrm.GetBatchByIndex(context.Background(), i+1)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, batch)
|
||||||
|
assert.NotEmpty(t, batch.FinalizeTxHash)
|
||||||
|
var receipt *gethTypes.Receipt
|
||||||
|
receipt, err = l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.FinalizeTxHash))
|
||||||
|
return err == nil && receipt.Status == gethTypes.ReceiptStatusSuccessful
|
||||||
|
}, 30*time.Second, time.Second)
|
||||||
|
}
|
||||||
|
|
||||||
|
l2Relayer.StopSenders()
|
||||||
|
database.CloseDB(db)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testCommitBatchAndFinalizeBatchBeforeAndAfterCompression(t *testing.T) {
|
||||||
db := setupDB(t)
|
db := setupDB(t)
|
||||||
defer database.CloseDB(db)
|
defer database.CloseDB(db)
|
||||||
|
|
||||||
@@ -316,7 +460,7 @@ func testCommitBatchAndFinalizeBatchBeforeAndPost4844(t *testing.T) {
|
|||||||
|
|
||||||
// Create L2Relayer
|
// Create L2Relayer
|
||||||
l2Cfg := rollupApp.Config.L2Config
|
l2Cfg := rollupApp.Config.L2Config
|
||||||
chainConfig := ¶ms.ChainConfig{BernoulliBlock: big.NewInt(5)}
|
chainConfig := ¶ms.ChainConfig{BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(5)}
|
||||||
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
defer l2Relayer.StopSenders()
|
defer l2Relayer.StopSenders()
|
||||||
@@ -354,13 +498,14 @@ func testCommitBatchAndFinalizeBatchBeforeAndPost4844(t *testing.T) {
|
|||||||
MaxL1CommitCalldataSizePerChunk: 1000000,
|
MaxL1CommitCalldataSizePerChunk: 1000000,
|
||||||
MaxRowConsumptionPerChunk: 1048319,
|
MaxRowConsumptionPerChunk: 1048319,
|
||||||
ChunkTimeoutSec: 300,
|
ChunkTimeoutSec: 300,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
}, chainConfig, db, nil)
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
bp := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
||||||
MaxChunkNumPerBatch: 10,
|
|
||||||
MaxL1CommitGasPerBatch: 50000000000,
|
MaxL1CommitGasPerBatch: 50000000000,
|
||||||
MaxL1CommitCalldataSizePerBatch: 1000000,
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
||||||
BatchTimeoutSec: 300,
|
BatchTimeoutSec: 300,
|
||||||
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
||||||
}, chainConfig, db, nil)
|
}, chainConfig, db, nil)
|
||||||
|
|
||||||
cp.TryProposeChunk()
|
cp.TryProposeChunk()
|
||||||
|
|||||||
@@ -3,44 +3,40 @@ module scroll-tech/integration-test
|
|||||||
go 1.21
|
go 1.21
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e
|
github.com/scroll-tech/da-codec v0.0.0-20240429123441-4aaf9d35e570
|
||||||
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
gorm.io/gorm v1.25.5
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
|
|
||||||
github.com/bits-and-blooms/bitset v1.12.0 // indirect
|
github.com/bits-and-blooms/bitset v1.12.0 // indirect
|
||||||
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
||||||
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/consensys/bavard v0.1.13 // indirect
|
github.com/consensys/bavard v0.1.13 // indirect
|
||||||
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/deckarep/golang-set v1.8.0 // indirect
|
github.com/deckarep/golang-set v1.8.0 // indirect
|
||||||
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
|
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
|
||||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||||
github.com/go-stack/stack v1.8.1 // indirect
|
github.com/go-stack/stack v1.8.1 // indirect
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
|
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/gorilla/websocket v1.5.0 // indirect
|
github.com/gorilla/websocket v1.5.0 // indirect
|
||||||
github.com/holiman/uint256 v1.2.4 // indirect
|
github.com/holiman/uint256 v1.2.4 // indirect
|
||||||
github.com/iden3/go-iden3-crypto v0.0.15 // indirect
|
github.com/iden3/go-iden3-crypto v0.0.15 // indirect
|
||||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
github.com/jinzhu/now v1.1.5 // indirect
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
|
||||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
|
||||||
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/rivo/uniseg v0.4.4 // indirect
|
|
||||||
github.com/rjeczalik/notify v0.9.1 // indirect
|
github.com/rjeczalik/notify v0.9.1 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
github.com/scroll-tech/zktrie v0.8.2 // indirect
|
||||||
github.com/scroll-tech/zktrie v0.7.1 // indirect
|
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 // indirect
|
github.com/supranational/blst v0.3.11 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
||||||
github.com/tklauser/numcpus v0.6.1 // indirect
|
github.com/tklauser/numcpus v0.6.1 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||||
golang.org/x/crypto v0.17.0 // indirect
|
golang.org/x/crypto v0.19.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sync v0.6.0 // indirect
|
||||||
golang.org/x/sys v0.17.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
|
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
|
||||||
github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o=
|
github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o=
|
||||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
|
||||||
github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA=
|
github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA=
|
||||||
github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
||||||
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
|
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
|
||||||
@@ -21,11 +20,9 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj
|
|||||||
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
||||||
github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M=
|
github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M=
|
||||||
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
|
||||||
github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
|
||||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
|
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
|
||||||
@@ -41,7 +38,6 @@ github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW
|
|||||||
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
|
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
|
||||||
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
|
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
||||||
@@ -87,25 +83,24 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
|
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
|
||||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
|
||||||
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
||||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=
|
github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=
|
||||||
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
||||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e h1:FcoK0rykAWI+5E7cQM6ALRLd5CmjBTHRvJztRBH2xeM=
|
github.com/scroll-tech/da-codec v0.0.0-20240429123441-4aaf9d35e570 h1:2oA2bAFPQXDZcUK8TA9qd5zj6AsURpHyBaAha5goP0c=
|
||||||
github.com/scroll-tech/go-ethereum v1.10.14-0.20240326144132-0f0cd99f7a2e/go.mod h1:7Rz2bh9pn42rGuxjh51CG7HL9SKMG3ZugJkL3emdZx8=
|
github.com/scroll-tech/da-codec v0.0.0-20240429123441-4aaf9d35e570/go.mod h1:1wWYii0OPwd5kw+xrz0PFgS420xNadrNF1x/ELJT+TM=
|
||||||
github.com/scroll-tech/zktrie v0.7.1 h1:NrmZNjuBzsbrKePqdHDG+t2cXnimbtezPAFS0+L9ElE=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea h1:CH1WXWrpEpLaP3N+bFs2a1xdE0+lRm1AuJQb5YvE6Ls=
|
||||||
github.com/scroll-tech/zktrie v0.7.1/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
|
github.com/scroll-tech/go-ethereum v1.10.14-0.20240426041101-a860446ebaea/go.mod h1:i4VBgWoaW/y0D8MmQb7hSOulyw1dKhuiSFAbznwivCA=
|
||||||
|
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/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2 h1:wh1wzwAhZBNiZO37uWS/nDaKiIwHz4mDo4pnA+fqTO0=
|
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
|
||||||
github.com/supranational/blst v0.3.11-0.20230124161941-ca03e11a3ff2/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
||||||
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
||||||
@@ -115,8 +110,8 @@ github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9f
|
|||||||
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
|
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
|
||||||
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||||
@@ -124,7 +119,6 @@ golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
|||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||||
@@ -142,7 +136,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde h1:9DShaph9qhkIYw7QF91I/ynrr4cOO2PZra2PFD7Mfeg=
|
||||||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||||
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
|
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
|
||||||
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=
|
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=
|
||||||
|
|||||||
@@ -7,19 +7,20 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
"github.com/scroll-tech/go-ethereum/common"
|
"github.com/scroll-tech/go-ethereum/common"
|
||||||
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/testcontainers"
|
"scroll-tech/common/testcontainers"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/utils"
|
"scroll-tech/common/utils"
|
||||||
"scroll-tech/common/version"
|
"scroll-tech/common/version"
|
||||||
capp "scroll-tech/coordinator/cmd/api/app"
|
capp "scroll-tech/coordinator/cmd/api/app"
|
||||||
"scroll-tech/database/migrate"
|
"scroll-tech/database/migrate"
|
||||||
"scroll-tech/integration-test/orm"
|
"scroll-tech/integration-test/orm"
|
||||||
rapp "scroll-tech/prover/cmd/app"
|
rapp "scroll-tech/prover/cmd/app"
|
||||||
|
|
||||||
bcmd "scroll-tech/rollup/cmd"
|
bcmd "scroll-tech/rollup/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Batch represents a batch of chunks.
|
// Batch represents a batch of chunks.
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
"github.com/scroll-tech/da-codec/encoding/codecv0"
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"scroll-tech/common/types"
|
"scroll-tech/common/types"
|
||||||
"scroll-tech/common/types/encoding"
|
|
||||||
"scroll-tech/common/types/encoding/codecv0"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Chunk represents a chunk of blocks in the database.
|
// Chunk represents a chunk of blocks in the database.
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"scroll-tech/common/types/encoding"
|
"github.com/scroll-tech/da-codec/encoding"
|
||||||
|
|
||||||
"github.com/scroll-tech/go-ethereum/log"
|
"github.com/scroll-tech/go-ethereum/log"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user