Skip to content

Commit d8a89cb

Browse files
authored
fix: check authorisation list for blocklisted address (#1898)
* check authorisation list for blocklisted address * v1.5.3 release * add changelog * fix lint
1 parent b9f7854 commit d8a89cb

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
## UNRELEASED
44

5+
56
*Oct 30, 2025*
67

8+
## v1.5.3
9+
10+
* [#1898](https://github.com/crypto-org-chain/cronos/pull/1898) Check authorisation list for blocklisted address.
11+
712
## v1.5.2
813

914
* [#1892](https://github.com/crypto-org-chain/cronos/pull/1892) fix: disable memiavl cache when optimistic execution is enabled.

app/block_address.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55

66
"github.com/crypto-org-chain/cronos/v2/x/cronos/types"
7+
evmtypes "github.com/evmos/ethermint/x/evm/types"
78

89
"cosmossdk.io/errors"
910

@@ -41,6 +42,25 @@ func (bad BlockAddressesDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
4142
}
4243
}
4344
}
45+
46+
// check EIP-7702 authorisation list
47+
for _, msg := range tx.GetMsgs() {
48+
msgEthTx, ok := msg.(*evmtypes.MsgEthereumTx)
49+
if ok {
50+
ethTx := msgEthTx.AsTransaction()
51+
if ethTx.SetCodeAuthorizations() != nil {
52+
for _, auth := range ethTx.SetCodeAuthorizations() {
53+
addr, err := auth.Authority()
54+
if err == nil {
55+
if _, ok := bad.blockedMap[sdk.AccAddress(addr.Bytes()).String()]; ok {
56+
return ctx, fmt.Errorf("signer is blocked: %s", addr.String())
57+
}
58+
}
59+
}
60+
}
61+
}
62+
}
63+
4464
admin := bad.getParams(ctx).CronosAdmin
4565
for _, msg := range tx.GetMsgs() {
4666
if blocklistMsg, ok := msg.(*types.MsgStoreBlockList); ok {

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
nativeByteOrder ? true, # nativeByteOrder mode will panic on big endian machines
1212
}:
1313
let
14-
version = "v1.5.2";
14+
version = "v1.5.3";
1515
pname = "cronosd";
1616
tags = [
1717
"ledger"

0 commit comments

Comments
 (0)