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

45 improper sourcing of nodekey #46

Merged
merged 6 commits into from
Nov 21, 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
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Docker

on:
push:
branches: [ "master", "development", "27-btc-sync-optimizations" ]
branches: [ "master", "development" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
Expand Down
34 changes: 17 additions & 17 deletions app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,29 +129,29 @@ impl App {
}

fn init_tracing(&self) {
// let rust_log_level = Level::from_str(
// std::env::var("RUST_LOG")
// .unwrap_or("info".to_string())
// .as_str(),
// )
// .unwrap();
let rust_log_level = Level::from_str(
std::env::var("RUST_LOG")
.unwrap_or("info".to_string())
.as_str(),
)
.unwrap();

let filter = EnvFilter::builder().from_env_lossy();
let filter = EnvFilter::builder().parse_lossy(rust_log_level.as_str());

let main_layer = tracing_subscriber::fmt::layer().with_target(true);

// let layers = if rust_log_level == Level::DEBUG || rust_log_level == Level::TRACE {
// vec![main_layer
// .with_file(true)
// .with_line_number(true)
// .with_filter(filter)
// .boxed()]
// } else {
// vec![main_layer.with_filter(filter).boxed()]
// };
let layers = if rust_log_level == Level::DEBUG || rust_log_level == Level::TRACE {
vec![main_layer
.with_file(true)
.with_line_number(true)
.with_filter(filter)
.boxed()]
} else {
vec![main_layer.with_filter(filter).boxed()]
};

tracing_subscriber::registry()
.with(vec![main_layer.with_filter(filter).boxed()])
.with(layers)
.init();
}

Expand Down
2 changes: 1 addition & 1 deletion commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ while true; do
fi
done

COMMIT_BODY=$(echo -e "$GIT_COMMIT_TYPE$BREAKING_CHANGE: $GIT_COMMIT_MESSAGE\n\n$BODY\n\nISSUE: $GITHUB_ISSUE\n")
COMMIT_BODY=$(echo -e "$GIT_COMMIT_TYPE$BREAKING_CHANGE: $GIT_COMMIT_MESSAGE\n\n$BODY\n\nISSUE: #$GITHUB_ISSUE\n")

echo -e "\n============================================================\n"

Expand Down
2 changes: 1 addition & 1 deletion etc/generate-jwt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# Borrowed from EthStaker's prepare for the merge guide
# See https://github.com/remyroy/ethstaker/blob/main/prepare-for-the-merge.md#configuring-a-jwt-token-file

Expand Down
2 changes: 1 addition & 1 deletion scripts/regtest_pegout.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_full_node.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_geth.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# Load utility functions from geth.sh
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
BASE_DIR=$(realpath "$SCRIPT_DIR/../")
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_network.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_reth.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/1_produce_signed_blocks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/../utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/2_merged_mining.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/../utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/3_peg_in.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/../utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/4_evm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/../utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/5_peg_out.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/../utils/shared.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/6_network_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# includes
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/../utils/shared.sh
Expand Down
13 changes: 12 additions & 1 deletion scripts/utils/geth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ function start_geth() {
local LOG_FILE=$(get_log_path $NUM)


# Define the file path
FILE_PATH="${BASE_DIR}/etc/data/execution/node_${NUM}/bootnode.key"

# Check if the file exists
if [ -f "$FILE_PATH" ]; then
# File exists, include the argument
ARGUMENT="--nodekey \"${BASE_DIR}/etc/data/execution/node_${NUM}/bootnode.key\""
else
# File does not exist, do not include the argument
ARGUMENT=""
fi
# rm -rf "${BASE_DIR}/etc/data/execution/node_${NUM}"
# mkdir -p "${BASE_DIR}/etc/data/execution/node_${NUM}" "${BASE_DIR}/etc/data/logs"
# touch "$LOG_FILE"
Expand Down Expand Up @@ -63,7 +74,7 @@ function start_geth() {
--metrics.expensive \
--miner.gasprice 1 \
--history.state 0 \
--nodekey "${BASE_DIR}/etc/data/execution/node_0/bootnode.key"
$ARGUMENT &
GETH_PIDS[$NUM]=$!
}

Expand Down
Loading