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

integration of geth connected to bartio #1892

Merged
merged 1 commit into from
Aug 13, 2024
Merged
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
27 changes: 27 additions & 0 deletions build/scripts/testing.mk
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,33 @@ start-geth: ## start an ephemeral `geth` node with docker
--datadir ${ETH_DATA_DIR} \
--ipcpath ${IPC_PATH}

start-geth-bartio:
rm -rf ${ETH_DATA_DIR}
docker run \
--rm -v $(PWD)/${TESTAPP_FILES_DIR}:/${TESTAPP_FILES_DIR} \
--rm -v $(PWD)/${BARTIO_NETWORK_FILES_DIR}:/${BARTIO_NETWORK_FILES_DIR} \
-v $(PWD)/.tmp:/.tmp \
ethereum/client-go init \
--datadir ${ETH_DATA_DIR} \
${BARTIO_ETH_GENESIS_PATH}
Comment on lines +128 to +134
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Missing Directory for Docker Volume Mount

The directory networks/80084, which is required for the Docker volume mount, does not exist. This will likely cause the Docker initialization process to fail due to missing files. Please ensure that this directory is created and contains the necessary files before running the Docker command.

  • Directory not found: networks/80084
Analysis chain

Check Docker volume mounts for initialization.

Ensure that the Docker volume mounts for ${TESTAPP_FILES_DIR} and ${BARTIO_NETWORK_FILES_DIR} are correct and necessary files are accessible during initialization.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify Docker volume mounts for initialization.

# Test: List files in the mounted directories inside the Docker container.
# Expect: Necessary files should be accessible.
docker run --rm -v $(PWD)/${TESTAPP_FILES_DIR}:/${TESTAPP_FILES_DIR} \
-v $(PWD)/${BARTIO_NETWORK_FILES_DIR}:/${BARTIO_NETWORK_FILES_DIR} \
ethereum/client-go ls /${TESTAPP_FILES_DIR} /${BARTIO_NETWORK_FILES_DIR}

Length of output: 287


Script:

#!/bin/bash
# Description: List files in the directories to verify necessary files are present.

# List files in the TESTAPP_FILES_DIR
echo "Files in ${TESTAPP_FILES_DIR}:"
ls -l ${TESTAPP_FILES_DIR}

# List files in the BARTIO_NETWORK_FILES_DIR
echo "Files in ${BARTIO_NETWORK_FILES_DIR}:"
ls -l ${BARTIO_NETWORK_FILES_DIR}

Length of output: 1981


Script:

#!/bin/bash
# Search for occurrences of TESTAPP_FILES_DIR and BARTIO_NETWORK_FILES_DIR in the codebase
rg 'TESTAPP_FILES_DIR|BARTIO_NETWORK_FILES_DIR'

Length of output: 2054


Script:

#!/bin/bash
# Description: List files in the specified directories to verify necessary files are present.

# List files in the TESTAPP_FILES_DIR
echo "Files in testing/files:"
ls -l testing/files

# List files in the BARTIO_NETWORK_FILES_DIR
echo "Files in networks/80084:"
ls -l networks/80084

Length of output: 794


docker run \
-p 30303:30303 \
-p 8545:8545 \
-p 8551:8551 \
--rm -v $(PWD)/${TESTAPP_FILES_DIR}:/${TESTAPP_FILES_DIR} \
--rm -v $(PWD)/${BARTIO_NETWORK_FILES_DIR}:/${BARTIO_NETWORK_FILES_DIR} \
-v $(PWD)/.tmp:/.tmp \
ethereum/client-go \
--http \
--http.addr 0.0.0.0 \
--http.api eth,net \
--authrpc.addr 0.0.0.0 \
--authrpc.jwtsecret $(JWT_PATH) \
--authrpc.vhosts "*" \
--datadir ${ETH_DATA_DIR} \
--ipcpath ${IPC_PATH}

start-geth-host: ## start a local ephemeral `geth` node on host machine
rm -rf ${ETH_DATA_DIR}
geth init --datadir ${ETH_DATA_DIR} ${ETH_GENESIS_PATH}
Expand Down
Loading