Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add third signer node #28

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions geth-poa/SignerNode3Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM golang:1.21-alpine AS builder

RUN apk add --no-cache gcc musl-dev linux-headers git make

COPY ../go.mod /go-ethereum/
COPY ../go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download

ADD .. /go-ethereum
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth

FROM alpine:latest

RUN apk add --no-cache jq

COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/

COPY geth-poa/genesis.json /genesis.json

COPY geth-poa/entrypoint.sh /entrypoint.sh

COPY geth-poa/signer-node3/keystore /data/keystore

RUN chmod +x /entrypoint.sh

EXPOSE 8545 6060 60601

ENTRYPOINT ["/entrypoint.sh"]
83 changes: 83 additions & 0 deletions geth-poa/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,90 @@ services:
}
]

sl-node3-keystore:
build:
context: ..
dockerfile: geth-poa/SignerNode3Dockerfile
environment:
- GETH_NODE_TYPE=signer
- BOOTNODE_ENDPOINT=enode://34a2a388ad31ca37f127bb9ffe93758ee711c5c2277dff6aff2e359bcf2c9509ea55034196788dbd59ed70861f523c1c03d54f1eabb2b4a5c1c129d966fe1e65@172.29.0.98:30301
- MEV_COMMIT_GETH_PASSWORD=${MEV_COMMIT_GETH_PASSWORD}
- NET_RESTRICT=172.29.0.0/16
networks:
primev_net:
ipv4_address: '172.29.0.99'
ports:
- 60602:60601
volumes:
- geth-data-node1:/data
profiles:
- settlement-keystore
labels:
com.datadoghq.ad.check_names: '["openmetrics"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: |
[
{
"openmetrics_endpoint": "http://%%host%%:6060/debug/metrics/prometheus",
"namespace": "geth-poa",
"metrics": [
"txpool*",
"trie*",
"system*",
"state*",
"rpc*",
"p2p*",
"eth*",
"chain*",
"clique*"
"vm*"
]
}
]

sl-node3:
build:
context: ..
dockerfile: geth-poa/Dockerfile
environment:
- GETH_NODE_TYPE=signer
- BLOCK_SIGNER_ADDRESS=0xd9cd8E5DE6d55f796D980B818D350C0746C25b97
- BLOCK_SIGNER_PRIVATE_KEY=${NODE3_PRIVATE_KEY}
- BOOTNODE_ENDPOINT=enode://34a2a388ad31ca37f127bb9ffe93758ee711c5c2277dff6aff2e359bcf2c9509ea55034196788dbd59ed70861f523c1c03d54f1eabb2b4a5c1c129d966fe1e65@172.29.0.98:30301
- NET_RESTRICT=172.29.0.0/16
networks:
primev_net:
ipv4_address: '172.29.0.99'
ports:
- 60602:60601
volumes:
- geth-data-node3:/data
profiles:
- settlement
labels:
com.datadoghq.ad.check_names: '["openmetrics"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: |
[
{
"openmetrics_endpoint": "http://%%host%%:6060/debug/metrics/prometheus",
"namespace": "geth-poa",
"metrics": [
"txpool*",
"trie*",
"system*",
"state*",
"rpc*",
"p2p*",
"eth*",
"chain*",
"clique*"
"vm*"
]
}
]

sl-node4:
build:
context: ..
dockerfile: geth-poa/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion geth-poa/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
--http.vhosts="*" \
--http.addr="$NODE_IP" \
--http.port="$RPC_PORT" \
--http.api=web3,debug,eth,txpool,net,engine,clique \
--http.api=web3,debug,eth,txpool,net,engine \
--ws \
--ws.addr="$NODE_IP" \
--ws.port="$WS_PORT" \
Expand Down
3 changes: 3 additions & 0 deletions geth-poa/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"788EBABe5c3dD422Ef92Ca6714A69e2eabcE1Ee4": {
"balance": "10000000000000000000000000000"
},
"f6ba5bca9b489de3a4ac3a57823d5d97d608feb9": {
"balance": "10000000000000000000000000000"
},
"0DCaa27B9E4Db92F820189345792f8eC5Ef148F6": {
"balance": "10000000000000000000000000000"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"f6ba5bca9b489de3a4ac3a57823d5d97d608feb9","crypto":{"cipher":"aes-128-ctr","ciphertext":"6e597c5d96715c65b553901870bada293b48ccaff16acc3fdc2cd079e825b590","cipherparams":{"iv":"21e6470f64880b7ecd239b866b38ea22"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"e1dbc70edf2ffc297147dea8e43d3f771fd0666a4c3e48e3fab4441e799379e3"},"mac":"6e7e711cf759512b896c219fd16231e6742dbd1377909b47e3cdc6d1bd7476c9"},"id":"2993a97e-af54-4c08-b282-72b0641cbe02","version":3}
Loading