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

Less logs and EC clients clean up #11

Merged
merged 34 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ba146f6
One EC client instead of two
vsuharnikov Sep 5, 2024
31b0f36
Logging decorator instead of LoggingBackend, filtering logs
vsuharnikov Sep 6, 2024
d24ccd6
ContractBlock.toString
vsuharnikov Sep 6, 2024
648e906
Additional filtration for eth_getLogs
vsuharnikov Sep 6, 2024
c5d18cd
local-network: better start
vsuharnikov Sep 6, 2024
631e59b
Less logs for getLogs
vsuharnikov Sep 6, 2024
4accec6
local-network: prepare for geth
vsuharnikov Sep 6, 2024
f53b8bc
geth as the second EC (WIP)
vsuharnikov Sep 9, 2024
12c1ae2
besu.yml, better directory structure, removed old files
vsuharnikov Sep 9, 2024
e9bf8a0
Additional keys for custom configurations
vsuharnikov Sep 9, 2024
3e2c8b6
Removed old unnecessary service
vsuharnikov Sep 9, 2024
d71bdaf
Updated dependencies
vsuharnikov Sep 9, 2024
51068b2
geth: logs in file, removed redundant options
vsuharnikov Sep 9, 2024
a0f06e6
Merged github/main
vsuharnikov Sep 9, 2024
f9703f5
Fixes after merge
vsuharnikov Sep 9, 2024
3737189
local-network: EC network settings fixes
vsuharnikov Sep 10, 2024
2dafd00
local-network: geth log rotation
vsuharnikov Sep 10, 2024
1063091
local-network: fixed geth sync issue, added ".hex" extension to secrets
vsuharnikov Sep 10, 2024
dc50363
local-network: bootnode to exchange peers information (WIP)
vsuharnikov Sep 11, 2024
a88e47d
local-network: bootnode address in one file
vsuharnikov Sep 11, 2024
670f312
local-network: bootnode logs and config in geth dir
vsuharnikov Sep 11, 2024
84ea22e
local-network: bootnode right IP inside script
vsuharnikov Sep 11, 2024
c8f28a0
local-network: local IPs, besu knowns its IP, ECs connect each other …
vsuharnikov Sep 11, 2024
2a991e6
local-network: removed unnecessary config record
vsuharnikov Sep 11, 2024
bb591a5
Merge github/main
vsuharnikov Sep 12, 2024
950b8f8
Fix
vsuharnikov Sep 12, 2024
30b47d2
Update dependencies
vsuharnikov Sep 12, 2024
933cfbe
local-network: common name of log files for different EC, waiting at …
vsuharnikov Sep 12, 2024
61f3eb7
local-network: a common config for Waves nodes
vsuharnikov Sep 12, 2024
ca45548
Merge remote-tracking branch 'github/main' into less-logs
vsuharnikov Sep 16, 2024
ce156b0
Generate JWT tokens
vsuharnikov Sep 16, 2024
7f6b92c
Fixed logs
vsuharnikov Sep 16, 2024
5822725
Fixes
vsuharnikov Sep 16, 2024
8be9518
local-network: wavesnode.yml
vsuharnikov Sep 16, 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
2 changes: 1 addition & 1 deletion local-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ See [./deploy](./deploy/).
* Address: `0xcF0b9E13FDd593f4Ca26D36aFCaA44dd3FDCCbeD`
* Private key: `ab49fee4fc326ecbc7abc7f2e5870bf1f86076eb0979c524e20c843f2a73f647`
* To see all information, run `npx tsx common-settings-show.ts` from [./deploy](./deploy/) directory.
* Ethereum addresses and private keys for `besu` nodes in [config](./configs/besu/generated/genesis.json):
* Ethereum addresses and private keys for `besu` nodes in [config](configs/ec-common/genesis.json):
* `fe3b557e8fb62b89f4916b721be55ceb828dbd73`: `8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63`
* `f17f52151EbEF6C7334FAD080c5704D77216b732`: `ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f`

Expand Down
3 changes: 0 additions & 3 deletions local-network/configs/besu/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Besu configs

Use [./generate-configs.sh](generate-configs.sh) to generate `genesis.json` and keys for nodes.
Note: it always generates new keys! So, don't use it if you don't need to add nodes.

## Manual connecting

Follow [https://besu.hyperledger.org/stable/private-networks/tutorials/permissioning](instructions):
Expand Down
41 changes: 0 additions & 41 deletions local-network/configs/besu/besu-2.conf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# /opt/besu belongs to besu user: https://github.com/hyperledger/besu/blob/main/docker/openjdk-17/Dockerfile
# so it is the only writable path
data-path = "/opt/besu/data"
genesis-file = "/config/generated/genesis.json"
node-private-key-file = "/config/generated/keys/0x71b67256532de0cb71609d1cf107744b7d0ed1bb/key"
genesis-file = "/genesis.json"
node-private-key-file = "/etc/secrets/p2p-key"

sync-mode = "FULL"
host-allowlist = ["*"]
Expand All @@ -20,24 +20,26 @@ rpc-http-enabled = true
rpc-http-host = "0.0.0.0"
rpc-http-port = 8545
rpc-http-cors-origins = ["*"]
# Disabled: ["EEA", "PRIV"]
rpc-http-api = ["ADMIN", "CLIQUE", "DEBUG", "ETH", "IBFT", "MINER", "NET", "PERM", "PLUGINS", "QBFT", "TRACE", "TXPOOL", "WEB3"]

engine-rpc-enabled = true
engine-rpc-port = 8551
engine-host-allowlist = ["*"]
engine-jwt-disabled = true

rpc-ws-enabled = true
rpc-http-api = ["ADMIN", "CLIQUE", "DEBUG", "EEA", "ETH", "IBFT", "MINER", "NET", "PERM", "PLUGINS", "PRIV", "QBFT", "TRACE", "TXPOOL", "WEB3"]
rpc-ws-api = ["ADMIN", "CLIQUE", "DEBUG", "ETH", "IBFT", "MINER", "NET", "PERM", "PLUGINS", "QBFT", "TRACE", "TXPOOL", "WEB3"]

p2p-enabled = true
p2p-interface = "0.0.0.0"
# p2p-host = "see run-besu.sh"
p2p-port = 30303

discovery-enabled = true
nat-method = "NONE"

Xdns-enabled = true
Xdns-update-enabled = true
bootnodes = [
"enode://b2ce9caff5e7472eafaf006904e2cb39cdd79801cda1328c510118cafdb0e9574526af6d05a89dae07a376606227c54c724cab1e88edf43190b7544976b275b8@besu-1:30303",
"enode://4e355eebfd77e5c2c0c20328c2bd5f3fde033c58e06e758c3e0a4ad88e8ced176f0d5eb32e214461b73e014591587f7c6567ee373e9c389b872a6d97d74a913c@besu-2:30303"
]
# bootnodes = [ see BESU_BOOTNODES in peers.env ]

tx-pool-max-future-by-sender = "1250"
12 changes: 12 additions & 0 deletions local-network/configs/besu/besu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
besu:
image: hyperledger/besu:latest # Debug version: besu-debug:latest , see _debug/
volumes:
- ../ec-common/genesis.json:/genesis.json:ro
- .:/config:ro
- ./run-besu.sh:/tmp/run.sh:ro
env_file:
- ../ec-common/peers.env
environment:
LOG4J_CONFIGURATION_FILE: /config/log4j2.xml
entrypoint: /tmp/run.sh
10 changes: 0 additions & 10 deletions local-network/configs/besu/generate-configs.sh

This file was deleted.

42 changes: 0 additions & 42 deletions local-network/configs/besu/generated/genesis.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions local-network/configs/besu/run-besu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env sh

IP=$(hostname -I)

# --p2p-host="ec-1" # Doesn't work: https://github.com/hyperledger/besu/issues/4380
besu \
--config-file=/config/besu.conf \
--p2p-host=${IP}
6 changes: 3 additions & 3 deletions local-network/configs/blockscout/backend/bs-backend.env
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
ETHEREUM_JSONRPC_VARIANT=besu
ETHEREUM_JSONRPC_HTTP_URL=http://besu-1:8545/
ETHEREUM_JSONRPC_HTTP_URL=http://ec-1:8545/
# ETHEREUM_JSONRPC_FALLBACK_HTTP_URL=
DATABASE_URL=postgresql://blockscout:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout
# DATABASE_QUEUE_TARGET
ETHEREUM_JSONRPC_TRACE_URL=http://besu:8545/
ETHEREUM_JSONRPC_TRACE_URL=http://ec-1:8545/
# ETHEREUM_JSONRPC_FALLBACK_TRACE_URL=
# ETHEREUM_JSONRPC_ETH_CALL_URL=
# ETHEREUM_JSONRPC_HTTP_TIMEOUT=
# CHAIN_TYPE=
NETWORK=
SUBNETWORK=Awesome chain
LOGO=/images/blockscout_logo.svg
ETHEREUM_JSONRPC_WS_URL=ws://besu-1:8546/
ETHEREUM_JSONRPC_WS_URL=ws://ec-1:8546/
ETHEREUM_JSONRPC_TRANSPORT=http
ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES=false
# ETHEREUM_JSONRPC_ARCHIVE_BALANCES_WINDOW=200
Expand Down
2 changes: 1 addition & 1 deletion local-network/configs/blockscout/enabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
depends_on:
- db
- redis
- besu-1
- ec-1
extends:
file: ./backend/backend.yml
service: backend
Expand Down
12 changes: 6 additions & 6 deletions local-network/configs/blockscout/nginx/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ services:
environment:
BACK_PROXY_PASS: ${BACK_PROXY_PASS:-http://bs-backend:4000}
FRONT_PROXY_PASS: ${FRONT_PROXY_PASS:-http://bs-frontend:3000}
BESU_RPC_PROXY_PASS: ${BESU_RPC_PROXY_PASS:-http://besu-1:8545}
BESU_WS_PROXY_PASS: ${BESU_WS_PROXY_PASS:-http://besu-1:8546}
BESU_RPC_PROXY_PASS: ${BESU_RPC_PROXY_PASS:-http://ec-1:8545}
BESU_WS_PROXY_PASS: ${BESU_WS_PROXY_PASS:-http://ec-1:8546}
WAVES_PROXY_PASS: ${WAVES_PROXY_PASS:-http://wavesnode-1:6869}
ports:
- '0.0.0.0:3000:3000'
- '0.0.0.0:3001:3001'
- '0.0.0.0:3002:3002'
- '0.0.0.0:10001:10001'
- '127.0.0.1:3000:3000'
- '127.0.0.1:3001:3001'
- '127.0.0.1:3002:3002'
- '127.0.0.1:10001:10001'
23 changes: 23 additions & 0 deletions local-network/configs/ec-common/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

DIR="$(cd "$(dirname "$0")" && pwd)"
cd "${DIR}" || exit

for N in {1..5}; do
p2p_file="p2p-key-${N}"
jwt_file="jwtsecret-${N}"

if [ ! -f "$p2p_file" ]; then
openssl rand 32 | xxd -p -c 32 > "$p2p_file"
echo "Created $p2p_file"
else
echo "$p2p_file already exists, skipping..."
fi

if [ ! -f "$jwt_file" ]; then
openssl rand 32 | xxd -p -c 32 > "$jwt_file"
echo "Created $jwt_file"
else
echo "$jwt_file already exists, skipping..."
fi
done
Loading