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

Commit edf4b1a

Browse files
committed
feat: update blob.go
1 parent f62dffb commit edf4b1a

File tree

7 files changed

+20
-241
lines changed

7 files changed

+20
-241
lines changed

driver/txlist_fetcher/blob.go

+9-4
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@ func (d *BlobFetcher) Fetch(
3939
return nil, err
4040
}
4141

42-
log.Info("Fetch sidecars", "sidecars", sidecars)
42+
log.Info("Fetch sidecars", "slot", meta.L1Height+1, "sidecars", len(sidecars))
4343

44-
for _, sidecar := range sidecars {
45-
log.Info("Found sidecar", "KzgCommitment", sidecar.KzgCommitment, "blobHash", common.Bytes2Hex(meta.BlobHash[:]))
44+
for i, sidecar := range sidecars {
45+
log.Info(
46+
"Block sidecar",
47+
"index", i,
48+
"KzgCommitment", sidecar.KzgCommitment,
49+
"blobHash", common.Bytes2Hex(meta.BlobHash[:]),
50+
)
4651

4752
if kZGToVersionedHash(
48-
kzg4844.Commitment(common.Hex2Bytes(sidecar.KzgCommitment)[:]),
53+
kzg4844.Commitment(common.FromHex(sidecar.KzgCommitment)),
4954
) == common.BytesToHash(meta.BlobHash[:]) {
5055
return common.Hex2Bytes(sidecar.Blob), nil
5156
}

internal/docker/consensus/config.yml

-29
This file was deleted.

internal/docker/docker-compose.yml

+11-130
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,19 @@
11
version: "3.9"
22

33
services:
4-
# Creates a genesis state for the beacon chain using a YAML configuration file and
5-
# a deterministic set of 64 validators.
6-
create-beacon-chain-genesis:
7-
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:latest"
8-
command:
9-
- testnet
10-
- generate-genesis
11-
- --fork=deneb
12-
- --num-validators=64
13-
- --genesis-time-delay=15
14-
- --output-ssz=/consensus/genesis.ssz
15-
- --chain-config-file=/consensus/config.yml
16-
- --geth-genesis-json-in=/execution/genesis.json
17-
- --geth-genesis-json-out=/execution/genesis.json
18-
volumes:
19-
- ./consensus:/consensus
20-
- ./execution:/execution
21-
22-
# Removes the database of the go-ethereum execution client to ensure we start from a clean state.
23-
# (geth has a `removedb` option, but it asks for a keyboard confirmation, so we use this instead)
24-
geth-remove-db:
25-
image: "alpine:latest"
26-
command: rm -rf /execution/geth
27-
volumes:
28-
- ./execution:/execution
29-
30-
# Sets up the genesis configuration for the go-ethereum client from a JSON file.
31-
geth-genesis:
32-
image: "ethereum/client-go:v1.13.11"
33-
command: --datadir=/execution init /execution/genesis.json
34-
volumes:
35-
- ./execution:/execution
36-
- ./execution/genesis.json:/execution/genesis.json
37-
depends_on:
38-
create-beacon-chain-genesis:
39-
condition: service_completed_successfully
40-
geth-remove-db:
41-
condition: service_completed_successfully
42-
43-
# Runs a Prysm beacon chain from a specified genesis state created in the previous step
44-
# and connects to go-ethereum in the same network as the execution client.
45-
# The account used in go-ethereum is set as the suggested fee recipient for transactions
46-
# proposed via the validators attached to the beacon node.
47-
beacon-chain:
48-
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:stable"
49-
container_name: beacon-chain
50-
command:
51-
- --datadir=/consensus/beacondata
52-
# No peers to sync with in this testnet, so setting to 0
53-
- --min-sync-peers=0
54-
- --genesis-state=/consensus/genesis.ssz
55-
- --bootstrap-node=
56-
- --interop-eth1data-votes
57-
# The chain configuration file used for setting up Prysm
58-
- --chain-config-file=/consensus/config.yml
59-
# We specify the chain id used by our execution client
60-
- --contract-deployment-block=0
61-
- --chain-id=${CHAIN_ID:-32382}
62-
- --rpc-host=0.0.0.0
63-
- --grpc-gateway-host=0.0.0.0
64-
- --execution-endpoint=http://geth:8551
65-
- --accept-terms-of-use
66-
- --jwt-secret=/execution/jwtsecret
67-
- --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524
68-
- --minimum-peers-per-subnet=0
69-
- --enable-debug-rpc-endpoints
70-
- --force-clear-db
71-
depends_on:
72-
create-beacon-chain-genesis:
73-
condition: service_completed_successfully
74-
ports:
75-
- "3500"
76-
volumes:
77-
- ./consensus:/consensus
78-
- ./execution:/execution
79-
- ./execution/jwtsecret:/execution/jwtsecret
80-
81-
# Runs the go-ethereum execution client with the specified, unlocked account and necessary
82-
# APIs to allow for proof-of-stake consensus via Prysm.
83-
geth:
84-
image: "ethereum/client-go:v1.13.11"
85-
container_name: geth
86-
command:
87-
- --http
88-
- --http.addr=0.0.0.0
89-
- --http.corsdomain=*
90-
- --http.api=admin,debug,web3,eth,txpool,personal,miner,net
91-
- --ws
92-
- --ws.addr=0.0.0.0
93-
- --ws.origins=*
94-
- --ws.api=admin,debug,web3,eth,txpool,personal,miner,net
95-
- --authrpc.vhosts=*
96-
- --authrpc.addr=0.0.0.0
97-
- --authrpc.jwtsecret=/execution/jwtsecret
98-
- --datadir=/execution
99-
- --allow-insecure-unlock
100-
- --unlock=0x123463a4b065722e99115d6c222f267d9cabb524
101-
- --password=/execution/geth_password.txt
102-
- --nodiscover
103-
- --syncmode=full
104-
- --gcmode=archive
4+
l1_node:
5+
container_name: l1_node
6+
image: ghcr.dockerproxy.com/foundry-rs/foundry:latest
7+
restart: unless-stopped
8+
pull_policy: always
1059
ports:
10610
- "8545"
107-
- "8546"
108-
depends_on:
109-
geth-genesis:
110-
condition: service_completed_successfully
111-
beacon-chain:
112-
condition: service_started
113-
volumes:
114-
- ./execution:/execution
115-
- ./execution/jwtsecret:/execution/jwtsecret
116-
- ./execution/geth_password.txt:/execution/geth_password.txt
117-
118-
# We run a validator client with 64, deterministically-generated keys that match
119-
# The validator keys present in the beacon chain genesis state generated a few steps above.
120-
validator:
121-
image: "gcr.io/prysmaticlabs/prysm/validator:stable"
122-
container_name: validator
123-
command:
124-
- --beacon-rpc-provider=beacon-chain:4000
125-
- --datadir=/consensus/validatordata
126-
- --accept-terms-of-use
127-
- --interop-num-validators=64
128-
- --interop-start-index=0
129-
- --chain-config-file=/consensus/config.yml
130-
- --force-clear-db
131-
depends_on:
132-
beacon-chain:
133-
condition: service_started
134-
volumes:
135-
- ./consensus:/consensus
11+
entrypoint:
12+
- anvil
13+
- --host
14+
- "0.0.0.0"
15+
- --hardfork
16+
- "cancun"
13617

13718
l2_execution_engine:
13819
container_name: l2_node

0 commit comments

Comments
 (0)