Skip to content

Commit 5f8e8f4

Browse files
authored
V2.1 (#25)
* v4.0.0-beta.10 * updator draft * removed temp kernel * create account 142873 * added validCaller * forge fmt * small touch on comments * validCaller changed * test for external call * renamed modifier * removed callcode test * forge fmt * added snapshot * custom errors * using gas() for prepay * removed unused copy * payable for gas optimization * using solady for optimization * forge fmt * cache storage for optimization * admin less erc 1967 optimization * unchecked blocks * validator to payable * using constant for gas optimization * removed return * via-ir for optimization * change in order of ecdsa validator to lower the gas cost * squeezing gas * more squeezing * removed exec * kernel helper in yul * more optimization * updated aa dependency * V2.1 optimize (#20) * factory merged with erc1967 minimal factory * Kernel Storage to abstract the initData setting * only one factory to decrease deployment gas * test cleanup to properly structure the test * removing killswitch test too * KernelLite PoC * files for setting a proper gas report * using memory directly to reduce gas * changed order for validator to reduce gas cost * optimize only * remove kernel lite gas report * internal functions for erc1967factory * change kernel sig order for validUntil and validAfter (#21) * forge fmt * fix: parsing typo and mode(1) * V2.1 session key (#22) * session Key debug done * foundry viaIr setting enabled * forge fmt * V2.1 stake factory (#23) * gas optimization by using memory for validateUserOp * optimization with calldata parsing * stake for factory * stake factory * report * fmt * removed unused file * session key now filters the operation * fix: using proper bytes for parsing operation * script for deploying kernel/kernel factory for v2.1 * script for deploying session key * deployed to all testnet * kilswitch (#24)
1 parent bc921a7 commit 5f8e8f4

File tree

113 files changed

+7865
-1650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+7865
-1650
lines changed

.gas-snapshot

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
AccountFactoryTest:testAccountFactory(uint256) (runs: 256, μ: 130276, ~: 130276)
2-
KernelTest:testKernel() (gas: 190)
1+
KernelExecutionTest:test_mode_2() (gas: 593614)
2+
KernelExecutionTest:test_mode_2() (gas: 611256)
3+
KernelExecutionTest:test_mode_2_1() (gas: 589400)
4+
KernelExecutionTest:test_mode_2_erc165() (gas: 2485466)
5+
KernelExecutionTest:test_revert_when_mode_disabled() (gas: 192767)
6+
KernelExecutionTest:test_sudo() (gas: 216219)
7+
KernelHelperTest:testIntersect(uint48,uint48,uint48,uint48) (runs: 256, μ: 2379, ~: 2383)
8+
KernelTest:test_disable_mode() (gas: 170757)
9+
KernelTest:test_disable_mode() (gas: 172824)
10+
KernelTest:test_external_call_default() (gas: 28844)
11+
KernelTest:test_external_call_execution() (gas: 520197)
12+
KernelTest:test_initialize_twice() (gas: 20515)
13+
KernelTest:test_initialize_twice() (gas: 20537)
14+
KernelTest:test_set_default_validator() (gas: 427634)
15+
KernelTest:test_set_default_validator() (gas: 429679)
16+
KernelTest:test_set_execution() (gas: 477930)
17+
KernelTest:test_set_execution() (gas: 479975)
18+
KernelTest:test_validate_signature() (gas: 171911)
19+
KernelTest:test_validate_signature() (gas: 175529)

broadcast/DeployKernel.s.sol/10200/run-1691520802.json

Lines changed: 102 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/10200/run-1691520809.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/10200/run-latest.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/420/run-1691518086.json

Lines changed: 102 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/420/run-1691518093.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/420/run-latest.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518329.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518368.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518391.json

Lines changed: 93 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518417.json

Lines changed: 93 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518464.json

Lines changed: 88 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518524.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518617.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518753.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518874.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691518988.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519086.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519223.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519403.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519415.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519428.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519899.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519919.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691519935.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-1691520179.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/421613/run-latest.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/43113/run-1691520462.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/43113/run-1691520484.json

Lines changed: 97 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/43113/run-1691520581.json

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/43113/run-latest.json

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/5/run-1691517811.json

Lines changed: 98 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/5/run-1691517818.json

Lines changed: 189 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/5/run-latest.json

Lines changed: 145 additions & 63 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/80001/run-1690749002.json

Lines changed: 122 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/80001/run-1690749009.json

Lines changed: 250 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/80001/run-1691515307.json

Lines changed: 53 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/80001/run-1691515320.json

Lines changed: 132 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x85DF6Dc686FBDcAc7da61651D116fc71B2246B50",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"type": "0x00",
12+
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
13+
"to": "0x85df6dc686fbdcac7da61651d116fc71b2246b50",
14+
"gas": "0x1da73",
15+
"value": "0x1",
16+
"data": "0x0396cb600000000000000000000000000000000000000000000000000000000000000001",
17+
"nonce": "0xe2"
18+
},
19+
"additionalContracts": [],
20+
"isFixedGasLimit": false
21+
}
22+
],
23+
"receipts": [],
24+
"libraries": [],
25+
"pending": [
26+
"0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058"
27+
],
28+
"returns": {},
29+
"timestamp": 1691515779,
30+
"chain": 80001,
31+
"multi": false,
32+
"commit": "95addde"
33+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x85DF6Dc686FBDcAc7da61651D116fc71B2246B50",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"type": "0x00",
12+
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
13+
"to": "0x85df6dc686fbdcac7da61651d116fc71b2246b50",
14+
"gas": "0x1da73",
15+
"value": "0x1",
16+
"data": "0x0396cb600000000000000000000000000000000000000000000000000000000000000001",
17+
"nonce": "0xe2"
18+
},
19+
"additionalContracts": [],
20+
"isFixedGasLimit": false
21+
}
22+
],
23+
"receipts": [
24+
{
25+
"transactionHash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
26+
"transactionIndex": "0x1b",
27+
"blockHash": "0x2072a740eb5d01f54ecb0a314ce2ab3428ef6e0c58aaa3ecceb6789f478371cc",
28+
"blockNumber": "0x24fbe2c",
29+
"from": "0x9775137314fE595c943712B0b336327dfa80aE8A",
30+
"to": "0x85DF6Dc686FBDcAc7da61651D116fc71B2246B50",
31+
"cumulativeGasUsed": "0x3f6450",
32+
"gasUsed": "0x14469",
33+
"contractAddress": null,
34+
"logs": [
35+
{
36+
"address": "0x0000000000000000000000000000000000001010",
37+
"topics": [
38+
"0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4",
39+
"0x0000000000000000000000000000000000000000000000000000000000001010",
40+
"0x0000000000000000000000009775137314fe595c943712b0b336327dfa80ae8a",
41+
"0x00000000000000000000000085df6dc686fbdcac7da61651d116fc71b2246b50"
42+
],
43+
"data": "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000014581ff258d0871e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014581ff258d0871d0000000000000000000000000000000000000000000000000000000000000001",
44+
"blockHash": "0x2072a740eb5d01f54ecb0a314ce2ab3428ef6e0c58aaa3ecceb6789f478371cc",
45+
"blockNumber": "0x24fbe2c",
46+
"transactionHash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
47+
"transactionIndex": "0x1b",
48+
"logIndex": "0x7c",
49+
"removed": false
50+
},
51+
{
52+
"address": "0x0000000000000000000000000000000000001010",
53+
"topics": [
54+
"0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4",
55+
"0x0000000000000000000000000000000000000000000000000000000000001010",
56+
"0x00000000000000000000000085df6dc686fbdcac7da61651d116fc71b2246b50",
57+
"0x0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789"
58+
],
59+
"data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000009041dfa1e9dc475b48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009041dfa1e9dc475b49",
60+
"blockHash": "0x2072a740eb5d01f54ecb0a314ce2ab3428ef6e0c58aaa3ecceb6789f478371cc",
61+
"blockNumber": "0x24fbe2c",
62+
"transactionHash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
63+
"transactionIndex": "0x1b",
64+
"logIndex": "0x7d",
65+
"removed": false
66+
},
67+
{
68+
"address": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
69+
"topics": [
70+
"0xa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01",
71+
"0x00000000000000000000000085df6dc686fbdcac7da61651d116fc71b2246b50"
72+
],
73+
"data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
74+
"blockHash": "0x2072a740eb5d01f54ecb0a314ce2ab3428ef6e0c58aaa3ecceb6789f478371cc",
75+
"blockNumber": "0x24fbe2c",
76+
"transactionHash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
77+
"transactionIndex": "0x1b",
78+
"logIndex": "0x7e",
79+
"removed": false
80+
},
81+
{
82+
"address": "0x0000000000000000000000000000000000001010",
83+
"topics": [
84+
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
85+
"0x0000000000000000000000000000000000000000000000000000000000001010",
86+
"0x0000000000000000000000009775137314fe595c943712b0b336327dfa80ae8a",
87+
"0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99"
88+
],
89+
"data": "0x00000000000000000000000000000000000000000000000000006ded25461fa40000000000000000000000000000000000000000000000001458c0b6b7c12c8d00000000000000000000000000000000000000000000104dd3240ec165ee9685000000000000000000000000000000000000000000000000145852c9927b0ce900000000000000000000000000000000000000000000104dd3247cae8b34b629",
90+
"blockHash": "0x2072a740eb5d01f54ecb0a314ce2ab3428ef6e0c58aaa3ecceb6789f478371cc",
91+
"blockNumber": "0x24fbe2c",
92+
"transactionHash": "0x1f4b33237a92b3f848a43afc6346f7ee23436e04edce6510503d439045197058",
93+
"transactionIndex": "0x1b",
94+
"logIndex": "0x7f",
95+
"removed": false
96+
}
97+
],
98+
"status": "0x1",
99+
"logsBloom": "0x00080000000000000000000000000000000000000000000000000010000000000000000000000020000200100000000000108000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000200000000080000000000000000000000000000000000004080800000000000000000000000000000000000000000000000000000000000000000080000000000241000000000000000000000000000000000000000000000000002000000004000000000000000000001001000000000000040000000800000108000001000000100000000000000000000000000000000000200000000000000000000100000",
100+
"type": "0x0",
101+
"effectiveGasPrice": "0x56bede15"
102+
}
103+
],
104+
"libraries": [],
105+
"pending": [],
106+
"returns": {},
107+
"timestamp": 1691515785,
108+
"chain": 80001,
109+
"multi": false,
110+
"commit": "95addde"
111+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x7c9dc5bc0bea4f4cab67f3b97734dcfef29e3be3e3d81cd9dd63193098bbecfe",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x85DF6Dc686FBDcAc7da61651D116fc71B2246B50",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"type": "0x00",
12+
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
13+
"to": "0x85df6dc686fbdcac7da61651d116fc71b2246b50",
14+
"gas": "0x10945",
15+
"value": "0x0",
16+
"data": "0xbb30a974000000000000000000000000d2063be7c610eb55492c05385743eddbf5b6b9510000000000000000000000000000000000000000000000000000000000000001",
17+
"nonce": "0xe4"
18+
},
19+
"additionalContracts": [],
20+
"isFixedGasLimit": false
21+
}
22+
],
23+
"receipts": [],
24+
"libraries": [],
25+
"pending": [
26+
"0x7c9dc5bc0bea4f4cab67f3b97734dcfef29e3be3e3d81cd9dd63193098bbecfe"
27+
],
28+
"returns": {},
29+
"timestamp": 1691517538,
30+
"chain": 80001,
31+
"multi": false,
32+
"commit": "06a62a2"
33+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x7c9dc5bc0bea4f4cab67f3b97734dcfef29e3be3e3d81cd9dd63193098bbecfe",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x85DF6Dc686FBDcAc7da61651D116fc71B2246B50",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"type": "0x00",
12+
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
13+
"to": "0x85df6dc686fbdcac7da61651d116fc71b2246b50",
14+
"gas": "0x10945",
15+
"value": "0x0",
16+
"data": "0xbb30a974000000000000000000000000d2063be7c610eb55492c05385743eddbf5b6b9510000000000000000000000000000000000000000000000000000000000000001",
17+
"nonce": "0xe4"
18+
},
19+
"additionalContracts": [],
20+
"isFixedGasLimit": false
21+
}
22+
],
23+
"receipts": [
24+
{
25+
"transactionHash": "0x7c9dc5bc0bea4f4cab67f3b97734dcfef29e3be3e3d81cd9dd63193098bbecfe",
26+
"transactionIndex": "0x1d",
27+
"blockHash": "0x25de694995c671749e9005775d6fe88e01f3b6e6da92360b28131e4fd259af66",
28+
"blockNumber": "0x24fc0ed",
29+
"from": "0x9775137314fE595c943712B0b336327dfa80aE8A",
30+
"to": "0x85DF6Dc686FBDcAc7da61651D116fc71B2246B50",
31+
"cumulativeGasUsed": "0x46d41e",
32+
"gasUsed": "0xb562",
33+
"contractAddress": null,
34+
"logs": [
35+
{
36+
"address": "0x0000000000000000000000000000000000001010",
37+
"topics": [
38+
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
39+
"0x0000000000000000000000000000000000000000000000000000000000001010",
40+
"0x0000000000000000000000009775137314fe595c943712b0b336327dfa80ae8a",
41+
"0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99"
42+
],
43+
"data": "0x00000000000000000000000000000000000000000000000000003f58e31cfe000000000000000000000000000000000000000000000000001453449ef89aa24f00000000000000000000000000000000000000000000104e05fb33993489c61000000000000000000000000000000000000000000000000014530546157da44f00000000000000000000000000000000000000000000104e05fb72f217a6c410",
44+
"blockHash": "0x25de694995c671749e9005775d6fe88e01f3b6e6da92360b28131e4fd259af66",
45+
"blockNumber": "0x24fc0ed",
46+
"transactionHash": "0x7c9dc5bc0bea4f4cab67f3b97734dcfef29e3be3e3d81cd9dd63193098bbecfe",
47+
"transactionIndex": "0x1d",
48+
"logIndex": "0xaa",
49+
"removed": false
50+
}
51+
],
52+
"status": "0x1",
53+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000010000000000000000000000020000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000200000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000080000000000201000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000000000000100000",
54+
"type": "0x0",
55+
"effectiveGasPrice": "0x59682f11"
56+
}
57+
],
58+
"libraries": [],
59+
"pending": [],
60+
"returns": {},
61+
"timestamp": 1691517545,
62+
"chain": 80001,
63+
"multi": false,
64+
"commit": "06a62a2"
65+
}

broadcast/DeployKernel.s.sol/80001/run-latest.json

Lines changed: 24 additions & 98 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/84531/run-1691520712.json

Lines changed: 102 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/84531/run-1691520719.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployKernel.s.sol/84531/run-latest.json

Lines changed: 193 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)