Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,23 @@ func (b *Bootstrap) StartEventIngestion(ctx context.Context) error {

chainID := b.config.FlowNetworkID

// Create EVM event subscriber
// Event ingestion & tx replay is idempotent, so we use the
// `latestCadenceHeight` to be on the safe side.
// the event subscriber takes the first block to sync from the Access node,
// which is the block after the latest cadence block
nextCadenceHeight := latestCadenceHeight + 1
// Special case when using a local Emulator as Access Node. The Emulator
// always starts at block height 0, so if we try to subscribe at block
// height 1, we'll get an error, as it doesn't exist.
if latestCadenceHeight == config.EmulatorInitCadenceHeight {
nextCadenceHeight -= 1
}

// create EVM event subscriber
subscriber := ingestion.NewRPCEventSubscriber(
b.logger,
b.client,
chainID,
b.keystore,
latestCadenceHeight,
nextCadenceHeight,
)

callTracerCollector, err := replayer.NewCallTracerCollector(
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/holiman/uint256 v1.3.2
github.com/onflow/atree v0.10.1
github.com/onflow/cadence v1.7.0
github.com/onflow/flow-go v0.43.1-rc.4.0.20250930135247-97f6643af6f8
github.com/onflow/flow-go-sdk v1.8.2
github.com/onflow/cadence v1.7.1
github.com/onflow/flow-go v0.43.1-rc.5-pr8007.0.20251007165614-c6967df18fa9
github.com/onflow/flow-go-sdk v1.8.4
github.com/prometheus/client_golang v1.20.5
github.com/rs/cors v1.8.0
github.com/rs/zerolog v1.33.0
Expand All @@ -25,7 +25,7 @@ require (
go.uber.org/ratelimit v0.3.1
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/sync v0.16.0
google.golang.org/grpc v1.75.0
google.golang.org/grpc v1.75.1
)

require (
Expand Down Expand Up @@ -152,14 +152,14 @@ require (
github.com/onflow/flow-ft/lib/go/templates v1.0.1 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 // indirect
github.com/onflow/flow-nft/lib/go/templates v1.3.0 // indirect
github.com/onflow/flow/protobuf/go/flow v0.4.15 // indirect
github.com/onflow/flow/protobuf/go/flow v0.4.16 // indirect
github.com/onflow/go-ethereum v1.13.4 // indirect
github.com/onflow/sdks v0.6.0-preview.1 // indirect
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pion/dtls/v2 v2.2.12 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/stun/v2 v2.0.0 // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onflow/atree v0.10.1 h1:8sixWP3l3LitcyuKkVepbIsLbfr7JN3cCB/iA1j2JD8=
github.com/onflow/atree v0.10.1/go.mod h1:+BuiL0XuIigHJqwkdIuDNzxXvyDx1jYUog/w+iZhcE8=
github.com/onflow/cadence v1.7.0 h1:bbxl9Hy3w3RuigO9higtecqqeqOAHzGMrA6AI8dDSUk=
github.com/onflow/cadence v1.7.0/go.mod h1:1lKdLNVHIoO0jEjkRPMtOmBWYCG1An9TXSoiCuGIIpo=
github.com/onflow/cadence v1.7.1 h1:VpPiC13e4qrdpyqaagd+dpHtQwfJ/djr97FgT3SovWA=
github.com/onflow/cadence v1.7.1/go.mod h1:1lKdLNVHIoO0jEjkRPMtOmBWYCG1An9TXSoiCuGIIpo=
github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U=
github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs=
github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90=
Expand All @@ -568,16 +568,16 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.1 h1:Ts5ob+CoCY2EjEd0W6vdLJ7hLL3
github.com/onflow/flow-ft/lib/go/contracts v1.0.1/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-ft/lib/go/templates v1.0.1 h1:FDYKAiGowABtoMNusLuRCILIZDtVqJ/5tYI4VkF5zfM=
github.com/onflow/flow-ft/lib/go/templates v1.0.1/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE=
github.com/onflow/flow-go v0.43.1-rc.4.0.20250930135247-97f6643af6f8 h1:WuuYhrXQfqYpOPXUsyq2fbPtx8uiXSMuxHOUJdqGVIY=
github.com/onflow/flow-go v0.43.1-rc.4.0.20250930135247-97f6643af6f8/go.mod h1:Ra4VlmRlJsh73TIMDQ3mDS00Kuuy2UgIpvBtoTN+ETI=
github.com/onflow/flow-go-sdk v1.8.2 h1:Jkoh0LdH4kIADFdHoHK31qHcH0QnCkAL+ybjAkBEbqc=
github.com/onflow/flow-go-sdk v1.8.2/go.mod h1:/5g1t+xgk1nFXz8ifk8O3aT4DqLwq5p3k2BhiW4ZX+U=
github.com/onflow/flow-go v0.43.1-rc.5-pr8007.0.20251007165614-c6967df18fa9 h1:PPIDrvyHEzkegSn8sYvQxmnegsiwdwmIrYJBNLSqaGw=
github.com/onflow/flow-go v0.43.1-rc.5-pr8007.0.20251007165614-c6967df18fa9/go.mod h1:pRsxdt8GYriAfP4RjUsCJ505MQcAZgyZq7K4DuWxrXI=
github.com/onflow/flow-go-sdk v1.8.4 h1:WHtVjryOU6ZJx0jUSjBPOrWoGqGDr+eEejyIkfbiBCE=
github.com/onflow/flow-go-sdk v1.8.4/go.mod h1:Jli9sI78LAnoC3OVGeAs0ngOezoLTfE/GrKOAB9TbTw=
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 h1:DmNop+O0EMyicZvhgdWboFG57xz5t9Qp81FKlfKyqJc=
github.com/onflow/flow-nft/lib/go/contracts v1.3.0/go.mod h1:eZ9VMMNfCq0ho6kV25xJn1kXeCfxnkhj3MwF3ed08gY=
github.com/onflow/flow-nft/lib/go/templates v1.3.0 h1:uGIBy4GEY6Z9hKP7sm5nA5kwvbvLWW4nWx5NN9Wg0II=
github.com/onflow/flow-nft/lib/go/templates v1.3.0/go.mod h1:gVbb5fElaOwKhV5UEUjM+JQTjlsguHg2jwRupfM/nng=
github.com/onflow/flow/protobuf/go/flow v0.4.15 h1:7Xt7kkqeeygWMw/S327uKu11FPJghNm1pvam2HXbC7g=
github.com/onflow/flow/protobuf/go/flow v0.4.15/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/flow/protobuf/go/flow v0.4.16 h1:UADQeq/mpuqFk+EkwqDNoF70743raWQKmB/Dm/eKt2Q=
github.com/onflow/flow/protobuf/go/flow v0.4.16/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/go-ethereum v1.13.4 h1:iNO86fm8RbBbhZ87ZulblInqCdHnAQVY8okBrNsTevc=
github.com/onflow/go-ethereum v1.13.4/go.mod h1:cE/gEUkAffhwbVmMJYz+t1dAfVNHNwZCgc3BWtZxBGY=
github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 h1:sxyWLqGm/p4EKT6DUlQESDG1ZNMN9GjPCm1gTq7NGfc=
Expand Down Expand Up @@ -606,8 +606,8 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhM
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pion/datachannel v1.5.10 h1:ly0Q26K1i6ZkGf42W7D4hQYR90pZwzFOjTq5AuCKk4o=
Expand Down Expand Up @@ -1239,8 +1239,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI=
google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down
12 changes: 6 additions & 6 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ go 1.25.0
require (
github.com/ethereum/go-ethereum v1.16.3
github.com/goccy/go-json v0.10.4
github.com/onflow/cadence v1.7.0
github.com/onflow/cadence v1.7.1
github.com/onflow/crypto v0.25.3
github.com/onflow/flow-emulator v1.7.2
github.com/onflow/flow-emulator v1.8.0
github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7
github.com/onflow/flow-go v0.43.1-rc.4.0.20250930135247-97f6643af6f8
github.com/onflow/flow-go-sdk v1.8.2
github.com/onflow/flow-go v0.43.1-rc.5-pr8007.0.20251007165614-c6967df18fa9
github.com/onflow/flow-go-sdk v1.8.4
github.com/rs/zerolog v1.34.0
github.com/stretchr/testify v1.11.1
golang.org/x/sync v0.16.0
Expand Down Expand Up @@ -164,14 +164,14 @@ require (
github.com/onflow/flow-ft/lib/go/templates v1.0.1 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 // indirect
github.com/onflow/flow-nft/lib/go/templates v1.3.0 // indirect
github.com/onflow/flow/protobuf/go/flow v0.4.15 // indirect
github.com/onflow/flow/protobuf/go/flow v0.4.16 // indirect
github.com/onflow/go-ethereum v1.13.4 // indirect
github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 // indirect
github.com/onflow/sdks v0.6.0-preview.1 // indirect
github.com/onflow/wal v1.0.2 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pion/dtls/v2 v2.2.12 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/stun/v2 v2.0.0 // indirect
Expand Down
28 changes: 14 additions & 14 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/aws/aws-sdk-go-v2 v1.39.0 h1:xm5WV/2L4emMRmMjHFykqiA4M/ra0DJVSWUkDyBjbg4=
github.com/aws/aws-sdk-go-v2 v1.39.0/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
github.com/aws/aws-sdk-go-v2 v1.39.1 h1:fWZhGAwVRK/fAN2tmt7ilH4PPAE11rDj7HytrmbZ2FE=
github.com/aws/aws-sdk-go-v2 v1.39.1/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.5.1 h1:VGkV9KmhGqOQWnHyi4gLG98kE6OecT42fdrCGFWxJsc=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.5.1/go.mod h1:PLlnMiki//sGnCJiW+aVpvP/C8Kcm8mEj/IVm9+9qk4=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM=
Expand Down Expand Up @@ -800,8 +800,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onflow/atree v0.10.1 h1:8sixWP3l3LitcyuKkVepbIsLbfr7JN3cCB/iA1j2JD8=
github.com/onflow/atree v0.10.1/go.mod h1:+BuiL0XuIigHJqwkdIuDNzxXvyDx1jYUog/w+iZhcE8=
github.com/onflow/cadence v1.7.0 h1:bbxl9Hy3w3RuigO9higtecqqeqOAHzGMrA6AI8dDSUk=
github.com/onflow/cadence v1.7.0/go.mod h1:1lKdLNVHIoO0jEjkRPMtOmBWYCG1An9TXSoiCuGIIpo=
github.com/onflow/cadence v1.7.1 h1:VpPiC13e4qrdpyqaagd+dpHtQwfJ/djr97FgT3SovWA=
github.com/onflow/cadence v1.7.1/go.mod h1:1lKdLNVHIoO0jEjkRPMtOmBWYCG1An9TXSoiCuGIIpo=
github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U=
github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs=
github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90=
Expand All @@ -810,24 +810,24 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.0 h1:m6lHp0xDdmVWbpb
github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.0/go.mod h1:jBDqVep0ICzhXky56YlyO4aiV2Jl/5r7wnqUPpvi7zE=
github.com/onflow/flow-core-contracts/lib/go/templates v1.9.0 h1:8jn4Lxp/dpyWdgJ+5XEDUkYOf2aveObZtHtkdnYIEco=
github.com/onflow/flow-core-contracts/lib/go/templates v1.9.0/go.mod h1:twSVyUt3rNrgzAmxtBX+1Gw64QlPemy17cyvnXYy1Ug=
github.com/onflow/flow-emulator v1.7.2 h1:1hJ1IZ3AeKaOQ3nsSfcF9Irys0HZLxFYIBbAZruEQuE=
github.com/onflow/flow-emulator v1.7.2/go.mod h1:0sx/W4sutaMpDBs60frpJRiYAgQbZcakMH8mWq+k3Js=
github.com/onflow/flow-emulator v1.8.0 h1:+PnzhHE4Qr06nvV5WC3ZS3Xju6eX++h+ExAAC6UgVBY=
github.com/onflow/flow-emulator v1.8.0/go.mod h1:snkG+3nExHn+bLuFonkMN6tgJD85OYE70tDb9YiWVnw=
github.com/onflow/flow-evm-bridge v0.1.0 h1:7X2osvo4NnQgHj8aERUmbYtv9FateX8liotoLnPL9nM=
github.com/onflow/flow-evm-bridge v0.1.0/go.mod h1:5UYwsnu6WcBNrwitGFxphCl5yq7fbWYGYuiCSTVF6pk=
github.com/onflow/flow-ft/lib/go/contracts v1.0.1 h1:Ts5ob+CoCY2EjEd0W6vdLJ7hLL3SsEftzXG2JlmSe24=
github.com/onflow/flow-ft/lib/go/contracts v1.0.1/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-ft/lib/go/templates v1.0.1 h1:FDYKAiGowABtoMNusLuRCILIZDtVqJ/5tYI4VkF5zfM=
github.com/onflow/flow-ft/lib/go/templates v1.0.1/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE=
github.com/onflow/flow-go v0.43.1-rc.4.0.20250930135247-97f6643af6f8 h1:WuuYhrXQfqYpOPXUsyq2fbPtx8uiXSMuxHOUJdqGVIY=
github.com/onflow/flow-go v0.43.1-rc.4.0.20250930135247-97f6643af6f8/go.mod h1:Ra4VlmRlJsh73TIMDQ3mDS00Kuuy2UgIpvBtoTN+ETI=
github.com/onflow/flow-go-sdk v1.8.2 h1:Jkoh0LdH4kIADFdHoHK31qHcH0QnCkAL+ybjAkBEbqc=
github.com/onflow/flow-go-sdk v1.8.2/go.mod h1:/5g1t+xgk1nFXz8ifk8O3aT4DqLwq5p3k2BhiW4ZX+U=
github.com/onflow/flow-go v0.43.1-rc.5-pr8007.0.20251007165614-c6967df18fa9 h1:PPIDrvyHEzkegSn8sYvQxmnegsiwdwmIrYJBNLSqaGw=
github.com/onflow/flow-go v0.43.1-rc.5-pr8007.0.20251007165614-c6967df18fa9/go.mod h1:pRsxdt8GYriAfP4RjUsCJ505MQcAZgyZq7K4DuWxrXI=
github.com/onflow/flow-go-sdk v1.8.4 h1:WHtVjryOU6ZJx0jUSjBPOrWoGqGDr+eEejyIkfbiBCE=
github.com/onflow/flow-go-sdk v1.8.4/go.mod h1:Jli9sI78LAnoC3OVGeAs0ngOezoLTfE/GrKOAB9TbTw=
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 h1:DmNop+O0EMyicZvhgdWboFG57xz5t9Qp81FKlfKyqJc=
github.com/onflow/flow-nft/lib/go/contracts v1.3.0/go.mod h1:eZ9VMMNfCq0ho6kV25xJn1kXeCfxnkhj3MwF3ed08gY=
github.com/onflow/flow-nft/lib/go/templates v1.3.0 h1:uGIBy4GEY6Z9hKP7sm5nA5kwvbvLWW4nWx5NN9Wg0II=
github.com/onflow/flow-nft/lib/go/templates v1.3.0/go.mod h1:gVbb5fElaOwKhV5UEUjM+JQTjlsguHg2jwRupfM/nng=
github.com/onflow/flow/protobuf/go/flow v0.4.15 h1:7Xt7kkqeeygWMw/S327uKu11FPJghNm1pvam2HXbC7g=
github.com/onflow/flow/protobuf/go/flow v0.4.15/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/flow/protobuf/go/flow v0.4.16 h1:UADQeq/mpuqFk+EkwqDNoF70743raWQKmB/Dm/eKt2Q=
github.com/onflow/flow/protobuf/go/flow v0.4.16/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/go-ethereum v1.13.4 h1:iNO86fm8RbBbhZ87ZulblInqCdHnAQVY8okBrNsTevc=
github.com/onflow/go-ethereum v1.13.4/go.mod h1:cE/gEUkAffhwbVmMJYz+t1dAfVNHNwZCgc3BWtZxBGY=
github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 h1:sxyWLqGm/p4EKT6DUlQESDG1ZNMN9GjPCm1gTq7NGfc=
Expand Down Expand Up @@ -874,8 +874,8 @@ github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pion/datachannel v1.5.10 h1:ly0Q26K1i6ZkGf42W7D4hQYR90pZwzFOjTq5AuCKk4o=
Expand Down
10 changes: 5 additions & 5 deletions tests/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func startEmulator(createTestAccounts bool) (*server.EmulatorServer, error) {
TransactionExpiry: 10,
TransactionMaxGasLimit: flow.DefaultMaxTransactionGasLimit,
SetupEVMEnabled: true,
SetupVMBridgeEnabled: false,
SetupVMBridgeEnabled: true,
})

go func() {
Expand Down Expand Up @@ -243,19 +243,19 @@ func setupTestAccounts(emu emulator.Emulator) error {
self.fundVault <- vaultRef.withdraw(amount: 10.0) as! @FlowToken.Vault
self.auth = signer

if !signer.storage.check<@EVM.CadenceOwnedAccount>(from: /storage/evm) {
if !signer.storage.check<@EVM.CadenceOwnedAccount>(from: /storage/evm_coa) {
signer.storage.save<@EVM.CadenceOwnedAccount>(
<- EVM.createCadenceOwnedAccount(),
to: /storage/evm
to: /storage/evm_coa
)
}

if !signer.capabilities.exists(/public/evm) {
let cap = signer.capabilities.storage.issue<&EVM.CadenceOwnedAccount>(/storage/evm)
let cap = signer.capabilities.storage.issue<&EVM.CadenceOwnedAccount>(/storage/evm_coa)
signer.capabilities.publish(cap, at: /public/evm)
}

self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)!
self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm_coa)!
}

execute {
Expand Down
2 changes: 1 addition & 1 deletion tests/web3js/eth_non_interactive_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ it('should get fee history', async () => {
oldestBlock: 1n,
reward: [['0x96'], ['0x96'], ['0x96']], // gas price is 150 during testing
baseFeePerGas: [1n, 1n, 1n],
gasUsedRatio: [0, 0.006205458333333334, 0]
gasUsedRatio: [0.066314225, 0.006205458333333334, 0]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: why did this change? I'm not sure I follow.

@m-Peter m-Peter Oct 9, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janezpodhostnik A very good question 👏

The VM bridge bootstrap, executed a bunch of EVM transactions, on the genesis block. However, the EVM block was never committed with InternalEVM.commitBlockProposal(), because the system chunk transaction was not executed for the genesis block.

This means that all of the 18 EVM transactions that were executed in the genesis block, will actually be attributed to the first committed EVM block. That would be the first committed Flow block by the Emulator, since it will run the system chunk transaction. The difference is gasUsedRatio comes from the fact that before there were no EVM transactions on EVM block height 1, but now we have the 18 EVM transactions from the VM bridge bootstrap.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to fix this in fvm bootstrapping? Add The EVM block formation transaction at the end of bootstrapping?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And to give some numbers:

total gas used = 7957707
block gas limit = 120000000
gasUsedRatio = total gas used / block gas limit = 0.066314225

Do we need to fix this in fvm bootstrapping? Add The EVM block formation transaction at the end of bootstrapping?

I think it's not really necessary. At least for unblocking the current issue. I'll give it a shot when I have some more time.

}
)
})