# Fusaka CFI'd EIPs Testing Implication Analysis
### - [EIP-5920: PAY opcode](https://eips.ethereum.org/EIPS/eip-5920)
##### - Testing (EEST)
🟡 Spencer, fairly simple to test but a lot of edge cases imho. No t8n tool changes only adding opcode to framework (single line). Some cases below but I assume we can all think of more.
- Functional semantics including zero/non-zero transfers.
- Precompile/system contract transfers.
- Static call revertion checks.
- Gas accounting cases (warm/cold/new accounts).
- Address in tx access list cases (treated as warm).
- Exceptional halt cases (insufficient funds or invalid address).
- Check reciever is added to access list case.
- Pre fork pay opcode doesn't work check.
- Stress test pay opcode cases, pay x call spamming with gas verifaction case.
- Pay inside 7702 tx, check delegated sender is debited.
- Selfdestruct (contract a to b) followed by pay (from contract b), the same but reversed.
- Create2/Selfdestruct/Pay edge cases.
Draft PR started but only basic cases: https://github.com/ethereum/execution-spec-tests/pull/1574
Probably want fuzzing running for this for a while too.
##### - Specs (EELS)
🟢 Spencer, going to jump in and say its likely simpler to implement compared to other EIPs. Copied from Guru's commit: https://github.com/spencer-tb/execution-specs/commit/bba905989fbbced524626f3e46b109f74f0ca6f7
✅ https://github.com/gurukamath/execution-specs/commit/102b15f37efbd1ba69d4285cf48b8e22df17c041
### - [EIP-7883: ModExp Gas Cost Increase](https://eips.ethereum.org/EIPS/eip-7883)
##### - Testing (EEST)
🟢/🟡 Spencer, although we don't have EIP-2565 tests within EEST (only ethereum/tests), to base this from, I feel that the edge cases are smaller. Ideally we'd do full coverage for EIP-2565 within EEST along the way hence the 🟡 (port refilled tests). Some cases below (not the complete set just a brain dump):
- Below threshold cases, still charges min gas amount.
- Above threshold cases, charges the floor divided value gas amount.
- Exactly equility cases: i.e 499, 500, 501, when min is 500.
- Byte length crossover cases, i.e 32 -> 33 bytes for base/mod/exp.
- Zero exponent cases still use min gas amount etc.
- Other identity/zero cases parameterized.
- Pre/post fork behaviour.
I propose we start with initial cases that verify the basics of 7883 gas accounting above for the first 2 devnets, then expand deeply aligning with new 2565 cases.
##### - Specs (EELS)
🟢 Sam: this is changing existing code with no side effects. Should be trivial to implement.
✅ https://github.com/gurukamath/execution-specs/commit/d01ae60366eeaee196e8c8d1474e362442ff6cab
### - [RIP-7212: Precompile for secp256r1 Curve Support](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md)
##### - Testing (EEST)
🔴 Mario: Same as EELS, this is cryptography and even if this a well known algorithm, adding libraries to all clients comes with potential interfacing issues in edge cases and for all of these we need to add tests.
##### - Specs (EELS)
🟡 Sam: one, it's cryptography. Two, we need a new library/implementation since coincurve doesn't support it.
### - [EIP-7762: Increase MIN_BASE_FEE_PER_BLOB_GAS](https://eips.ethereum.org/EIPS/eip-7762)
##### - Testing (EEST)
🟢 Mario - We already have parametrization for generating MIN_BASE_FEE_PER_BLOB_GAS covariant tests, so it's simply a matter of bumping this value for the given fork. The `excess_blob_gas` reset part is a bit more tricy since we don't have a way to signal the T8N tool that the state transition we are requesting is the fork block, but what we can do is, specifically for this fork transition test, hard-code the value reset before sending it to the t8n, which would simplify things for the t8n interface and for the EELS implementation.
##### - Specs (EELS)
🟢 Mario - Single line change, if we don't take into account the fork transition condition in EELS (there's currently no way of specifying whether the requested state transition is the fork block or not), but this can be deferred to EEST.
✅ https://github.com/gurukamath/execution-specs/commit/159438b97a278b57e6d45ffc3a8cb995d63f8fbc
### - [EIP-7823: Set upper bounds for MODEXP](https://eips.ethereum.org/EIPS/eip-7823)
##### - Testing (EEST)
🟢 Spencer, assuming this is alongside 7883 it shouldn't be hard/complex to test. We are just adding a boundary for the byte length inputs.
- Over 1024 bytes rejected cases, varied bytes, exp/base/mod.
- Exact boundary +/- 1/2/10, across exp/base/mod.
- Pre fork unlimited limit (ltd), post fork 1024 hard limit checks.
- Error gas accounting, burn all gas on rejection due to boundary breach.
##### - Specs (EELS)
🟢 Sam: trivial change to add length check
✅ https://github.com/gurukamath/execution-specs/commit/3b3693eac1394187ed3296a577636bad01e8bfef
### - [EIP-7825: Transaction Gas Limit Cap](https://eips.ethereum.org/EIPS/eip-7825)
##### - Testing (EEST)
🟡 Mario - Main impact is that there's a lot of tests that set arbitrarily high gas limits to perform testing, mainly the legacy static tests which we have not updated to python. Other than that, creating tests for this specific EIP is trivial (Intrinsic gas cost going above limit with all tx types, verify exception).
##### - Specs (EELS)
🟢 Mario - Introducing a new constant, and adding a simple verification before starting transaction execution (to be confirmed by EELS team).
✅ https://github.com/gurukamath/execution-specs/commit/ff62b32fb25fb3ba7d14d9259cb569e9aa37c930
### - [EIP-7907: Meter Contract Code Size And Increase Limit](https://eips.ethereum.org/EIPS/eip-7907)
##### - Testing (EEST)
🟡 Mario - Testing considerations for this EIP:
- Requires comprehensive verification of all cases in which a contract is accessed, both cold and warm variants for every case.
- Max-contract-size scenarios where the full 256KB are used to execute different operations exhaustively.
- Cross-functional testing, including newly introduced set code authorizations.
- Out-of-gas testing when this new gas cost (>24KB) is the cause of the execution running out of gas.
- Initcode tests introduced for EIP-3860 are now fork covariant.
- All tests that use max-code-size are now fork covariant and have to be reanalyzed in order to see if there are any new side-effects.
The EIP can also be considered underspecified:
- Are access list costs affected by this? It seems like they shouldn't because the intrinsic tx gas cost would depend on reading the state, but wouldn't this circumvent the purpose of the EIP? I.e. Adding a 256KB contract to the access list would pay the same cost as accesing a < 24KB contract.
- Are other opcodes accessing the account affected by this? `EXTCODEHASH`, `EXTCODESIZE`, `BALANCE`.
##### - Specs (EELS)
🟡 Sam: this isn't really a hard change, but our call graph for these functions is a bit of a mess. The risk here is making sure the same update is applied consistently
✅ https://github.com/gurukamath/execution-specs/commit/5aa92a2d0bc67870fdaa3feffb33c4f2d0de9692
### - [EIP-7917: Deterministic proposer lookahead](https://eips.ethereum.org/EIPS/eip-7917)
##### - Specs (Consensus-Specs)
✅ https://github.com/ethereum/consensus-specs/pull/4190
##### - Testing (Consensus-Specs)
🟢 Justin - Testing wise, the author has already done a pretty good job of including relevant spec tests in the PR. They did ask for additional testing suggestions (I gave a few) but if the testing team could suggest some more that would be great. The change is pretty simple, not a whole lot of edge cases IMO. I give this EIP a 60% chance of being included in Fusaka.
### - [EIP-7918: Blob base fee bounded by execution cost](https://eips.ethereum.org/EIPS/eip-7918)
##### - Testing (EEST)
🟢 Mario - We need to add a variant of the `excess_blob_gas` tests where `TX_BASE_COST * parent.base_fee_per_gas` exceeds `TARGET_BLOB_GAS_PER_BLOCK * get_base_fee_per_blob_gas(parent)`, and try to verify off-by-one scenarios with values as close as possible, but it should potentially not require complicated setup since all variables can be tweaked in the genesis.
Another good thing about the EIP with respect to testing is that the default values of the variables in the formula are `parent.base_fee_per_gas==7`, `TARGET_BLOB_GAS_PER_BLOCK==786_432` and the minimum value of `get_base_fee_per_blob_gas(parent)` is `1`, which means that the default behavior is the previous behavior, and therefore existing tests are unaffected.
##### - Specs (EELS)
🟢 Mario - Small amount of changes affecting a single function in the fork.
✅ https://github.com/gurukamath/execution-specs/commit/316343cc9cf578c6fd9facc0a5660eac0ab14afa
### - [EIP-7934: RLP Execution Block Size Limit](https://eips.ethereum.org/EIPS/eip-7934)
##### - Testing (EEST)
🟢 Mario - Similar to EIP-7825, there might be some tests affected to this but the ratio should be significantly lower since we normally don't create tests that contain such big blocks.
One thing to consider is that we don't convert to block rlp on all tests, such as in state tests, which I think should not be subjected to this limit, and blockchain test engine, where we encode the block to the JSON API format and skip RLP, but we could do the conversion in case we expect the error to verify it.
##### - Specs (EELS)