Skip to content

Commit 2309794

Browse files
authored
update app name to emerald (#81)
* update app name to emerald * fix tests and lint
1 parent 5da10d8 commit 2309794

12 files changed

Lines changed: 128 additions & 133 deletions

File tree

.github/workflows/emerald.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ jobs:
5050
cargo build
5151
# `make all` equivalent but with --no-wait
5252
./scripts/generate_testnet_config.sh --nodes 3 --testnet-config-dir .testnet
53-
cargo run --bin malachitebft-eth-app -- testnet --home nodes --testnet-config .testnet/testnet_config.toml --log-level info
54-
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin malachitebft-eth-app show-pubkey {} > nodes/validator_public_keys.txt
55-
cargo run --bin malachitebft-eth-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
56-
docker compose up -d reth0 reth1 reth2 prometheus grafana otterscan
53+
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
54+
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
55+
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
56+
docker compose up -d
5757
./scripts/add_peers.sh --nodes 3
58-
bash scripts/spawn.bash --nodes 3 --home nodes --no-wait
58+
bash scripts/spawn.bash --nodes 3 --home nodes --no-delay --no-wait
5959
6060
- name: Upload test logs
6161
if: failure()

Cargo.lock

Lines changed: 85 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ redundant_clone = "deny"
4848
std_instead_of_core = "deny"
4949

5050
[workspace.dependencies]
51-
malachitebft-eth-app = { version = "0.0.1", path = "app" }
51+
emerald = { version = "0.0.1", path = "app" }
5252
malachitebft-eth-cli = { version = "0.0.1", path = "cli" }
5353
malachitebft-eth-engine = { version = "0.0.1", path = "engine" }
5454
malachitebft-eth-types = { version = "0.0.1", path = "types" }

Dockerfile

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,43 @@ FROM rust:1.90.0-bookworm AS build-env
22

33
ARG TAG
44

5-
ENV DEBIAN_FRONTEND=noninteractive
65
ENV CARGO_TERM_COLOR=never
76
ENV CARGO_TERM_PROGRESS_WHEN=never
87

98
WORKDIR /root
109

1110
RUN apt-get update -qq && \
1211
apt-get install -yqq --no-install-recommends \
13-
build-essential \
14-
ca-certificates \
15-
clang \
16-
git \
17-
libclang-dev \
18-
libssl-dev \
19-
llvm-dev \
20-
pkg-config \
21-
protobuf-compiler && \
12+
build-essential \
13+
ca-certificates \
14+
clang \
15+
git \
16+
libclang-dev \
17+
libssl-dev \
18+
llvm-dev \
19+
pkg-config \
20+
protobuf-compiler && \
2221
rm -rf /var/lib/apt/lists/*
2322

2423
COPY . /root
2524
RUN cargo build --release --locked
2625

27-
FROM debian:bookworm-slim
28-
29-
ENV DEBIAN_FRONTEND=noninteractive
26+
FROM debian:trixie-slim
3027

3128
RUN apt-get update -qq && \
3229
apt-get install -yqq --no-install-recommends \
33-
libssl-dev \
34-
ca-certificates && \
30+
libssl-dev \
31+
ca-certificates && \
3532
apt-get clean && \
3633
rm -rf /var/lib/apt/lists/*
3734

38-
COPY --chown=0:0 --from=build-env /root/target/release/malachitebft-eth-app /usr/local/bin/malachitebft-eth-app
39-
COPY --chown=0:0 --from=build-env /root/target/release/malachitebft-eth-utils /usr/local/bin/malachitebft-eth-utils
40-
41-
RUN useradd -m mbft -s /bin/bash
42-
WORKDIR /home/mbft
43-
USER mbft:mbft
35+
COPY --chown=0:0 --from=build-env /root/target/release/emerald /usr/local/bin/emerald
36+
COPY --chown=0:0 --from=build-env /root/target/release/emerald-utils /usr/local/bin/emerald-utils
4437

45-
VOLUME ["/home/mbft/.malachite"]
38+
RUN useradd -m emerald -s /bin/bash
39+
WORKDIR /home/emerald
40+
USER emerald:emerald
4641

47-
RUN mkdir -p /home/mbft/.emerald/config /home/mbft/.malachite
42+
RUN mkdir -p /home/emerald/.emerald
4843

49-
ENTRYPOINT ["/usr/local/bin/malachitebft-eth-app"]
44+
ENTRYPOINT ["/usr/local/bin/emerald"]

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
all: clean build
22
./scripts/generate_testnet_config.sh --nodes 3 --testnet-config-dir .testnet
3-
cargo run --bin malachitebft-eth-app -- testnet --home nodes --testnet-config .testnet/testnet_config.toml --log-level info
4-
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin malachitebft-eth-app show-pubkey {} > nodes/validator_public_keys.txt
5-
cargo run --bin malachitebft-eth-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
3+
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml --log-level info
4+
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
5+
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
66
docker compose up -d reth0 reth1 reth2 prometheus grafana otterscan
77
./scripts/add_peers.sh --nodes 3
88
@echo 👉 Grafana dashboard is available at http://localhost:3000
99
bash scripts/spawn.bash --nodes 3 --home nodes --no-delay
1010

1111
four: clean build
1212
./scripts/generate_testnet_config.sh --nodes 4 --testnet-config-dir .testnet
13-
cargo run --bin malachitebft-eth-app -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
14-
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin malachitebft-eth-app show-pubkey {} > nodes/validator_public_keys.txt
15-
cargo run --bin malachitebft-eth-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
13+
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
14+
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
15+
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
1616
docker compose up -d reth0 reth1 reth2 reth3 prometheus grafana otterscan
1717
./scripts/add_peers.sh --nodes 4
1818
@echo 👉 Grafana dashboard is available at http://localhost:3000
1919
bash scripts/spawn.bash --nodes 4 --home nodes --no-delay
2020

2121
sync: clean build
2222
./scripts/generate_testnet_config.sh --nodes 4 --testnet-config-dir .testnet
23-
cargo run --bin malachitebft-eth-app -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
24-
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin malachitebft-eth-app show-pubkey {} > nodes/validator_public_keys.txt
25-
cargo run --bin malachitebft-eth-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
23+
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
24+
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
25+
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt
2626
docker compose up -d
2727
./scripts/add_peers.sh --nodes 4
2828
@echo 👉 Grafana dashboard is available at http://localhost:3000
@@ -51,7 +51,7 @@ clean-prometheus: stop
5151
rm -rf ./monitoring/data-prometheus
5252

5353
spam:
54-
cargo run --bin malachitebft-eth-utils spam --time=60 --rate=5000 --rpc-url=127.0.0.1:8645
54+
cargo run --bin emerald-utils spam --time=60 --rate=5000 --rpc-url=127.0.0.1:8645
5555

5656
spam-contract:
5757
@if [ -z "$(CONTRACT)" ]; then \
@@ -66,7 +66,7 @@ spam-contract:
6666
echo "Example with args: make spam-contract CONTRACT=0x5FbDB... FUNCTION=\"setNumber(uint256)\" ARGS=\"12345\""; \
6767
exit 1; \
6868
fi; \
69-
cargo run --release --bin malachitebft-eth-utils spam-contract \
69+
cargo run --release --bin emerald-utils spam-contract \
7070
--contract="$(CONTRACT)" \
7171
--function="$(FUNCTION)" \
7272
--args="$(ARGS)" \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ Check out the metrics in the Grafana dashboards at http://localhost:3000.
310310
In a separate terminal, run the following command to send transactions during 60 seconds at a rate
311311
of 1000 tx/s to one of Reth RPC endpoints.
312312
```
313-
cargo run --bin malachitebft-eth-utils spam --time=60 --rate=1000
313+
cargo run --bin emerald-utils spam --time=60 --rate=1000
314314
```
315315

316316
> [!TIP]

app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "malachitebft-eth-app"
2+
name = "emerald"
33
version = { workspace = true }
44
edition = { workspace = true }
55
repository = { workspace = true }

scripts/restart_node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88

99
NODE=$1
1010
NODES_HOME="nodes"
11-
APP_BINARY="malachitebft-eth-app"
11+
APP_BINARY="emerald"
1212

1313
export RUST_BACKTRACE=full
1414

scripts/spawn-tmux.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ if [ -z "$NODES_COUNT" ] || [ -z "$NODES_HOME" ]; then
9595
fi
9696

9797
# Set defaults
98-
app_name=${app_name:-"malachitebft-eth-app"}
98+
app_name=${app_name:-"emerald"}
9999
profile=${profile:-false}
100100
debug=${debug:-false}
101101
lldb=${lldb:-false}

scripts/spawn.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [[ -z "$NODES_HOME" ]]; then
3535
fi
3636

3737
if [[ -z "$APP_BINARY" ]]; then
38-
APP_BINARY="malachitebft-eth-app"
38+
APP_BINARY="emerald"
3939
fi
4040

4141
echo "Compiling '$APP_BINARY'..."

0 commit comments

Comments
 (0)