Skip to content

Commit c35ec4b

Browse files
committed
bump go-ethereum rewrite & resync eip7702 tx authorities
1 parent f0a4c04 commit c35ec4b

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ require (
109109

110110
replace github.com/attestantio/go-eth2-client => github.com/attestantio/go-eth2-client v0.0.0-20240701211822-0a60485fce68
111111

112-
replace github.com/ethereum/go-ethereum => github.com/lightclient/go-ethereum v0.0.0-20240907155054-183e7b702a00
112+
replace github.com/ethereum/go-ethereum => github.com/MariusVanDerWijden/go-ethereum v0.0.0-20240909105731-23ae355c422d

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
22
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
33
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
44
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
5+
github.com/MariusVanDerWijden/go-ethereum v0.0.0-20240909105731-23ae355c422d h1:V3d3Nqf97+nI2f8fmCd2I9EcuxXyki+THjlObj5ok+o=
6+
github.com/MariusVanDerWijden/go-ethereum v0.0.0-20240909105731-23ae355c422d/go.mod h1:QeW+MtTpRdBEm2pUFoonByee8zfHv7kGp0wK0odvU1I=
57
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
68
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
79
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
@@ -168,8 +170,6 @@ github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7
168170
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
169171
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
170172
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
171-
github.com/lightclient/go-ethereum v0.0.0-20240907155054-183e7b702a00 h1:6fd42xMvs6JF4vN0SBB7bI1ILR4wHl53dn89YNsdpWY=
172-
github.com/lightclient/go-ethereum v0.0.0-20240907155054-183e7b702a00/go.mod h1:QeW+MtTpRdBEm2pUFoonByee8zfHv7kGp0wK0odvU1I=
173173
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
174174
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
175175
github.com/mashingan/smapping v0.1.19 h1:SsEtuPn2UcM1croIupPtGLgWgpYRuS0rSQMvKD9g2BQ=

pkg/coordinator/wallet/manager.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (manager *Manager) processBlockTransactions(block *execution.Block) {
9393
for idx, tx := range blockData.Transactions() {
9494
txFrom, err := ethtypes.Sender(signer, tx)
9595
if err != nil {
96-
manager.logger.Warnf("error decoding ts sender (block %v, tx %v): %v", block.Number, idx, err)
96+
manager.logger.Warnf("error decoding tx sender (block %v, tx %v): %v", block.Number, idx, err)
9797
continue
9898
}
9999

@@ -109,6 +109,22 @@ func (manager *Manager) processBlockTransactions(block *execution.Block) {
109109
toWallet.processTransactionReceival(block, tx)
110110
}
111111
}
112+
113+
if tx.Type() == ethtypes.SetCodeTxType {
114+
// in eip7702 transactions, the nonces of all authorities are increased by >= 1, so we need to resync all affected wallets
115+
for _, authorization := range tx.AuthList() {
116+
authority, err := authorization.Authority()
117+
if err != nil {
118+
manager.logger.Warnf("error decoding authority address (block %v, tx %v): %v", block.Number, idx, err)
119+
continue
120+
}
121+
122+
authorityWallet := wallets[authority]
123+
if authorityWallet != nil {
124+
authorityWallet.ResyncState()
125+
}
126+
}
127+
}
112128
}
113129

114130
for _, wallet := range wallets {

0 commit comments

Comments
 (0)