From 5839d10cc67f79cfc0c00f5cfb2bf06b6925bc29 Mon Sep 17 00:00:00 2001 From: pk910 Date: Wed, 25 Sep 2024 10:27:45 +0200 Subject: [PATCH] fix: update pectra contracts (#143) update pectra contracts ([EIP-7002](https://eips.ethereum.org/EIPS/eip-7002) & [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251)) to the latest compiled bytecode from https://github.com/lightclient/sys-asm/pull/17 TODO: * [x] update contract bytecode * [x] verify contract bytecode matches with upcoming EIP change * [x] update predeploy addresses according to upcoming EIP change --- apps/el-gen/genesis_besu.py | 8 ++++---- apps/el-gen/genesis_chainspec.py | 8 ++++---- apps/el-gen/genesis_geth.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/el-gen/genesis_besu.py b/apps/el-gen/genesis_besu.py index 2d3dd2c..d6773aa 100644 --- a/apps/el-gen/genesis_besu.py +++ b/apps/el-gen/genesis_besu.py @@ -111,19 +111,19 @@ "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460575767ffffffffffffffff5f3511605357600143035f3511604b575f35612000014311604b57611fff5f3516545f5260205ff35b5f5f5260205ff35b5f5ffd5b5f35611fff60014303165500" }, # EIP-7002: Execution layer triggerable withdrawals - "0x00A3ca265EBcb825B45F985A16CEFB49958cE017": { + "0x05F27129610CB42103b665629CB5c8C00296AaAa": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460a0573615156028575f545f5260205ff35b366038141561013f5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061013f57600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160b4575060105b5f5b81811460ed5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160b6565b910180921460fe5790600255610109565b90505f6002555f6003555b5f548061049d141561011857505f5b60015460028282011161012d5750505f610133565b01600290035b5f555f600155604c025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d" } }, # EIP-7251: Increase the MAX_EFFECTIVE_BALANCE - "0x00b42dbF2194e931E80326D950320f7d9Dbeac02": { + "0x00706203067988Ab3E2A2ab626EdCD6f28bDBbbb": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146098573615156028575f545f5260205ff35b36606014156101445760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061014457600154600101600155600354806004026004013381556001015f35815560010160203581556001016040359055600101600355005b6003546002548082038060011160ac575060015b5f5b81811460f15780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160ae565b9101809214610103579060025561010e565b90505f6002555f6003555b5f548061049d141561011d57505f5b6001546001828201116101325750505f610138565b01600190035b5f555f6001556074025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460a8573615156028575f545f5260205ff35b36606014156101555760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061015557600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060011160bc575060015b5f5b8181146101025780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160be565b9101809214610114579060025561011f565b90505f6002555f6003555b5f548061049d141561012e57505f5b6001546001828201116101435750505f610149565b01600190035b5f555f6001556074025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d" } diff --git a/apps/el-gen/genesis_chainspec.py b/apps/el-gen/genesis_chainspec.py index 339ff4c..754f0e0 100644 --- a/apps/el-gen/genesis_chainspec.py +++ b/apps/el-gen/genesis_chainspec.py @@ -158,19 +158,19 @@ "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460575767ffffffffffffffff5f3511605357600143035f3511604b575f35612000014311604b57611fff5f3516545f5260205ff35b5f5f5260205ff35b5f5ffd5b5f35611fff60014303165500" }, # EIP-7002: Execution layer triggerable withdrawals - "0x00A3ca265EBcb825B45F985A16CEFB49958cE017": { + "0x05F27129610CB42103b665629CB5c8C00296AaAa": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460a0573615156028575f545f5260205ff35b366038141561013f5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061013f57600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160b4575060105b5f5b81811460ed5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160b6565b910180921460fe5790600255610109565b90505f6002555f6003555b5f548061049d141561011857505f5b60015460028282011161012d5750505f610133565b01600290035b5f555f600155604c025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d" } }, # EIP-7251: Increase the MAX_EFFECTIVE_BALANCE - "0x00b42dbF2194e931E80326D950320f7d9Dbeac02": { + "0x00706203067988Ab3E2A2ab626EdCD6f28bDBbbb": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146098573615156028575f545f5260205ff35b36606014156101445760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061014457600154600101600155600354806004026004013381556001015f35815560010160203581556001016040359055600101600355005b6003546002548082038060011160ac575060015b5f5b81811460f15780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160ae565b9101809214610103579060025561010e565b90505f6002555f6003555b5f548061049d141561011d57505f5b6001546001828201116101325750505f610138565b01600190035b5f555f6001556074025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460a8573615156028575f545f5260205ff35b36606014156101555760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061015557600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060011160bc575060015b5f5b8181146101025780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160be565b9101809214610114579060025561011f565b90505f6002555f6003555b5f548061049d141561012e57505f5b6001546001828201116101435750505f610149565b01600190035b5f555f6001556074025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d" } diff --git a/apps/el-gen/genesis_geth.py b/apps/el-gen/genesis_geth.py index 1a5bdae..e663c6c 100644 --- a/apps/el-gen/genesis_geth.py +++ b/apps/el-gen/genesis_geth.py @@ -111,19 +111,19 @@ "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460575767ffffffffffffffff5f3511605357600143035f3511604b575f35612000014311604b57611fff5f3516545f5260205ff35b5f5f5260205ff35b5f5ffd5b5f35611fff60014303165500" }, # EIP-7002: Execution layer triggerable withdrawals - "0x00A3ca265EBcb825B45F985A16CEFB49958cE017": { + "0x05F27129610CB42103b665629CB5c8C00296AaAa": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460a0573615156028575f545f5260205ff35b366038141561013f5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061013f57600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160b4575060105b5f5b81811460ed5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160b6565b910180921460fe5790600255610109565b90505f6002555f6003555b5f548061049d141561011857505f5b60015460028282011161012d5750505f610133565b01600290035b5f555f600155604c025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d" } }, # EIP-7251: Increase the MAX_EFFECTIVE_BALANCE - "0x00b42dbF2194e931E80326D950320f7d9Dbeac02": { + "0x00706203067988Ab3E2A2ab626EdCD6f28bDBbbb": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146098573615156028575f545f5260205ff35b36606014156101445760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061014457600154600101600155600354806004026004013381556001015f35815560010160203581556001016040359055600101600355005b6003546002548082038060011160ac575060015b5f5b81811460f15780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160ae565b9101809214610103579060025561010e565b90505f6002555f6003555b5f548061049d141561011d57505f5b6001546001828201116101325750505f610138565b01600190035b5f555f6001556074025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460a8573615156028575f545f5260205ff35b36606014156101555760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061015557600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060011160bc575060015b5f5b8181146101025780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160be565b9101809214610114579060025561011f565b90505f6002555f6003555b5f548061049d141561012e57505f5b6001546001828201116101435750505f610149565b01600190035b5f555f6001556074025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d" }