Skip to content

Commit 4bcc468

Browse files
marioevzdanceratopz
authored andcommitted
fix(clis): update besu's exception mapper (SYSTEM_CONTRACT_EMPTY, INVALID_DEPOSIT_EVENT_LAYOUT) (ethereum#1487)
* fix(clis/besu): Add exception * Update besu.py * chore(clis): update besu exception mapper for 6110 `test_invalid_layout` * chore(clis): update besu `SYSTEM_CONTRACT_EMPTY` exception message --------- Co-authored-by: danceratopz <[email protected]>
1 parent 9c2aa6a commit 4bcc468

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ethereum_clis/clis/besu.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ class BesuExceptionMapper(ExceptionMapper):
247247
TransactionException.TYPE_4_TX_PRE_FORK: (
248248
"transaction invalid Transaction type DELEGATE_CODE is invalid"
249249
),
250-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: "Invalid deposit log",
251250
BlockException.RLP_STRUCTURES_ENCODING: (
252251
"Failed to decode transactions from block parameter"
253252
),
@@ -312,6 +311,10 @@ class BesuExceptionMapper(ExceptionMapper):
312311
BlockException.SYSTEM_CONTRACT_CALL_FAILED: (
313312
r"System call halted|System call did not execute to completion"
314313
),
314+
BlockException.SYSTEM_CONTRACT_EMPTY: (
315+
r"(Invalid system call, no code at address)|"
316+
r"(Invalid system call address:)"
317+
),
315318
TransactionException.INITCODE_SIZE_EXCEEDED: (
316319
r"transaction invalid Initcode size of \d+ exceeds maximum size of \d+"
317320
),
@@ -329,4 +332,8 @@ class BesuExceptionMapper(ExceptionMapper):
329332
TransactionException.NONCE_MISMATCH_TOO_LOW: (
330333
r"transaction invalid transaction nonce \d+ below sender account nonce \d+"
331334
),
335+
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: (
336+
r"Invalid (amount|index|pubKey|signature|withdrawalCred) (offset|size): "
337+
r"expected (\d+), but got (-?\d+)"
338+
),
332339
}

0 commit comments

Comments
 (0)