-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clients: add portal network client definitions (#977)
- Loading branch information
Showing
10 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG branch=amd64-master-latest | ||
|
||
FROM statusim/nimbus-fluffy:$branch | ||
|
||
ADD fluffy.sh /fluffy.sh | ||
RUN chmod +x /fluffy.sh | ||
|
||
RUN echo "latest" > /version.txt | ||
|
||
EXPOSE 8545 9009/udp | ||
|
||
ENTRYPOINT ["/fluffy.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Immediately abort the script on any error encountered | ||
set -e | ||
|
||
IP_ADDR=$(hostname -i | awk '{print $1}') | ||
FLAGS="" | ||
|
||
if [ "$HIVE_PORTAL_NETWORKS_SELECTED" != "" ]; then | ||
if [[ $HIVE_PORTAL_NETWORKS_SELECTED =~ "beacon" ]]; then | ||
# Providing atrusted block root is required currently to enable the beacon network. | ||
# It can be a made up value for now as tests are not doing any sync. | ||
FLAGS="$FLAGS --trusted-block-root:0x0000000000000000000000000000000000000000000000000000000000000000" | ||
fi | ||
fi | ||
|
||
|
||
if [ "$HIVE_CLIENT_PRIVATE_KEY" != "" ]; then | ||
FLAGS="$FLAGS --netkey-unsafe=0x$HIVE_CLIENT_PRIVATE_KEY" | ||
fi | ||
|
||
# Fluffy runs all networks by default, so we can not configure to run networks individually | ||
fluffy --rpc --rpc-address="0.0.0.0" --nat:extip:"$IP_ADDR" --network=none --log-level="debug" $FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM portalnetwork/trin:latest-bridge | ||
|
||
ADD https://raw.githubusercontent.com/ethereum/portal-spec-tests/master/tests/mainnet/history/hive/test_data_collection_of_forks_blocks.yaml /test_data_collection_of_forks_blocks.yaml | ||
ADD trin_bridge.sh /trin_bridge.sh | ||
RUN chmod +x /trin_bridge.sh | ||
|
||
ADD trin_bridge_version.sh /trin_bridge_version.sh | ||
RUN chmod +x /trin_bridge_version.sh | ||
|
||
RUN /trin_bridge_version.sh > /version.txt | ||
|
||
# Export the usual networking ports to allow outside access to the node | ||
EXPOSE 8545 9009/udp | ||
|
||
# add fake secrets for bridge activation | ||
ENV PANDAOPS_CLIENT_ID=xxx | ||
ENV PANDAOPS_CLIENT_SECRET=xxx | ||
|
||
ENTRYPOINT ["/trin_bridge.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Immediately abort the script on any error encountered | ||
set -e | ||
|
||
IP_ADDR=$(hostname -i | awk '{print $1}') | ||
FLAGS="" | ||
|
||
if [ "$HIVE_BOOTNODES" != "" ]; then | ||
FLAGS="$FLAGS --bootnodes=$HIVE_BOOTNODES" | ||
else | ||
echo "Warning: HIVE_BOOTNODES wasn't provided" | ||
exit 1 | ||
fi | ||
|
||
RUST_LOG=debug portal-bridge --node-count 1 $FLAGS --executable-path ./usr/bin/trin --mode test:/test_data_collection_of_forks_blocks.yaml --external-ip $IP_ADDR --epoch-accumulator-path . trin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# Immediately abort the script on any error encountered | ||
set -e | ||
|
||
#trin --version | tail -1 | sed "s/ /\//g" | ||
echo "latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ARG branch=latest | ||
|
||
FROM portalnetwork/trin:$branch | ||
|
||
ADD trin.sh /trin.sh | ||
RUN chmod +x /trin.sh | ||
|
||
ADD trin_version.sh /trin_version.sh | ||
RUN chmod +x /trin_version.sh | ||
|
||
RUN /trin_version.sh > /version.txt | ||
|
||
# Export the usual networking ports to allow outside access to the node | ||
EXPOSE 8545 9009/udp | ||
|
||
ENTRYPOINT ["/trin.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Immediately abort the script on any error encountered | ||
set -e | ||
|
||
IP_ADDR=$(hostname -i | awk '{print $1}') | ||
FLAGS="" | ||
|
||
if [ "$HIVE_CLIENT_PRIVATE_KEY" != "" ]; then | ||
FLAGS="$FLAGS --unsafe-private-key 0x$HIVE_CLIENT_PRIVATE_KEY" | ||
fi | ||
|
||
if [ "$HIVE_PORTAL_NETWORKS_SELECTED" != "" ]; then | ||
FLAGS="$FLAGS --networks $HIVE_PORTAL_NETWORKS_SELECTED" | ||
else | ||
FLAGS="$FLAGS --networks history" | ||
fi | ||
|
||
RUST_LOG=debug trin --web3-transport http --web3-http-address http://0.0.0.0:8545 --external-address "$IP_ADDR":9009 --bootnodes none $FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# Immediately abort the script on any error encountered | ||
set -e | ||
|
||
#trin --version | tail -1 | sed "s/ /\//g" | ||
echo "latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ghcr.io/ethereumjs/ultralight:latest | ||
|
||
COPY ultralight.sh /ultralight.sh | ||
RUN chmod +x /ultralight.sh | ||
|
||
RUN echo "latest" > /version.txt | ||
|
||
# Export the usual networking ports to allow outside access to the node | ||
EXPOSE 8545 9000/udp | ||
|
||
ENTRYPOINT ["/ultralight.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Immediately abort the script on any error encountered | ||
set -e | ||
|
||
IP_ADDR=$(hostname -i | awk '{print $1}') | ||
FLAGS="" | ||
|
||
if [ "$HIVE_CLIENT_PRIVATE_KEY" != "" ]; then | ||
FLAGS="$FLAGS --pk=0x1a2408021220$HIVE_CLIENT_PRIVATE_KEY" | ||
fi | ||
|
||
if [ "$HIVE_PORTAL_NETWORKS_SELECTED" != "" ]; then | ||
FLAGS="$FLAGS --networks=$HIVE_PORTAL_NETWORKS_SELECTED" | ||
else | ||
FLAGS="$FLAGS --networks=history" | ||
fi | ||
|
||
DEBUG=* node /ultralight/packages/cli/dist/index.js --bindAddress="$IP_ADDR:9000" --dataDir="./data" --rpcPort=8545 $FLAGS |