From e0dccf5c53a7918e877bb4450f472985711aa4ec Mon Sep 17 00:00:00 2001 From: Vid Kersic <38610409+Vid201@users.noreply.github.com> Date: Sun, 12 May 2024 17:48:56 +0200 Subject: [PATCH] feat: silius v0.7.0 (#55) * feat: silius v0.7.0 --- README.md | 2 +- bundlers/silius/.env | 2 +- bundlers/silius/p2p-boot.yml-v06 | 33 +++++++++++++++++++++++++++++++ bundlers/silius/p2p-boot/node-enr | 1 + bundlers/silius/p2p-boot/node-key | 1 + bundlers/silius/p2p-peer.yml-v06 | 25 +++++++++++++++++++++++ bundlers/silius/p2p-peer/node-enr | 1 + bundlers/silius/p2p-peer/node-key | 2 ++ bundlers/silius/silius.yml | 28 ++++++++++++++++++++++++++ bundlers/silius/silius.yml-v06 | 6 ++++-- tests/silius-silius.env | 4 ++++ tests/silius-skandha.env | 5 +++++ tests/skandha-silius.env | 6 ++++++ 13 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 bundlers/silius/p2p-boot.yml-v06 create mode 100644 bundlers/silius/p2p-boot/node-enr create mode 100644 bundlers/silius/p2p-boot/node-key create mode 100644 bundlers/silius/p2p-peer.yml-v06 create mode 100644 bundlers/silius/p2p-peer/node-enr create mode 100644 bundlers/silius/p2p-peer/node-key create mode 100644 bundlers/silius/silius.yml create mode 100644 tests/silius-silius.env create mode 100644 tests/silius-skandha.env create mode 100644 tests/skandha-silius.env diff --git a/README.md b/README.md index a310f1c..f78aa73 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Each bundler to run has a folder and yml file [./bundlers](./bundlers) folder - see the `runbundler/.env` for global settings, like `FUND` for funded addresses. - The bundler-specific RPC calls (eth_ and debug_) should be exposed on `BUNDLER_URL` - To test bundler startup script: - * `./runbundler/runbundler.sh {./runblers/aabundler/aabundler.yml} start` - start the bundler (along with node, and deployed contract) + * `./runbundler/runbundler.sh {./bundlers/aabundler/aabundler.yml} start` - start the bundler (along with node, and deployed contract) * `down` - stop all docker images. * (or any other docker-compose command, such as `logs`) diff --git a/bundlers/silius/.env b/bundlers/silius/.env index 2a7063d..c4f869d 100644 --- a/bundlers/silius/.env +++ b/bundlers/silius/.env @@ -1 +1 @@ -BUNDLER_ACCOUNT=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ No newline at end of file +BOOT_ENR=enr:-Iu4QKWfapgYurSypiE8Oa1ZdOyK8lC2BLytkihEd-b5QwWtd-szKPuncudIbUUQ9wHMhZk-cbzTsEUxS4QiTtrYKPwBgmlkgnY0gmlwhMCoZGWJc2VjcDI1NmsxoQJEdmi_LPA0b8j2BHHDsyGi_Y086wDplSGNVe96M4sWnIN0Y3CCIyiDdWRwgiMo \ No newline at end of file diff --git a/bundlers/silius/p2p-boot.yml-v06 b/bundlers/silius/p2p-boot.yml-v06 new file mode 100644 index 0000000..1aaa46f --- /dev/null +++ b/bundlers/silius/p2p-boot.yml-v06 @@ -0,0 +1,33 @@ +services: + bundler: + ports: [ "3000:3000" ] + image: ghcr.io/silius-rs/silius:latest + command: node + --eth-client-address $ETH_RPC_URL + --datadir data/silius + --mnemonic-file /root/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + --entry-points $ENTRYPOINT + --http --http.addr 0.0.0.0 + --http.port 3000 + --http.api eth,debug,web3 + --poll-interval "5" + --enable-p2p + --p2p.addr $BUNDLER_IP + --p2p.baddr $BUNDLER_IP + volumes: + - ./keys:/root + - ./p2p-boot:/data/silius/p2p + networks: + default: + p2p: + ipv4_address: $BUNDLER_IP + + bundler-verify: + image: docker + # volumes: + # - /var/run/docker.sock:/var/run/docker.sock + depends_on: + bundler: + condition: service_started + command: echo docker exec runbundler-bundler-1 cat /data/silius/p2p/node-enr \ No newline at end of file diff --git a/bundlers/silius/p2p-boot/node-enr b/bundlers/silius/p2p-boot/node-enr new file mode 100644 index 0000000..4273c44 --- /dev/null +++ b/bundlers/silius/p2p-boot/node-enr @@ -0,0 +1 @@ +enr:-Iu4QKWfapgYurSypiE8Oa1ZdOyK8lC2BLytkihEd-b5QwWtd-szKPuncudIbUUQ9wHMhZk-cbzTsEUxS4QiTtrYKPwBgmlkgnY0gmlwhMCoZGWJc2VjcDI1NmsxoQJEdmi_LPA0b8j2BHHDsyGi_Y086wDplSGNVe96M4sWnIN0Y3CCIyiDdWRwgiMo \ No newline at end of file diff --git a/bundlers/silius/p2p-boot/node-key b/bundlers/silius/p2p-boot/node-key new file mode 100644 index 0000000..b2d8077 --- /dev/null +++ b/bundlers/silius/p2p-boot/node-key @@ -0,0 +1 @@ + ‚Å!4}ÍÏâ@;²ÍÓv‡Â|™ù rCç<ƒÏˆRdÕ \ No newline at end of file diff --git a/bundlers/silius/p2p-peer.yml-v06 b/bundlers/silius/p2p-peer.yml-v06 new file mode 100644 index 0000000..97cfa66 --- /dev/null +++ b/bundlers/silius/p2p-peer.yml-v06 @@ -0,0 +1,25 @@ +services: + bundler: + ports: [ "3001:3000" ] + image: ghcr.io/silius-rs/silius:latest + command: node + --eth-client-address $ETH_RPC_URL + --datadir data/silius + --mnemonic-file /root/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + --entry-points $ENTRYPOINT + --http --http.addr 0.0.0.0 + --http.port 3000 + --http.api eth,debug,web3 + --poll-interval "5" + --enable-p2p + --bootnodes $BOOT_ENR + --p2p.addr $BUNDLER2_IP + --p2p.baddr $BUNDLER2_IP + volumes: + - ./keys:/root + - ./p2p-peer:/data/silius/p2p + networks: + default: + p2p: + ipv4_address: $BUNDLER2_IP \ No newline at end of file diff --git a/bundlers/silius/p2p-peer/node-enr b/bundlers/silius/p2p-peer/node-enr new file mode 100644 index 0000000..6f46f19 --- /dev/null +++ b/bundlers/silius/p2p-peer/node-enr @@ -0,0 +1 @@ +enr:-Iu4QBIlfz_fSAGGmUkgPxFEvv_kgplO49l08Rg-la7v1zJoDYqvvatwDLl4Rk6xGXt0-OAd9Jakg-P8LNfPna-cvwABgmlkgnY0gmlwhMCoZGaJc2VjcDI1NmsxoQOKdUBFbAaoQIlmcvxyt2qn3yEwQK5fA3AUKElwyK1Zg4N0Y3CCIyiDdWRwgiMo \ No newline at end of file diff --git a/bundlers/silius/p2p-peer/node-key b/bundlers/silius/p2p-peer/node-key new file mode 100644 index 0000000..9a52ce5 --- /dev/null +++ b/bundlers/silius/p2p-peer/node-key @@ -0,0 +1,2 @@ + ÇÝ%#JÁ +…cÏ”u!ÆLʆI¿ªÃÖ%evêà \ No newline at end of file diff --git a/bundlers/silius/silius.yml b/bundlers/silius/silius.yml new file mode 100644 index 0000000..5800e80 --- /dev/null +++ b/bundlers/silius/silius.yml @@ -0,0 +1,28 @@ +services: + bundler: + image: ghcr.io/silius-rs/silius:v07-latest + command: + - node + - --eth-client-address + - $ETH_RPC_URL + - --datadir + - data/silius + - --mnemonic-file + - /root/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + - --beneficiary + - "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" + - --entry-points + - $ENTRYPOINT + - --http + - --http.addr + - 0.0.0.0 + - --http.port + - "3000" + - --http.api + - eth,debug,web3 + - --poll-interval + - "5" + ports: [ '3000:3000' ] + volumes: + - ./keys:/root + diff --git a/bundlers/silius/silius.yml-v06 b/bundlers/silius/silius.yml-v06 index 451ccce..2168e55 100644 --- a/bundlers/silius/silius.yml-v06 +++ b/bundlers/silius/silius.yml-v06 @@ -2,13 +2,13 @@ services: bundler: image: ghcr.io/silius-rs/silius:latest command: - - bundler + - node - --eth-client-address - $ETH_RPC_URL - --datadir - data/silius - --mnemonic-file - - /root/${BUNDLER_ACCOUNT} + - /root/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 - --beneficiary - "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" - --entry-points @@ -20,6 +20,8 @@ services: - "3000" - --http.api - eth,debug,web3 + - --poll-interval + - "5" ports: [ '3000:3000' ] volumes: - ./keys:/root diff --git a/tests/silius-silius.env b/tests/silius-silius.env new file mode 100644 index 0000000..bf0faf9 --- /dev/null +++ b/tests/silius-silius.env @@ -0,0 +1,4 @@ +export BUNDLER_YML=bundlers/silius/p2p-boot.yml +export BUNDLER2_YML=bundlers/silius/p2p-peer.yml + +export ENVFILE=bundlers/silius/.env \ No newline at end of file diff --git a/tests/silius-skandha.env b/tests/silius-skandha.env new file mode 100644 index 0000000..f3f62f2 --- /dev/null +++ b/tests/silius-skandha.env @@ -0,0 +1,5 @@ +export BUNDLER_YML=bundlers/silius/p2p-boot.yml +export BUNDLER2_YML=bundlers/skandha/p2p-peer.yml + +# the peer should use this enr to connect to +export ENVFILE=bundlers/silius/.env \ No newline at end of file diff --git a/tests/skandha-silius.env b/tests/skandha-silius.env new file mode 100644 index 0000000..5a58c59 --- /dev/null +++ b/tests/skandha-silius.env @@ -0,0 +1,6 @@ +export BUNDLER_YML=bundlers/skandha/p2p-boot.yml +export BUNDLER2_YML=bundlers/silius/p2p-peer.yml + +#the skanha env file defines the BOOT_ENR that is exposed by p2p-boot. +# the peer should use this enr to connect to +export ENVFILE=bundlers/skandha/.env \ No newline at end of file