Skip to content

Commit

Permalink
- migration work to multiverx organization
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianpascalau committed Jan 10, 2023
1 parent cf72a8c commit a9ec2b4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
env:
IMAGE_NODE: elrond-go-node-mainnet
REGISTRY_HOSTNAME: elrondnetwork
IMAGE_NODE: multiversx-node-mainnet
REGISTRY_HOSTNAME: multiversx

name: Build Docker image & push

Expand Down
25 changes: 7 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
<div style="text-align:center">
<img
src="https://raw.githubusercontent.com/ElrondNetwork/elrond-go/master/elrond_logo_01.svg"
alt="Elrond Network">
src="https://raw.githubusercontent.com/multiversx/mx-chain-go/master/multiversx-logo.svg"
alt="MultiversX">
</div>
<br>

<br>

[![](https://img.shields.io/badge/made%20by-Elrond%20Network-blue.svg?style=flat-square)](http://elrond.com/)
[![](https://img.shields.io/badge/project-Elrond%20Network%20Mainnet-blue.svg?style=flat-square)](http://elrond.com/)
[![](https://img.shields.io/badge/made%20by-MultiverX-blue.svg?style=flat-square)](http://multiversx.com/)
[![](https://img.shields.io/badge/project-MultiversX%20Mainnet-blue.svg?style=flat-square)](http://multiversx.com/)

# elrond-config for mainnet
# mx-chain config for mainnet

Elrond mainnet configuration files used in conjunction with elrond-go project.
For more info how to connect to the mainnet, please check [docs.elrond.com](https://docs.elrond.com/validators/mainnet/config-scripts/)

## run an elrond observer/validator with docker

### build docker image
```docker image build . -t elrond-node-image-last -f ./docker/Dockerfile```

### run node with docker
```
CONFIG_FOLDER=path/to/folder/with/pem/file
docker run --mount type=bind,source=${CONFIG_FOLDER}/,destination=/data elrond-node-image-last --validator-key-pem-file="/data/validatorKey.pem" --log-level *:DEBUG
```
MultiversX mainnet configuration files used in conjunction with mx-chain-go project.
For more info how to connect to the mainnet, please check [docs.multiversx.com](https://docs.multiversx.com/validators/nodes-scripts/config-scripts/)
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
SizeInBytes = 26214400 # 25MB per each pair (metachain, destinationShard)
Shards = 4

#PublicKeyPeerId represents the main cache used to map Elrond block signing public keys to their associated peer id's.
#PublicKeyPeerId represents the main cache used to map MultiversX block signing public keys to their associated peer id's.
[PublicKeyPeerId]
Name = "PublicKeyPeerId"
Capacity = 30000
Expand Down Expand Up @@ -817,7 +817,7 @@
FolderPath = "health-records"

[SoftwareVersionConfig]
StableTagLocation = "https://api.github.com/repos/ElrondNetwork/elrond-config-mainnet/releases/latest"
StableTagLocation = "https://api.github.com/repos/multiversx/mx-chain-mainnet-config/releases/latest"
PollingIntervalInMinutes = 65

[LogsAndEvents]
Expand Down
22 changes: 11 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM golang:1.17.6 as builder
MAINTAINER ElrondNetwork
MAINTAINER multiversx

RUN apt-get update && apt-get install -y

WORKDIR /config
COPY . .

WORKDIR /go
RUN git clone https://github.com/ElrondNetwork/elrond-go.git && cd elrond-go && git checkout --force $(cat /config/binaryVersion)
WORKDIR /go/elrond-go
RUN git clone https://github.com/multiversx/mx-chain-go.git && cd mx-chain-go && git checkout --force $(cat /config/binaryVersion)
WORKDIR /go/mx-chain-go

#Elrond node
WORKDIR /go/elrond-go/cmd/node
# MultiversX node
WORKDIR /go/mx-chain-go/cmd/node
RUN go build -i -v -ldflags="-X main.appVersion=$(git --git-dir /config/.git describe --tags --long --dirty)"
RUN cp /go/pkg/mod/github.com/!elrond!network/arwen-wasm-vm@$(cat /go/elrond-go/go.mod | grep arwen-wasm-vm | sed 's/.* //' | tail -n 1)/wasmer/libwasmer_linux_amd64.so /lib/libwasmer_linux_amd64.so
RUN cp /go/pkg/mod/github.com/!elrond!network/arwen-wasm-vm@$(cat /go/mx-chain-go/go.mod | grep arwen-wasm-vm | sed 's/.* //' | tail -n 1)/wasmer/libwasmer_linux_amd64.so /lib/libwasmer_linux_amd64.so

WORKDIR /config
RUN cp -r * /go/elrond-go/cmd/node/config/
RUN cp -r * /go/mx-chain-go/cmd/node/config/

WORKDIR /go/elrond-go/cmd/node
WORKDIR /go/mx-chain-go/cmd/node

# ===== SECOND STAGE ======
FROM ubuntu:22.04
RUN apt-get update -y && apt-get upgrade -y
COPY --from=builder "/go/elrond-go/cmd/node" "/go/elrond-go/cmd/node/"
COPY --from=builder "/go/mx-chain-go/cmd/node" "/go/mx-chain-go/cmd/node/"
COPY --from=builder "/lib/libwasmer_linux_amd64.so" "/lib/libwasmer_linux_amd64.so"
WORKDIR /go/elrond-go/cmd/node/
WORKDIR /go/mx-chain-go/cmd/node/
EXPOSE 8080
ENTRYPOINT ["/go/elrond-go/cmd/node/node", "--rest-api-interface=:8080"]
ENTRYPOINT ["/go/mx-chain-go/cmd/node/node", "--rest-api-interface=:8080"]
4 changes: 2 additions & 2 deletions p2p.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
#If the initial peers list is left empty, the node will not try to connect to other peers during initial bootstrap
#phase but will accept connections and will do the network discovery if another peer connects to it
InitialPeerList = [
"/dns4/gondor.mainnet.elrond.com/tcp/10000/p2p/16Uiu2HAmQihd2Di6JrDCRf6bnxXEmgfFy8C3S7WDnq7WNXscfkrG",
"/dns4/isengard.mainnet.elrond.com/tcp/10000/p2p/16Uiu2HAkxWoEwkkxMfUgi2CkxjWkZ7cccjvh4V57gxUQQC6c45N6",
"/dns4/seed1.mainnet.multiversx.com/tcp/10000/p2p/16Uiu2HAmQihd2Di6JrDCRf6bnxXEmgfFy8C3S7WDnq7WNXscfkrG",
"/dns4/seed2.mainnet.multiversx.com/tcp/10000/p2p/16Uiu2HAkxWoEwkkxMfUgi2CkxjWkZ7cccjvh4V57gxUQQC6c45N6",
"/ip4/188.166.192.50/tcp/10000/p2p/16Uiu2HAmT2rqgzWYnFe7YL4poyjXvKhGtrwkhaAibSDFCjGATDZ7",
"/ip4/188.166.203.198/tcp/10000/p2p/16Uiu2HAmJeuEEczm6kLyBKAJQobVn7ARmGFQ5mPrbNVsjdhJz9s1",
]
Expand Down
6 changes: 3 additions & 3 deletions scripts/run-observer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ cd ..

TAG_FROM_BINARY=$(cat binaryVersion)
#check if the tag binaryVersion file exits on the github
TAG_EXITS=$(git ls-remote https://github.com/ElrondNetwork/elrond-go.git "${TAG_FROM_BINARY}")
TAG_EXITS=$(git ls-remote https://github.com/multiversx/mx-chain-go.git "${TAG_FROM_BINARY}")
if [ -z "${TAG_EXITS}" ]; then
echo "tag from binaryVersion file(${TAG_FROM_BINARY}) does not exit"
exit 1
fi

# build docker image
export IMAGE_NAME=elrond-node-image-test
export IMAGE_NAME=multiversx-node-image-test
docker image build . -t ${IMAGE_NAME} -f ./docker/Dockerfile

# generate a new BLS key
OUTPUT_FOLDER=~/output/keys
if [ ! -f "${OUTPUT_FOLDER}/validatorKey.pem" ]; then
mkdir -p ${OUTPUT_FOLDER}
docker run --rm --mount type=bind,source=${OUTPUT_FOLDER},destination=/keys --workdir /keys elrondnetwork/elrond-go-keygenerator:latest
docker run --rm --mount type=bind,source=${OUTPUT_FOLDER},destination=/keys --workdir /keys multiversx/mx-chain-keygenerator:latest
fi

## run docker image
Expand Down

0 comments on commit a9ec2b4

Please sign in to comment.