Skip to content

Commit

Permalink
Merge pull request #821 from ergoplatform/mainnet
Browse files Browse the repository at this point in the history
Mainnet release
  • Loading branch information
catena2w authored Jun 28, 2019
2 parents 2b07dc5 + f44397f commit 0d077df
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 30 deletions.
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,30 @@ Available `networkId` options: `mainnet`, `testnet`, `devnet`.

## Docker Quick Start

Ergo has officially supported Docker package. To run Ergo as a console application with logs in console:
Ergo has officially supported Docker package. To run last Ergo version in mainnet as a console application with logs printed to console:

sudo docker run --rm -p 9020:9020 -p 9052:9052 -v ergo-testnet:/home/ergo/.ergo ergoplatform/ergo
sudo docker run --rm -p 9030:9030 -p 9053:9053 -v /path/on/host/to/ergo/data:/home/ergo/.ergo ergoplatform/ergo --mainnet

This will connect to Ergo testnet with default config and open ports `9020` and `9052` on host system. All data will be stored in your named Docker volume `ergo-testnet`.
This will connect to Ergo mainnet with default config and open ports `9030` and `9053` on host system. All data will be stored in your host directory `/path/on/host/to/ergo/data`.

To run specific Ergo version as a service with custom config:
To run specific Ergo version `<VERSION>` as a service with custom config `/path/on/host/system/to/myergo.conf`:

sudo docker run -d \
-p 9020:9020 \
-p 9052:9052 \
-v ergo:/home/ergo/.ergo \
-p 9030:9030 \
-p 9053:9053 \
-v /path/on/host/to/ergo/data:/home/ergo/.ergo \
-v /path/on/host/system/to/myergo.conf:/etc/myergo.conf \
ergoplatform/ergo:v2.0.3 --<networkId> -c /etc/myergo.conf
ergoplatform/ergo:<VERSION> --<networkId> -c /etc/myergo.conf

This will connect to Ergo mainnet or testnet respecting your configuration passed in `myergo.conf`. Every default config value would be overwritten with corresponding value in `myergo.conf`. This also would store your data in named Docker volume `ergo` (if you change default data location in your config file, do not forget mount `ergo` volume to new location in container) and open ports `9007` and `9052` on host system. Note that `9052` is used for API, so it is ok not to open it into whole Internet. Also, Ergo node works normally under NAT, so you can keep closed your `9007` port too, hence other nodes could not discover and connect to yours one, only your node could initiate connections.
Available versions can be found on [Ergo Docker image page](https://hub.docker.com/r/ergoplatform/ergo/tags), for example, `v2.2.0`.

This will connect to Ergo mainnet or testnet respecting your configuration passed in `myergo.conf` and network flag `--<networkId>`. Every default config value would be overwritten with corresponding value in `myergo.conf`.

This command also would store your data in `/path/on/host/to/ergo/data` on host system, and open ports `9030` (node communication) and `9053` (REST API) on host system. The `/path/on/host/to/ergo/data` directory must has `777` permissions or has owner/group numeric id equal to `9052` to be writable by container, as `ergo` user inside Docker image (please refer with [Dockerfile](Dockerfile)).

Ergo node works normally behind NAT, so you can keep closed your `9030` port, hence other nodes could not discover and connect to yours one, only your node could initiate connections.

It is also a good practice to keep closed REST API port `9053`, and connect to your node from inside another container in the same Docker network (this case not covered by this short quick start manual).

## Acknowledgements

Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import sbt._
lazy val commonSettings = Seq(
organization := "org.ergoplatform",
name := "ergo",
version := "2.2.0",
version := "3.0.0",
scalaVersion := "2.12.8",
resolvers ++= Seq("Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/",
"SonaType" at "https://oss.sonatype.org/content/groups/public",
Expand All @@ -15,8 +15,8 @@ lazy val commonSettings = Seq(
)

val scorexVersion = "6ffeafc8-SNAPSHOT"
val sigmaStateVersion = "master-f993b70c-SNAPSHOT"
val ergoWalletVersion = "master-24bd4ee5-SNAPSHOT"
val sigmaStateVersion = "master-0e75c9b0-SNAPSHOT"
val ergoWalletVersion = "master-351dd620-SNAPSHOT"

// for testing current sigmastate build (see sigmastate-ergo-it jenkins job)
val effectiveSigmaStateVersion = Option(System.getenv().get("SIGMASTATE_VERSION")).getOrElse(sigmaStateVersion)
Expand Down
26 changes: 13 additions & 13 deletions lock.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ dependencyOverrides in ThisBuild ++= Seq(
"io.circe" % "circe-jawn_2.12" % "0.10.0",
"io.circe" % "circe-numbers_2.12" % "0.10.0",
"io.circe" % "circe-parser_2.12" % "0.10.0",
"io.github.scalan" % "ast_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "common_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "core_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "library-api_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "library-impl_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "library_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "macros_2.12" % "master-4178b526-SNAPSHOT",
"io.github.scalan" % "ast_2.12" % "master-5136809e-SNAPSHOT",
"io.github.scalan" % "common_2.12" % "master-5136809e-SNAPSHOT",
"io.github.scalan" % "core_2.12" % "master-5136809e-SNAPSHOT",
"io.github.scalan" % "library-api_2.12" % "master-5136809e-SNAPSHOT",
"io.github.scalan" % "library-impl_2.12" % "master-5136809e-SNAPSHOT",
"io.github.scalan" % "library_2.12" % "master-5136809e-SNAPSHOT",
"io.github.scalan" % "macros_2.12" % "master-5136809e-SNAPSHOT",
"javax.activation" % "javax.activation-api" % "1.2.0",
"javax.xml.bind" % "jaxb-api" % "2.4.0-b180830.0359",
"jline" % "jline" % "2.14.3",
Expand All @@ -51,7 +51,7 @@ dependencyOverrides in ThisBuild ++= Seq(
"org.bitbucket.inkytonik.kiama" % "kiama_2.12" % "2.1.0",
"org.bitlet" % "weupnp" % "0.1.4",
"org.bouncycastle" % "bcprov-jdk15on" % "1.62",
"org.ergoplatform" % "ergo-wallet_2.12" % "master-24bd4ee5-SNAPSHOT",
"org.ergoplatform" % "ergo-wallet_2.12" % "master-351dd620-SNAPSHOT",
"org.objenesis" % "objenesis" % "2.4",
"org.ow2.asm" % "asm" % "5.0.4",
"org.reactivestreams" % "reactive-streams" % "1.0.2",
Expand All @@ -69,10 +69,10 @@ dependencyOverrides in ThisBuild ++= Seq(
"org.scorexfoundation" % "scorex-core_2.12" % "6ffeafc8-SNAPSHOT",
"org.scorexfoundation" % "scorex-util_2.12" % "0.1.4",
"org.scorexfoundation" % "scrypto_2.12" % "2.1.6",
"org.scorexfoundation" % "sigma-api_2.12" % "master-f993b70c-SNAPSHOT",
"org.scorexfoundation" % "sigma-impl_2.12" % "master-f993b70c-SNAPSHOT",
"org.scorexfoundation" % "sigma-library_2.12" % "master-f993b70c-SNAPSHOT",
"org.scorexfoundation" % "sigma-state_2.12" % "master-f993b70c-SNAPSHOT",
"org.scorexfoundation" % "sigma-api_2.12" % "master-0e75c9b0-SNAPSHOT",
"org.scorexfoundation" % "sigma-impl_2.12" % "master-0e75c9b0-SNAPSHOT",
"org.scorexfoundation" % "sigma-library_2.12" % "master-0e75c9b0-SNAPSHOT",
"org.scorexfoundation" % "sigma-state_2.12" % "master-0e75c9b0-SNAPSHOT",
"org.slf4j" % "slf4j-api" % "1.7.25",
"org.spire-math" % "debox_2.12" % "0.8.0",
"org.spire-math" % "jawn-parser_2.12" % "0.13.0",
Expand All @@ -87,4 +87,4 @@ dependencyOverrides in ThisBuild ++= Seq(
"org.typelevel" % "spire_2.12" % "0.14.1",
"org.whispersystems" % "curve25519-java" % "0.5.0"
)
// LIBRARY_DEPENDENCIES_HASH 73114b4d6a1aeff0fb629c6d869514c7dc1b20a9
// LIBRARY_DEPENDENCIES_HASH 912e526d70e45a563ed390e8200629117318d55c
18 changes: 15 additions & 3 deletions src/main/resources/mainnet.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,27 @@ ergo {
wallet.secretStorage.secretDir = ${ergo.directory}"/wallet/keystore"
bootstrap {
resourceUri = "http://188.166.109.25:5000/bootSettings"
pollDelay = 10s
pollDelay = 1s
}
}
scorex {
network {
magicBytes = [1, 0, 2, 4]
bindAddress = "0.0.0.0:9030"
nodeName = "ergo-mainnet-2.1"
nodeName = "ergo-mainnet-3.0.0"
nodeName = ${?NODENAME}
knownPeers = []
knownPeers = [
"118.189.191.191:9030",
"51.75.52.63:9030",
"139.59.29.87:9030",
"159.65.11.55:9030",
"165.227.26.175:9030",
"138.68.98.248:9030",
"78.46.93.239:9030",
"159.89.116.15:9030"
]
}
restApi {
bindAddress = "0.0.0.0:9053"
}
}
4 changes: 2 additions & 2 deletions src/main/resources/samples/local.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ scorex {
# knownPeers = []

# Network address
# bindAddress = "0.0.0.0:9020"
# bindAddress = "0.0.0.0:9030"
}
restApi {
# Network address to bind to
# bindAddress = "0.0.0.0:9052"
# bindAddress = "0.0.0.0:9053"

# Hex-encoded Blake2b256 hash of an API key. Should be 64-chars long Base16 string.
# apiKeyHash = "1111"
Expand Down

0 comments on commit 0d077df

Please sign in to comment.