Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

feat(repo): implement EIP-4844 in client #526

Merged
merged 90 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
91861bd
enable l1 eip4844
mask-pp Jan 22, 2024
9eb5c7d
Merge branch 'main' into eip4844
mask-pp Jan 22, 2024
dc54c0c
revert change
mask-pp Jan 22, 2024
d046f90
Add blob tx
mask-pp Jan 22, 2024
9a96b3f
add blob tx
mask-pp Jan 23, 2024
7aacb28
Merge remote-tracking branch 'origin/main' into eip4844
davidtaikocha Jan 23, 2024
4614b95
add blob tx
mask-pp Jan 23, 2024
b6ea3ad
feat(eip4844): Eip4844 blob tx (#527)
mask-pp Jan 23, 2024
ecdf4a7
order import
mask-pp Jan 23, 2024
03208c5
order import
mask-pp Jan 23, 2024
e7ac54b
fix lint
mask-pp Jan 23, 2024
57a39ef
update blob tx
mask-pp Jan 23, 2024
5244845
update blob tx
mask-pp Jan 23, 2024
847f6e5
feat: add l1 beacon client
davidtaikocha Jan 24, 2024
0b01116
update blob tx
mask-pp Jan 24, 2024
96d446e
Merge branch 'eip4844' into eip4844_blob_tx_2
mask-pp Jan 24, 2024
64020d1
feat(eip4844): update blob tx (#528)
mask-pp Jan 24, 2024
ee72a39
update blob tx
mask-pp Jan 24, 2024
5f122d1
use one blob tx
mask-pp Jan 24, 2024
87013ed
Merge branch 'main' into eip4844
mask-pp Jan 25, 2024
889e499
use eth_filltransaction
mask-pp Jan 25, 2024
14f00b2
Merge branch 'main' into eip4844
mask-pp Jan 25, 2024
f77b7ba
fix bug
mask-pp Jan 26, 2024
826ea30
fix bug
mask-pp Jan 26, 2024
8d4bb85
feat(eip4844): Eip4844 blob tx 3 (#536)
mask-pp Jan 26, 2024
a1497e3
Merge branch 'main' into eip4844
mask-pp Jan 26, 2024
b31213d
Merge branch 'main' into eip4844
davidtaikocha Jan 28, 2024
7ccc57d
add encode and decode func
mask-pp Jan 29, 2024
1689560
Merge branch 'main' into eip4844
davidtaikocha Jan 29, 2024
2bf0cc1
Merge branch 'main' into eip4844
davidtaikocha Jan 31, 2024
0c3d166
fix bug
mask-pp Feb 1, 2024
1a2580b
feat: update bindings
davidtaikocha Jan 31, 2024
b35a4ac
feat: update workflow
davidtaikocha Jan 31, 2024
5a1f999
feat: add l1 beacon client
davidtaikocha Jan 24, 2024
715df07
feat: add decoder
davidtaikocha Jan 25, 2024
ec9cc11
feat: update flags
davidtaikocha Jan 29, 2024
2ef72cd
update
davidtaikocha Jan 30, 2024
7f97017
feat: rename
davidtaikocha Feb 2, 2024
5a4c061
Merge branch 'main' into eip4844
davidtaikocha Feb 2, 2024
538a9c7
update docker
mask-pp Feb 2, 2024
f725fc1
fix overwritten
mask-pp Feb 2, 2024
a90a152
Merge branch 'eip4844' into eip4844_docker
mask-pp Feb 2, 2024
710bfc0
handle ports
mask-pp Feb 2, 2024
a97ee4b
update genesis.json
mask-pp Feb 2, 2024
6f1e9c9
use alpha-6_eip4844 branch
mask-pp Feb 2, 2024
45ebaf8
add genesis.json
mask-pp Feb 2, 2024
710ef14
ignore genesis.json
mask-pp Feb 2, 2024
d6523d6
update docker
mask-pp Feb 2, 2024
f8e5b36
enable blob docker (#542)
mask-pp Feb 2, 2024
34c5298
update docker
mask-pp Feb 2, 2024
5bcfeae
Merge branch 'main' into eip4844
davidtaikocha Feb 2, 2024
85e9bce
update docker compose
mask-pp Feb 3, 2024
245c373
update docker compose
mask-pp Feb 4, 2024
337bb0a
Merge branch 'eip4844' into alpha-6_docker_1
mask-pp Feb 4, 2024
8d83b93
Alpha 6 docker 1 (#544)
mask-pp Feb 4, 2024
7c117dc
add test flag
mask-pp Feb 4, 2024
6fbc16f
fix bug
mask-pp Feb 5, 2024
9637fa3
change replacement
mask-pp Feb 5, 2024
e6859c5
expose 3500 port
mask-pp Feb 5, 2024
8571f4a
update scripts
mask-pp Feb 5, 2024
0d3d561
update git ignore file
mask-pp Feb 5, 2024
fa5abaf
update scripts
mask-pp Feb 5, 2024
9cd0a5f
Merge branch 'main' into eip4844
mask-pp Feb 7, 2024
7b0da7e
update go mod
mask-pp Feb 7, 2024
6e19a32
Merge branch 'main' into eip4844
davidtaikocha Feb 7, 2024
cca1518
feat: add `kZGToVersionedHash`
davidtaikocha Feb 9, 2024
f62dffb
chore: update ci
davidtaikocha Feb 9, 2024
edf4b1a
feat: update blob.go
davidtaikocha Feb 9, 2024
5c6d0fe
feat: fix lint errors
davidtaikocha Feb 10, 2024
5eb8861
test: revert test changes, wait for anvil update
davidtaikocha Feb 10, 2024
568aa28
feat: update ci
davidtaikocha Feb 11, 2024
7a90069
upgrade sidecar encode and decode functions
mask-pp Feb 14, 2024
2011f1b
feat(all): sync state root rather than signal service's storage root
davidtaikocha Feb 14, 2024
d1f1d8f
feat: update tests
davidtaikocha Feb 14, 2024
be64dcc
feat: update tests
davidtaikocha Feb 14, 2024
1516230
Merge branch 'use-state-root' into eip4844
davidtaikocha Feb 14, 2024
3dc71af
test: fix lint error
davidtaikocha Feb 14, 2024
fe1ce39
feat: update flag usage
davidtaikocha Feb 14, 2024
08c2ad9
Merge branch 'main' into eip4844
davidtaikocha Feb 15, 2024
ac8849a
chore(ci): update workflow
davidtaikocha Feb 15, 2024
d1d2dba
Merge branch 'main' into eip4844
davidtaikocha Feb 15, 2024
3b567c9
chore(ci): update workflow
davidtaikocha Feb 15, 2024
041c98b
chore(ci): update workflow
davidtaikocha Feb 15, 2024
7405ba1
enable blob call
mask-pp Feb 15, 2024
44d64ac
add load env function
mask-pp Feb 16, 2024
0dab4e9
trigger ci
mask-pp Feb 16, 2024
f0e50e3
delete taiko-mono's ref
mask-pp Feb 16, 2024
233553d
use rpc.DecodeBlob function
mask-pp Feb 16, 2024
e2aa705
Merge branch 'main' into eip4844
davidtaikocha Feb 16, 2024
d9f492d
Merge branch 'main' into eip4844
mask-pp Feb 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docker
  • Loading branch information
mask-pp committed Feb 2, 2024
commit 538a9c717b60ed168b70f6a7fbd532bf4d8d5d4c
7 changes: 7 additions & 0 deletions internal/docker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
consensus/beacondata
consensus/genesis.ssz
consensus/validatordata
execution/geth
execution/geth.ipc
execution/genesis.json
taikogeth/taiko-geth
29 changes: 29 additions & 0 deletions internal/docker/consensus/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CONFIG_NAME: interop
PRESET_BASE: interop

# Genesis
GENESIS_FORK_VERSION: 0x20000089

# Altair
ALTAIR_FORK_EPOCH: 0
ALTAIR_FORK_VERSION: 0x20000090

# Merge
BELLATRIX_FORK_EPOCH: 0
BELLATRIX_FORK_VERSION: 0x20000091
TERMINAL_TOTAL_DIFFICULTY: 0

# Capella
CAPELLA_FORK_EPOCH: 0
CAPELLA_FORK_VERSION: 0x20000092
MAX_WITHDRAWALS_PER_PAYLOAD: 16

DENEB_FORK_EPOCH: 0
DENEB_FORK_VERSION: 0x20000093

# Time parameters
SECONDS_PER_SLOT: 3
SLOTS_PER_EPOCH: 3

# Deposit contract
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
186 changes: 186 additions & 0 deletions internal/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
version: "3.9"

services:
# Creates a genesis state for the beacon chain using a YAML configuration file and
# a deterministic set of 64 validators.
create-beacon-chain-genesis:
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:latest"
command:
- testnet
- generate-genesis
- --fork=deneb
- --num-validators=64
- --genesis-time-delay=15
- --output-ssz=/consensus/genesis.ssz
- --chain-config-file=/consensus/config.yml
- --geth-genesis-json-in=/execution/genesis.json
- --geth-genesis-json-out=/execution/genesis.json
volumes:
- ./consensus:/consensus
- ./execution:/execution

# Removes the database of the go-ethereum execution client to ensure we start from a clean state.
# (geth has a `removedb` option, but it asks for a keyboard confirmation, so we use this instead)
geth-remove-db:
image: "alpine:latest"
command: rm -rf /execution/geth
volumes:
- ./execution:/execution

# Sets up the genesis configuration for the go-ethereum client from a JSON file.
geth-genesis:
image: "ethereum/client-go:latest"
command: --datadir=/execution init /execution/genesis.json
volumes:
- ./execution:/execution
- ./execution/genesis.json:/execution/genesis.json
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
geth-remove-db:
condition: service_completed_successfully

# Runs a Prysm beacon chain from a specified genesis state created in the previous step
# and connects to go-ethereum in the same network as the execution client.
# The account used in go-ethereum is set as the suggested fee recipient for transactions
# proposed via the validators attached to the beacon node.
beacon-chain:
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:stable"
container_name: beacon-chain
command:
- --datadir=/consensus/beacondata
# No peers to sync with in this testnet, so setting to 0
- --min-sync-peers=0
- --genesis-state=/consensus/genesis.ssz
- --bootstrap-node=
- --interop-eth1data-votes
# The chain configuration file used for setting up Prysm
- --chain-config-file=/consensus/config.yml
# We specify the chain id used by our execution client
- --contract-deployment-block=0
- --chain-id=${CHAIN_ID:-32382}
- --rpc-host=0.0.0.0
- --grpc-gateway-host=0.0.0.0
- --execution-endpoint=http://geth:8551
- --accept-terms-of-use
- --jwt-secret=/execution/jwtsecret
- --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524
- --minimum-peers-per-subnet=0
- --enable-debug-rpc-endpoints
- --force-clear-db
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
ports:
- "4000"
volumes:
- ./consensus:/consensus
- ./execution:/execution
- ./execution/jwtsecret:/execution/jwtsecret

# Runs the go-ethereum execution client with the specified, unlocked account and necessary
# APIs to allow for proof-of-stake consensus via Prysm.
geth:
image: "ethereum/client-go:latest"
container_name: geth
command:
- --http
- --http.api=eth,net,web3
- --http.addr=0.0.0.0
- --http.corsdomain=*
- --ws
- --ws.api=eth,net,web3
- --ws.addr=0.0.0.0
- --ws.origins=*
- --authrpc.vhosts=*
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/execution/jwtsecret
- --datadir=/execution
- --allow-insecure-unlock
- --unlock=0x123463a4b065722e99115d6c222f267d9cabb524
- --password=/execution/geth_password.txt
- --nodiscover
- --syncmode=full
ports:
- "8545"
- "8546"
depends_on:
geth-genesis:
condition: service_completed_successfully
beacon-chain:
condition: service_started
volumes:
- ./execution:/execution
- ./execution/jwtsecret:/execution/jwtsecret
- ./execution/geth_password.txt:/execution/geth_password.txt

# We run a validator client with 64, deterministically-generated keys that match
# The validator keys present in the beacon chain genesis state generated a few steps above.
validator:
image: "gcr.io/prysmaticlabs/prysm/validator:stable"
container_name: validator
command:
- --beacon-rpc-provider=beacon-chain:4000
- --datadir=/consensus/validatordata
- --accept-terms-of-use
- --interop-num-validators=64
- --interop-start-index=0
- --chain-config-file=/consensus/config.yml
- --force-clear-db
depends_on:
beacon-chain:
condition: service_started
volumes:
- ./consensus:/consensus

l2_execution_engine:
container_name: l2_node
image: gcr.dockerproxy.com/evmchain/taiko-geth:taiko
restart: unless-stopped
pull_policy: always
volumes:
- ./taikogeth:/host
ports:
- "8545"
- "8546"
- "8551"
command:
- --nodiscover
- --gcmode
- archive
- --syncmode
- full
- --datadir
- /host/taiko-geth
- --networkid
- "167001"
- --metrics
- --metrics.expensive
- --metrics.addr
- "0.0.0.0"
- --http
- --http.addr
- "0.0.0.0"
- --http.vhosts
- "*"
- --http.corsdomain
- "*"
- --ws
- --ws.addr
- "0.0.0.0"
- --ws.origins
- "*"
- --authrpc.addr
- "0.0.0.0"
- --authrpc.port
- "8551"
- --authrpc.vhosts
- "*"
- --authrpc.jwtsecret
- /host/jwt.hex
- --allow-insecure-unlock
- --http.api
- admin,debug,eth,net,web3,txpool,miner,taiko
- --ws.api
- admin,debug,eth,net,web3,txpool,miner,taiko
- --taiko
1 change: 1 addition & 0 deletions internal/docker/execution/jwtsecret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0xfad2709d0bb03bf0e8ba3c99bea194575d3e98863133d1af638ed056d1d59345
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"123463a4b065722e99115d6c222f267d9cabb524","crypto":{"cipher":"aes-128-ctr","ciphertext":"93b90389b855889b9f91c89fd15b9bd2ae95b06fe8e2314009fc88859fc6fde9","cipherparams":{"iv":"9dc2eff7967505f0e6a40264d1511742"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"c07503bb1b66083c37527cd8f06f8c7c1443d4c724767f625743bd47ae6179a4"},"mac":"6d359be5d6c432d5bbb859484009a4bf1bd71b76e89420c380bd0593ce25a817"},"id":"622df904-0bb1-4236-b254-f1b8dfdff1ec","version":3}
68 changes: 0 additions & 68 deletions internal/docker/nodes/docker-compose.yml

This file was deleted.

7 changes: 6 additions & 1 deletion internal/docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

source scripts/common.sh

DOCKER_SERVICE_LIST=("l1_node" "l2_execution_engine")
DOCKER_INIT_LIST=("create-beacon-chain-genesis" "geth-remove-db" "geth-genesis")
DOCKER_SERVICE_LIST=("beacon-chain" "geth" "validator" "l2_execution_engine")

# start docker compose service list
echo "start docker compose service: ${DOCKER_SERVICE_LIST[*]}"

# Init docker
compose_up "${DOCKER_INIT_LIST[@]}"

# Start docker containers.
compose_up "${DOCKER_SERVICE_LIST[@]}"

# show all the running containers
Expand Down
9 changes: 8 additions & 1 deletion internal/docker/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

source scripts/common.sh

DOCKER_SERVICE_LIST=("l1_node" "l2_execution_engine")
DOCKER_SERVICE_LIST=("beacon-chain" "geth" "validator" "l2_execution_engine")

echo "stop docker compose service: ${DOCKER_SERVICE_LIST[*]}"

compose_down "${DOCKER_SERVICE_LIST[@]}"

# Delete exited containers.
docker rm $(docker ps -aqf "status=exited") 2>/dev/null

rm -rf ./consensus/beacondata ./consensus/validatordata ./consensus/genesis.ssz
rm -rf ./execution/geth
rm -rf taikogeth/taiko-geth
2 changes: 1 addition & 1 deletion scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RED='\033[1;31m'
NC='\033[0m' # No Color

COMPOSE="docker compose -f internal/docker/nodes/docker-compose.yml"
COMPOSE="docker compose -f internal/docker/docker-compose.yml"

print_error() {
local msg="$1"
Expand Down