Skip to content

Commit 860c61b

Browse files
committed
port v0.4.1-beta1 to cosmos-evm
1 parent 534461f commit 860c61b

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121

2222
jobs:
2323
build:
24-
runs-on: amd-runner-2204
24+
runs-on: ubuntu-latest
2525
strategy:
2626
fail-fast: false
2727
matrix:
@@ -98,7 +98,7 @@ jobs:
9898
retention-days: 1
9999

100100
merge:
101-
runs-on: arm-runner-2204
101+
runs-on: ubuntu-24.04-arm
102102
needs:
103103
- build
104104
steps:

aggsender/query/l1info_tree_data_query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (l *L1InfoTreeDataQuerier) getLatestProcessedFinalizedBlock(ctx context.Con
148148
}
149149
}
150150

151-
if (lastProcessedBlockHash == common.Hash{}) || (lastProcessedBlockHash == lastFinalizedL1Block.Hash()) {
151+
if (lastProcessedBlockHash == common.Hash{}) || (lastProcessedBlockHash == lastFinalizedL1Block.RpcHash) {
152152
// if the hash is empty it means that this is an old block that was processed before this
153153
// feature was added, so we will consider it finalized
154154
return lastFinalizedL1Block.Number.Uint64(), nil
@@ -157,5 +157,5 @@ func (l *L1InfoTreeDataQuerier) getLatestProcessedFinalizedBlock(ctx context.Con
157157
return 0, fmt.Errorf("l1infotreesyncer returned a different hash for "+
158158
"the latest finalized block: %d. Might be that syncer did not process a reorg yet. "+
159159
"Expected hash: %s, got: %s", lastProcessedBlockNum,
160-
lastFinalizedL1Block.Hash().String(), lastProcessedBlockHash.String())
160+
lastFinalizedL1Block.RpcHash.String(), lastProcessedBlockHash.String())
161161
}

bridgesync/bridgesync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func newBridgeSync(
150150

151151
err = processor.ProcessBlock(ctx, sync.Block{
152152
Num: initialBlock,
153-
Hash: block.Hash(),
153+
Hash: block.Header().RpcHash,
154154
})
155155
if err != nil {
156156
return nil, err

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,5 @@ require (
190190
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
191191
rsc.io/tmplfunc v0.0.3 // indirect
192192
)
193+
194+
replace github.com/ethereum/go-ethereum => github.com/Peersyst/go-ethereum v1.15.5-agglayer.0

go.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY=
3838
github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
3939
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
4040
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
41+
github.com/Peersyst/go-ethereum v1.15.5-agglayer.0 h1:hajnc47agSwFRH/tXWq/Op3eej2A2qtNkbd6Gn18/PQ=
42+
github.com/Peersyst/go-ethereum v1.15.5-agglayer.0/go.mod h1:1LG2LnMOx2yPRHR/S+xuipXH29vPr6BIH6GElD8N/fo=
4143
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
4244
github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI=
4345
github.com/agglayer/go_signer v0.0.7 h1:V+4wFWjGKdL1GgXSzx2RLgglJWyce95Dy/4+9xx52hs=
@@ -131,8 +133,6 @@ github.com/ethereum-optimism/infra/op-signer v1.4.1 h1:vLNPTqbSZH85KItWDuCoRsNto
131133
github.com/ethereum-optimism/infra/op-signer v1.4.1/go.mod h1:znWwvyDM9lYCQUUjMzQAF8+ysPa418ZzopUr9tdPJWI=
132134
github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs=
133135
github.com/ethereum/c-kzg-4844 v1.0.3/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
134-
github.com/ethereum/go-ethereum v1.15.5 h1:Fo2TbBWC61lWVkFw9tsMoHCNX1ndpuaQBRJ8H6xLUPo=
135-
github.com/ethereum/go-ethereum v1.15.5/go.mod h1:1LG2LnMOx2yPRHR/S+xuipXH29vPr6BIH6GElD8N/fo=
136136
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
137137
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
138138
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
@@ -628,6 +628,5 @@ honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWh
628628
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
629629
honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
630630
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
631-
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
632631
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
633632
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=

l1infotreesync/l1infotreesync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func New(
7171

7272
err = processor.ProcessBlock(ctx, sync.Block{
7373
Num: initialBlock - 1,
74-
Hash: block.Hash(),
74+
Hash: block.Header().RpcHash,
7575
})
7676
if err != nil {
7777
return nil, err

reorgdetector/reorgdetector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (rd *ReorgDetector) detectReorgInTrackedList(ctx context.Context) error {
209209
headersCacheLock.Unlock()
210210

211211
// Check if the block hash matches with the actual block hash
212-
if hdr.Hash == currentHeader.Hash() {
212+
if hdr.Hash == currentHeader.RpcHash {
213213
// Delete block from the tracked blocks list if it is less than or equal to the last finalized block
214214
// and hashes matches. If higher than finalized block, we assume a reorg still might happen.
215215
if hdr.Num <= lastFinalisedBlock.Number.Uint64() {

sync/evmdownloader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func (d *EVMDownloaderImplementation) GetBlockHeader(ctx context.Context, blockN
429429
}
430430
return EVMBlockHeader{
431431
Num: header.Number.Uint64(),
432-
Hash: header.Hash(),
432+
Hash: header.RpcHash,
433433
ParentHash: header.ParentHash,
434434
Timestamp: header.Time,
435435
}, false

test/helpers/reorg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Reorg(t *testing.T, client *simulated.Backend, reorgSizeInBlocks uint64) {
3131
block, err := client.Client().BlockByNumber(ctx, big.NewInt(int64(currentBlockNum-reorgSizeInBlocks)))
3232
log.Debugf("reorging until block %d. Current block %d (before reorg)", block.NumberU64(), currentBlockNum)
3333
require.NoError(t, err)
34-
reorgFrom := block.Hash()
34+
reorgFrom := block.Header().RpcHash
3535
err = client.Fork(reorgFrom)
3636
require.NoError(t, err)
3737
}

0 commit comments

Comments
 (0)