Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EIP-7002: add excess inhibitor logic #9040

Merged
merged 2 commits into from
Nov 18, 2024
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
145 changes: 63 additions & 82 deletions EIPS/eip-7002.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ def dequeue_withdrawal_requests():

def update_excess_withdrawal_requests():
previous_excess = sload(WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, EXCESS_WITHDRAWAL_REQUESTS_STORAGE_SLOT)
if previous_excess == EXCESS_INHIBITOR:
previous_excess = 0

count = sload(WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_COUNT_STORAGE_SLOT)

new_excess = 0
Expand All @@ -242,55 +245,29 @@ Each withdrawal request must appear in the EIP-7685 requests list in the order t
caller
push20 0xfffffffffffffffffffffffffffffffffffffffe
eq
push1 0xc7
jumpi

calldatasize
iszero
iszero
push1 0x28
jumpi

push0
sload
push0
mstore
push1 0x20
push0
return

jumpdest
calldatasize
push1 0x38
eq
iszero
push2 0x01f0
push1 0xcb
jumpi

push1 0x11
push0
sload
dup1
push32 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
eq
push2 0x01f0
push2 0x01f4
jumpi

push1 0x01
dup3
mul
push1 0x01
swap1
push0

jumpdest
push0
dup3
gt
iszero
push1 0x80
push1 0x68
jumpi

dup2
add
swap1
Expand All @@ -306,19 +283,38 @@ push1 0x01
add
swap2
swap1
push1 0x65
push1 0x4d
jump

jumpdest
swap1
swap4
swap1
div
swap3
pop
pop
pop
calldatasize
push1 0x38
eq
push1 0x88
jumpi
calldatasize
push2 0x01f4
jumpi
callvalue
push2 0x01f4
jumpi
push0
mstore
push1 0x20
push0
return
jumpdest
callvalue
lt
push2 0x01f0
push2 0x01f4
jumpi

push1 0x01
sload
push1 0x01
Expand Down Expand Up @@ -364,7 +360,6 @@ add
push1 0x03
sstore
stop

jumpdest
push1 0x03
sload
Expand All @@ -376,64 +371,60 @@ sub
dup1
push1 0x10
gt
push1 0xdb
push1 0xdf
jumpi

pop
push1 0x10

jumpdest
push0

jumpdest
dup2
dup2
eq
push2 0x017f
push2 0x0183
jumpi

dup1
push1 0x4c
mul
dup4
dup3
dup2
add
push1 0x03
mul
push1 0x04
add
dup1
sload
swap1
push1 0x01
add
dup1
sload
swap1
push1 0x01
add
dup2
push1 0x4c
mul
dup2
sload
swap2
push1 0x60
shl
dup4
dup2
mstore
dup3
push1 0x14
add
dup2
push1 0x01
add
sload
dup2
mstore
push1 0x20
add
swap1
push1 0x02
add
sload
dup1
push32 0xffffffffffffffffffffffffffffffff00000000000000000000000000000000
and
dup3
push1 0x34
add
mstore
swap1
push1 0x10
add
swap1
push1 0x40
shr
swap1
push1 0x44
add
dup2
push1 0x38
shr
Expand Down Expand Up @@ -486,24 +477,21 @@ mstore8
mstore8
push1 0x01
add
push1 0xdd
push1 0xe1
jump

jumpdest
swap2
add
dup1
swap3
eq
push2 0x0191
push2 0x0195
jumpi

swap1
push1 0x02
sstore
push2 0x019c
push2 0x01a0
jump

jumpdest
swap1
pop
Expand All @@ -513,20 +501,17 @@ sstore
push0
push1 0x03
sstore

jumpdest
push0
sload
dup1
push32 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
eq
iszero
push2 0x01c9
push2 0x01cd
jumpi

pop
push0

jumpdest
push1 0x01
sload
Expand All @@ -535,21 +520,18 @@ dup3
dup3
add
gt
push2 0x01de
push2 0x01e2
jumpi

pop
pop
push0
push2 0x01e4
push2 0x01e8
jump

jumpdest
add
push1 0x02
swap1
sub

jumpdest
push0
sstore
Expand All @@ -560,7 +542,6 @@ push1 0x4c
mul
push0
return

jumpdest
push0
push0
Expand All @@ -581,17 +562,17 @@ The withdrawal requests contract is deployed like any other smart contract. A sp
"maxPriorityFeePerGas": null,
"maxFeePerGas": null,
"value": "0x0",
"input": "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5f556101f480602d5f395ff33373fffffffffffffffffffffffffffffffffffffffe1460c7573615156028575f545f5260205ff35b36603814156101f05760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f057600182026001905f5b5f821115608057810190830284830290049160010191906065565b9093900434106101f057600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160db575060105b5f5b81811461017f5780604c02838201600302600401805490600101805490600101549160601b83528260140152807fffffffffffffffffffffffffffffffff0000000000000000000000000000000016826034015260401c906044018160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160dd565b9101809214610191579060025561019c565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101c957505f5b6001546002828201116101de5750505f6101e4565b01600290035b5f555f600155604c025ff35b5f5ffd",
"input": "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5f556101f880602d5f395ff33373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd",
"v": "0x1b",
"r": "0x539",
"s": "0x10e740537d4d36b9",
"hash": "0x1cd8bf929988b27b07ba1c7b898b396c08c484bb0db83fdeb992aa21b5cdf0ce"
"s": "0xeb793ed1dcd82833",
"hash": "0xe89c48ef3308192a0768aefaa5128559e68ab87b5b9a6d113824551867746a20"
}
```

```
Sender: 0x57B8c3C2766D0623EA0A499365A6f5A26aD38B47
Address: 0x09Fc772D0857550724b07B850a4323f39112aAaA
Sender: 0xa05D9eED37862daB22b002b8F6668B8Fb0c4D798
Address: 0x0c15F14308530b7CDB8460094BbB9cC28b9AaaAA
```

### Consensus layer
Expand Down
Loading
Loading