Skip to content

Commit

Permalink
Optimism CL P2P (#7297)
Browse files Browse the repository at this point in the history
Co-authored-by: lukasz.rozmej <[email protected]>
  • Loading branch information
2 people authored and rjnrohit committed Jan 11, 2025
1 parent f6cd53d commit 9c720ce
Show file tree
Hide file tree
Showing 18 changed files with 922 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Nethermind/Chains/base-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"create2DeployerAddress": "0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2",
"create2DeployerCode": "6080604052600436106100435760003560e01c8063076c37b21461004f578063481286e61461007157806356299481146100ba57806366cfa057146100da57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5061006f61006a366004610327565b6100fa565b005b34801561007d57600080fd5b5061009161008c366004610327565b61014a565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100c657600080fd5b506100916100d5366004610349565b61015d565b3480156100e657600080fd5b5061006f6100f53660046103ca565b610172565b61014582826040518060200161010f9061031a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604052610183565b505050565b600061015683836102e7565b9392505050565b600061016a8484846102f0565b949350505050565b61017d838383610183565b50505050565b6000834710156101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b815160000361025f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016101eb565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610156576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101eb565b60006101568383305b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b61014e806104ad83390190565b6000806040838503121561033a57600080fd5b50508035926020909101359150565b60008060006060848603121561035e57600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461039057600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156103df57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561040557600080fd5b818601915086601f83011261041957600080fd5b81358181111561042b5761042b61039b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156104715761047161039b565b8160405282815289602084870101111561048a57600080fd5b826020860160208301376000602084830101528095505050505050925092509256fe608060405234801561001057600080fd5b5061012e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460b1565b604e565b60405190815260200160405180910390f35b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16608857600060aa565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560c357600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff8116811460ed57600080fd5b80915050925092905056fea26469706673582212205ffd4e6cede7d06a5daf93d48d0541fc68189eeb16608c1999a82063b666eb1164736f6c63430008130033a2646970667358221220fdc4a0fe96e3b21c108ca155438d37c9143fb01278a3c1d274948bad89c564ba64736f6c63430008130033"
}
},
"OptimismCL": {
"sequencerP2PAddress": "0xAf6E19BE0F9cE7f8afd49a1824851023A8249e8a",
"nodes": ["/ip4/150.136.106.181/tcp/9222/p2p/16Uiu2HAkwJ9rhDQHogv1PB6yZtpu6QMZMuA7TjAYhNbVKQGrSkYB", "/ip4/45.42.140.30/tcp/21727/p2p/16Uiu2HAm4KH5k1Qkq2gEk74WhWvfunLJLSE7ptVaX5nGy7mdVR7g", "/ip4/54.198.153.150/tcp/9222/p2p/16Uiu2HAkwSnpTCP4f1ttHa2hKgiwZaa8TFJYWHtNNhYbqKwaYMRu", "/ip4/85.17.108.76/tcp/9222/p2p/16Uiu2HAm9bjq6bjVfQtM9SwGV7W3tC5NUaLJPsSBRn4SoqzCXhLq", "/ip4/35.173.48.199/tcp/9222/p2p/16Uiu2HAmHKzkXepNhPBmUrVNShk26WBvaZB5edjCNCpV5sza8Sgd", "/ip4/184.72.129.189/tcp/9222/p2p/16Uiu2HAm3qwgs4Bvfx1GJ5qnY4LjPbYCc394kvdjpxuJBsP3SQnW", "/ip4/184.73.87.196/tcp/9222/p2p/16Uiu2HAmAocWHkRKPsD4kN8pTEEpCqc576vu5nR19DoAfvKd8o8i", "/ip4/18.208.138.113/tcp/9222/p2p/16Uiu2HAmUcc9SxrGewq68TG4EoYB7noYqQrVr1yzinCVHqg4WRGF", "/ip4/173.231.41.130/tcp/9233/p2p/16Uiu2HAm8XHH6fhCh1hxiwCAMpak1rwnd6M53Pqe3AaUGiUZ5AG1", "/ip4/3.231.11.52/tcp/9222/p2p/16Uiu2HAkvLBTPqfA9HHXgnLUQiEJg7EKPb7gu7qMXfJFS79Goy3b", "/ip4/44.221.43.51/tcp/9333/p2p/16Uiu2HAmEGAgiKjz9MCPoEqU3KK9Xu9ZAhJBRoP6quzNKTMKpee9", "/ip4/3.220.145.177/tcp/9222/p2p/16Uiu2HAm31LCBALXkJfNGmK1tVkgzQDw9QQoNcFznzBBCYUPUhAD"]
}
},
"params": {
Expand Down Expand Up @@ -64,7 +68,7 @@
"eip4844TransitionTimestamp": "0x65f23e01",
"eip5656TransitionTimestamp": "0x65f23e01",
"eip6780TransitionTimestamp": "0x65f23e01",

"rip7212TransitionTimestamp": "0x668eb001",
"opGraniteTransitionTimestamp": "0x66e1be81",

Expand Down
4 changes: 4 additions & 0 deletions src/Nethermind/Chains/base-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"create2DeployerAddress": "0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2",
"create2DeployerCode": "6080604052600436106100435760003560e01c8063076c37b21461004f578063481286e61461007157806356299481146100ba57806366cfa057146100da57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5061006f61006a366004610327565b6100fa565b005b34801561007d57600080fd5b5061009161008c366004610327565b61014a565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100c657600080fd5b506100916100d5366004610349565b61015d565b3480156100e657600080fd5b5061006f6100f53660046103ca565b610172565b61014582826040518060200161010f9061031a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604052610183565b505050565b600061015683836102e7565b9392505050565b600061016a8484846102f0565b949350505050565b61017d838383610183565b50505050565b6000834710156101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b815160000361025f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016101eb565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610156576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101eb565b60006101568383305b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b61014e806104ad83390190565b6000806040838503121561033a57600080fd5b50508035926020909101359150565b60008060006060848603121561035e57600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461039057600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156103df57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561040557600080fd5b818601915086601f83011261041957600080fd5b81358181111561042b5761042b61039b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156104715761047161039b565b8160405282815289602084870101111561048a57600080fd5b826020860160208301376000602084830101528095505050505050925092509256fe608060405234801561001057600080fd5b5061012e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460b1565b604e565b60405190815260200160405180910390f35b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16608857600060aa565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560c357600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff8116811460ed57600080fd5b80915050925092905056fea26469706673582212205ffd4e6cede7d06a5daf93d48d0541fc68189eeb16608c1999a82063b666eb1164736f6c63430008130033a2646970667358221220fdc4a0fe96e3b21c108ca155438d37c9143fb01278a3c1d274948bad89c564ba64736f6c63430008130033"
}
},
"OptimismCL": {
"sequencerP2PAddress": "0xb830b99c95Ea32300039624Cb567d324D4b1D83C",
"nodes": ["/ip4/18.208.138.113/tcp/9222/p2p/16Uiu2HAmUcc9SxrGewq68TG4EoYB7noYqQrVr1yzinCVHqg4WRGF", "/ip4/44.221.43.51/tcp/9333/p2p/16Uiu2HAmEGAgiKjz9MCPoEqU3KK9Xu9ZAhJBRoP6quzNKTMKpee9", "/ip4/184.73.87.196/tcp/9222/p2p/16Uiu2HAmAocWHkRKPsD4kN8pTEEpCqc576vu5nR19DoAfvKd8o8i", "/ip4/150.136.106.181/tcp/9222/p2p/16Uiu2HAkwJ9rhDQHogv1PB6yZtpu6QMZMuA7TjAYhNbVKQGrSkYB", "/ip4/173.231.41.130/tcp/9233/p2p/16Uiu2HAm8XHH6fhCh1hxiwCAMpak1rwnd6M53Pqe3AaUGiUZ5AG1", "/ip4/45.42.140.30/tcp/21727/p2p/16Uiu2HAm4KH5k1Qkq2gEk74WhWvfunLJLSE7ptVaX5nGy7mdVR7g"]
}
},
"params": {
Expand Down
4 changes: 4 additions & 0 deletions src/Nethermind/Chains/op-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"create2DeployerAddress": "0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2",
"create2DeployerCode": "6080604052600436106100435760003560e01c8063076c37b21461004f578063481286e61461007157806356299481146100ba57806366cfa057146100da57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5061006f61006a366004610327565b6100fa565b005b34801561007d57600080fd5b5061009161008c366004610327565b61014a565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100c657600080fd5b506100916100d5366004610349565b61015d565b3480156100e657600080fd5b5061006f6100f53660046103ca565b610172565b61014582826040518060200161010f9061031a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604052610183565b505050565b600061015683836102e7565b9392505050565b600061016a8484846102f0565b949350505050565b61017d838383610183565b50505050565b6000834710156101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b815160000361025f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016101eb565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610156576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101eb565b60006101568383305b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b61014e806104ad83390190565b6000806040838503121561033a57600080fd5b50508035926020909101359150565b60008060006060848603121561035e57600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461039057600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156103df57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561040557600080fd5b818601915086601f83011261041957600080fd5b81358181111561042b5761042b61039b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156104715761047161039b565b8160405282815289602084870101111561048a57600080fd5b826020860160208301376000602084830101528095505050505050925092509256fe608060405234801561001057600080fd5b5061012e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460b1565b604e565b60405190815260200160405180910390f35b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16608857600060aa565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560c357600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff8116811460ed57600080fd5b80915050925092905056fea26469706673582212205ffd4e6cede7d06a5daf93d48d0541fc68189eeb16608c1999a82063b666eb1164736f6c63430008130033a2646970667358221220fdc4a0fe96e3b21c108ca155438d37c9143fb01278a3c1d274948bad89c564ba64736f6c63430008130033"
}
},
"OptimismCL": {
"sequencerP2PAddress": "0xAAAA45d9549EDA09E70937013520214382Ffc4A2",
"nodes": ["/ip4/23.92.177.87/tcp/20254/p2p/16Uiu2HAm4pKiPJoM8ub3jH9chumSpEfX5pCd8sm9njkzaH7mFUN3", "/ip4/144.76.158.143/tcp/30311/p2p/16Uiu2HAmEHh2HSzK3Ff9BYpzXch68guMytNyjKvogFLanaKCcUES", "/ip4/51.91.72.147/tcp/9003/p2p/16Uiu2HAmGXwim6g3kQd3tehvWtqab7JcvT4bWpkCAnhzY56vZubc", "/ip4/45.42.140.30/tcp/21727/p2p/16Uiu2HAm4KH5k1Qkq2gEk74WhWvfunLJLSE7ptVaX5nGy7mdVR7g", "/ip4/35.173.48.199/tcp/9222/p2p/16Uiu2HAmHKzkXepNhPBmUrVNShk26WBvaZB5edjCNCpV5sza8Sgd", "/ip4/5.39.71.166/tcp/9003/p2p/16Uiu2HAkw4vemhwxVdNa5VaudjBRnA4XRKUDZmrxynVHFgMrG84c", "/ip4/3.239.211.184/tcp/9222/p2p/16Uiu2HAkxFNPGjdqZXXTdUr9xHKUJyUZbXqZC1EgDqStG2RxxzZ8", "/ip4/34.71.206.92/tcp/9003/p2p/16Uiu2HAmNRGrco5LGvaGT8Q85eqCxwWeWGsbgw9cL6HFsTbyci7m", "/ip4/15.204.213.68/tcp/9003/p2p/16Uiu2HAmAAP78k6MEFKbZjFvwC2Syr86ePVKJGRa9eXeCqrnXiAq", "/ip4/116.202.215.20/tcp/9222/p2p/16Uiu2HAm6h61WPbW7tySjVqJsF1ArvQ5G2HWSGicNTh31TBdHcVB", "/ip4/142.132.209.114/tcp/21367/p2p/16Uiu2HAmA6ECeJPQGUrcEhF4XFvKkLJvpr2nHbkTL4hZ2777K3d3", "/ip4/85.17.108.76/tcp/9222/p2p/16Uiu2HAm9bjq6bjVfQtM9SwGV7W3tC5NUaLJPsSBRn4SoqzCXhLq", "/ip4/18.208.138.113/tcp/9222/p2p/16Uiu2HAmUcc9SxrGewq68TG4EoYB7noYqQrVr1yzinCVHqg4WRGF"]
}
},
"params": {
Expand Down
4 changes: 4 additions & 0 deletions src/Nethermind/Chains/op-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"create2DeployerAddress": "0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2",
"create2DeployerCode": "6080604052600436106100435760003560e01c8063076c37b21461004f578063481286e61461007157806356299481146100ba57806366cfa057146100da57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5061006f61006a366004610327565b6100fa565b005b34801561007d57600080fd5b5061009161008c366004610327565b61014a565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100c657600080fd5b506100916100d5366004610349565b61015d565b3480156100e657600080fd5b5061006f6100f53660046103ca565b610172565b61014582826040518060200161010f9061031a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604052610183565b505050565b600061015683836102e7565b9392505050565b600061016a8484846102f0565b949350505050565b61017d838383610183565b50505050565b6000834710156101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b815160000361025f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016101eb565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610156576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101eb565b60006101568383305b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b61014e806104ad83390190565b6000806040838503121561033a57600080fd5b50508035926020909101359150565b60008060006060848603121561035e57600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461039057600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156103df57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561040557600080fd5b818601915086601f83011261041957600080fd5b81358181111561042b5761042b61039b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156104715761047161039b565b8160405282815289602084870101111561048a57600080fd5b826020860160208301376000602084830101528095505050505050925092509256fe608060405234801561001057600080fd5b5061012e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460b1565b604e565b60405190815260200160405180910390f35b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16608857600060aa565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560c357600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff8116811460ed57600080fd5b80915050925092905056fea26469706673582212205ffd4e6cede7d06a5daf93d48d0541fc68189eeb16608c1999a82063b666eb1164736f6c63430008130033a2646970667358221220fdc4a0fe96e3b21c108ca155438d37c9143fb01278a3c1d274948bad89c564ba64736f6c63430008130033"
}
},
"OptimismCL": {
"sequencerP2PAddress": "0x57CACBB0d30b01eb2462e5dC940c161aff3230D3",
"nodes": ["/ip4/34.27.24.113/tcp/9003/p2p/16Uiu2HAmL7Zmt7uNr8eNJTi3hJVH1gb4eDfcmBN3fP2k9Lu7L5i4","/ip4/87.246.108.92/tcp/31900/p2p/16Uiu2HAkxuB7g9PaV6ekEo2yUCB5ocW4MPBrRtW5eXsAgccBSj1b", "/ip4/141.147.43.140/tcp/9222/p2p/16Uiu2HAmCKPsKd8wAJ993zzFHg2VLRrqQVsfFqG1PYv3NG5kB924", "/ip4/34.170.131.59/tcp/9003/p2p/6Uiu2HAmK7wyBpAEg2b7jXebgmNNtyCywHJKm4YaWYn6PMUoDHmC"]
}
},
"params": {
Expand Down
12 changes: 12 additions & 0 deletions src/Nethermind/Nethermind.Core/Address.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ public Address(byte[] bytes)
Bytes = bytes;
}

public Address(ReadOnlySpan<byte> bytes)
{
if (bytes.Length != Size)
{
throw new ArgumentException(
$"{nameof(Address)} should be {Size} bytes long and is {bytes.Length} bytes long",
nameof(bytes));
}

Bytes = bytes.ToArray();
}

public bool Equals(Address? other)
{
if (other is null)
Expand Down
5 changes: 5 additions & 0 deletions src/Nethermind/Nethermind.Core/Bloom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public Bloom(byte[] bytes)
Bytes = bytes;
}

public Bloom(ReadOnlySpan<byte> bytes)
{
Bytes = bytes.ToArray();
}

public byte[] Bytes { get; }

public void Set(ReadOnlySpan<byte> sequence)
Expand Down
203 changes: 203 additions & 0 deletions src/Nethermind/Nethermind.Optimism.Test/CL/PayloadDecoderTests.cs

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/Nethermind/Nethermind.Optimism/CL/CLConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core;

namespace Nethermind.Optimism.CL;

public class CLConfig : ICLConfig
{
public bool Enabled { get; set; } = false;
public string P2PHost { get; set; } = "127.0.0.1";
public int P2PPort { get; set; } = 3030;
public string? L1BeaconApiEndpoint { get; set; }
public string? L1EthApiEndpoint { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core;
using Nethermind.Specs.ChainSpecStyle;

namespace Nethermind.Optimism.CL;

public class CLChainSpecEngineParameters : IChainSpecEngineParameters
{
public Address? BatcherInboxAddress { get; set; }
public Address? BatcherAddress { get; set; }
public Address? SequencerP2PAddress { get; set; }
public string[]? Nodes { get; set; }
public string? EngineName => "OptimismCL";
public string? SealEngineType => null;
}
21 changes: 21 additions & 0 deletions src/Nethermind/Nethermind.Optimism/CL/ICLConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Config;
using Nethermind.Core;

namespace Nethermind.Optimism.CL;

public interface ICLConfig : IConfig
{
[ConfigItem(Description = "Use enshrined op cl.", DefaultValue = "false")]
bool Enabled { get; set; }
[ConfigItem(Description = "CL p2p communication host", DefaultValue = "127.0.0.1")]
public string P2PHost { get; set; }
[ConfigItem(Description = "CL p2p communication host", DefaultValue = "3030")]
public int P2PPort { get; set; }
[ConfigItem(Description = "URL to L1 beacon node", DefaultValue = "null")]
string? L1BeaconApiEndpoint { get; set; }
[ConfigItem(Description = "URL to L1 execution node.", DefaultValue = "null")]
string? L1EthApiEndpoint { get; set; }
}
Loading

0 comments on commit 9c720ce

Please sign in to comment.