Skip to content

Commit

Permalink
Voltaire p2p (eth-infinitism#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherifahmed990 authored Dec 14, 2023
1 parent 3786fe1 commit 60c381c
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bundlers/voltaire/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#This is be the ENR exposed by they "boot" node, manually copied here to be fed into the peer node.
#TODO: sanity-check that the boot node indeed exposes this one..
BOOT_ENR="enr:-KS4QNlUZUve1inkwYD7QV8A2zQa00egYYWU5Xmd10fnfTJbcpOztDKQkex3FCx0_dQ2vDsFYTrKlL5SjrEeOTaTHCACgmlkgnY0gmlwhMCoZGWPbWVtcG9vbF9zdWJuZXRziAAAAAAAAAAAiXNlY3AyNTZrMaECjgz2W0XJr13pmU62SYFtDXdlhMbf6aYg_QdeJFav89yDdGNwgiMog3VkcIIjKA"
1 change: 1 addition & 0 deletions bundlers/voltaire/cache/enr.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enr:-KS4QI1R-FwtwyJfJb66GL_n4HxbQuvJKi_dUxJ8P4ZyA-UjfEgpT7VnYrv-MO85czOlxgcYLZ1qY4knbZcPH7sVJ4sCgmlkgnY0gmlwhMCoZGWPbWVtcG9vbF9zdWJuZXRziAAAAAAAAAAAiXNlY3AyNTZrMaECjgz2W0XJr13pmU62SYFtDXdlhMbf6aYg_QdeJFav89yDdGNwgiMog3VkcIIjKA
1 change: 1 addition & 0 deletions bundlers/voltaire/cache/key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��7����v� ����}^s=��闙Eپls
35 changes: 35 additions & 0 deletions bundlers/voltaire/p2p-boot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# start a standlone bundler for testing.
# bring up a the bundler with its own geth instance

#TODO: we assume that the boot bundler exposes BOOT_ENR
# need to EITHER receive ENR as parameter, or validate we generate exactly the same one.
services:

bundler:
ports: [ '3000:3000' ]
image: sherifahmed990/voltaire-bundler-p2p:a01
command: --entrypoints ${ENTRYPOINT}
--bundler_secret 0xc6cbc5ffad570fdad0544d1b5358a36edeb98d163b6567912ac4754e144d4edb
--chain_id 1337
--rpc_url 0.0.0.0
--verbose
--debug
--bundle_interval 0
--ethereum_node_url $ETH_RPC_URL
--p2p_enr_address $BUNDLER_IP
--p2p_enr_tcp_port 9000
--p2p_enr_udp_port 9000
networks:
default:
p2p:
ipv4_address: $BUNDLER_IP
volumes:
- ./cache/enr.dat:/app/cache/enr.dat
- ./cache/key:/app/cache/key

bundler-verify:
image: docker
depends_on:
bundler:
condition: service_started
command: echo docker exec runbundler-bundler-1 cat /app/cache/enr.dat
25 changes: 25 additions & 0 deletions bundlers/voltaire/p2p-peer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# start a standlone bundler for testing.
# bring up a the bundler with its own geth instance

services:

bundler:
ports: [ "3001:3000" ]
image: sherifahmed990/voltaire-bundler-p2p:a01
command: --entrypoints ${ENTRYPOINT}
--bundler_secret 0xc6cbc5ffad570fdad0544d1b5358a36edeb98d163b6567912ac4754e144d4edb
--chain_id 1337
--rpc_url 0.0.0.0
--verbose
--debug
--bundle_interval 0
--ethereum_node_url $ETH_RPC_URL
--p2p_enr_address $BUNDLER2_IP
--p2p_enr_tcp_port 9000
--p2p_enr_udp_port 9000
--p2p_boot_nodes_enr $BOOT_ENR
networks:
default:
p2p:
ipv4_address: $BUNDLER2_IP

6 changes: 6 additions & 0 deletions tests/skandha-voltaire.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export BUNDLER_YML=bundlers/skandha/p2p-boot.yml
export BUNDLER2_YML=bundlers/voltaire/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
6 changes: 6 additions & 0 deletions tests/voltaire-skandha.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export BUNDLER_YML=bundlers/voltaire/p2p-boot.yml
export BUNDLER2_YML=bundlers/skandha/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/voltaire/.env
6 changes: 6 additions & 0 deletions tests/voltaire-voltaire.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export BUNDLER_YML=bundlers/voltaire/p2p-boot.yml
export BUNDLER2_YML=bundlers/voltaire/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/voltaire/.env

0 comments on commit 60c381c

Please sign in to comment.