Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eduadiez committed Dec 24, 2019
0 parents commit 078112c
Show file tree
Hide file tree
Showing 14 changed files with 468 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build_*
Binary file added avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM nethermind/nethermind:alpine

COPY entrypoint.sh /entrypoint.sh
COPY mainnet_archive.cfg mainnet.cfg mainnet_advanced.cfg /nethermind/configs/

ENTRYPOINT ["/entrypoint.sh"]


30 changes: 30 additions & 0 deletions build/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
set -e

ADVANCED_FILE=/nethermind/configs/mainnet_advanced.cfg

if [ ${NETHERMIND_MODE} == "archive" ];then
EXTRA_OPTS="--config mainnet_archive"
elif [ ${NETHERMIND_MODE} == "advanced" ];then
EXTRA_OPTS="--config mainnet_advanced"
#Edit selected options
sed -i "s/.*FastSync.*/ \"FastSync\" : ${NETHERMIND_FAST_SYNC},/g" ${ADVANCED_FILE}
sed -i "s/.*FastBlocks.*/ \"FastBlocks\" : ${NETHERMIND_FAST_BLOCKS},/g" ${ADVANCED_FILE}
sed -i "s/.*DownloadBodiesInFastSync.*/ \"DownloadBodiesInFastSync\" : ${NETHERMIND_DOWNLOAD_BODIES_IN_FAST_SYNC},/g" ${ADVANCED_FILE}
sed -i "s/.*UseGethLimitsInFastBlocks.*/ \"UseGethLimitsInFastBlocks\" : ${NETHERMIND_USE_GETH_LIMITS_IN_FAST_BLOCKS},/g" ${ADVANCED_FILE}
sed -i "s/.*DownloadReceiptsInFastSync.*/ \"DownloadReceiptsInFastSync\" : ${NETHERMIND_DOWNLOAD_RECEIPTS_IN_FAST_SYNC},/g" ${ADVANCED_FILE}
if [ ! -z "$NETHERMIND_PIVOT_HASH" ];then
sed -i "s/.*PivotHash.*/ \"PivotHash\" : "${NETHERMIND_PIVOT_HASH}",/g" ${ADVANCED_FILE}
fi
if [ ! -z "$NETHERMIND_PIVOT_NUMBER" ];then
sed -i "s/.*PivotNumber.*/ \"PivotNumber\" : ${NETHERMIND_PIVOT_NUMBER},/g" ${ADVANCED_FILE}
fi
if [ ! -z "$NETHERMIND_PIVOT_TOTAL_DIFFICULTY" ];then
sed -i "s/.*PivotTotalDifficulty.*/ \"PivotTotalDifficulty\" : "${NETHERMIND_PIVOT_TOTAL_DIFFICULTY}",/g" ${ADVANCED_FILE}
fi
elif [ ${NETHERMIND_MODE} == "custom" ];then
EXTRA_OPTS="--config mainnet_custom"
fi

chown nethermind:nethermind /data
exec gosu nethermind:nethermind /nethermind/Nethermind.Runner --Init.BaseDbPath=/data ${EXTRA_OPTS} "$@"
51 changes: 51 additions & 0 deletions build/mainnet.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"Init": {
"WebSocketsEnabled": true,
"StoreReceipts" : true,
"IsMining": false,
"ChainSpecPath": "chainspec/foundation.json",
"GenesisHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
"BaseDbPath": "nethermind_db/mainnet",
"LogFileName": "mainnet.logs.txt"
},
"Network": {
"DiscoveryPort": 30303,
"P2PPort": 30303,
"ActivePeersMaxCount" : 50
},
"JsonRpc": {
"Enabled": true,
"Host": "0.0.0.0",
"Port": 8545
},
"Db": {
"WriteBufferSize": 32000000,
"WriteBufferNumber": 4,
"BlockCacheSize": 768000000,
"CacheIndexAndFilterBlocks": false,
"BlockInfosDbCacheIndexAndFilterBlocks": true
},
"Sync": {
"FastSync": true,
"PivotNumber" : 9000000,
"PivotHash" : "0x388f34dd94b899f65bbd23006ee93d61434a2f2a57053c9870466d8e142960e3",
"PivotTotalDifficulty" : "13014076996386893192616",
"FastBlocks" : true,
"DownloadBodiesInFastSync" : false,
"DownloadReceiptsInFastSync" : false,
"UseGethLimitsInFastBlocks" : true
},
"EthStats": {
"Enabled": false,
"Server": "ws://localhost:3000/api",
"Name": "Nethermind",
"Secret": "secret",
"Contact": "[email protected]"
},
"Metrics": {
"NodeName": "Mainnet",
"Enabled": false,
"PushGatewayUrl": "http://localhost:9091/metrics",
"IntervalSeconds": 5
}
}
51 changes: 51 additions & 0 deletions build/mainnet_advanced.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"Init": {
"WebSocketsEnabled": true,
"StoreReceipts" : true,
"IsMining": false,
"ChainSpecPath": "chainspec/foundation.json",
"GenesisHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
"BaseDbPath": "nethermind_db/mainnet",
"LogFileName": "mainnet.logs.txt"
},
"Network": {
"DiscoveryPort": 30303,
"P2PPort": 30303,
"ActivePeersMaxCount" : 50
},
"JsonRpc": {
"Enabled": true,
"Host": "0.0.0.0",
"Port": 8545
},
"Db": {
"WriteBufferSize": 32000000,
"WriteBufferNumber": 4,
"BlockCacheSize": 768000000,
"CacheIndexAndFilterBlocks": false,
"BlockInfosDbCacheIndexAndFilterBlocks": true
},
"Sync": {
"FastSync": true,
"PivotNumber" : 9000000,
"PivotHash" : "0x388f34dd94b899f65bbd23006ee93d61434a2f2a57053c9870466d8e142960e3",
"PivotTotalDifficulty" : "13014076996386893192616",
"FastBlocks" : true,
"DownloadBodiesInFastSync" : false,
"DownloadReceiptsInFastSync" : false,
"UseGethLimitsInFastBlocks" : true
},
"EthStats": {
"Enabled": false,
"Server": "ws://localhost:3000/api",
"Name": "Nethermind",
"Secret": "secret",
"Contact": "[email protected]"
},
"Metrics": {
"NodeName": "Mainnet",
"Enabled": false,
"PushGatewayUrl": "http://localhost:9091/metrics",
"IntervalSeconds": 5
}
}
74 changes: 74 additions & 0 deletions build/mainnet_archive.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"Init": {
"WebSocketsEnabled": true,
"StoreReceipts": true,
"IsMining": false,
"ChainSpecPath": "chainspec/foundation.json",
"GenesisHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
"BaseDbPath": "nethermind_db/mainnet_archive",
"LogFileName": "mainnet_archive.logs.txt"
},
"Network": {
"DiscoveryPort": 30303,
"P2PPort": 30303
},
"JsonRpc": {
"Enabled": false,
"Host": "0.0.0.0",
"Port": 8545
},
"Db": {
"WriteBufferSize": 256000000,
"WriteBufferNumber": 6,
"BlockCacheSize": 60000000000,
"CacheIndexAndFilterBlocks": false,

"TraceDbWriteBufferSize": 256000000,
"TraceDbWriteBufferNumber": 4,
"TraceDbBlockCacheSize": 1000000000,
"TraceDbCacheIndexAndFilterBlocks": false,

"ReceiptsDbWriteBufferSize": 128000000,
"ReceiptsDbWriteBufferNumber": 4,
"ReceiptsDbBlockCacheSize": 2000000000,
"ReceiptsDbCacheIndexAndFilterBlocks": false,

"BlocksDbWriteBufferSize": 128000000,
"BlocksDbWriteBufferNumber": 4,
"BlocksDbBlockCacheSize": 6000000000,
"BlocksDbCacheIndexAndFilterBlocks": false,

"HeadersDbWriteBufferSize": 128000000,
"HeadersDbWriteBufferNumber": 4,
"HeadersDbBlockCacheSize": 6000000000,
"HeadersDbCacheIndexAndFilterBlocks": false,

"BlockInfosDbWriteBufferSize": 128000000,
"BlockInfosDbWriteBufferNumber": 4,
"BlockInfosDbBlockCacheSize": 2000000000,
"BlockInfosDbCacheIndexAndFilterBlocks": false,

"PendingTxsDbWriteBufferSize": 32000000,
"PendingTxsDbWriteBufferNumber": 4,
"PendingTxsDbBlockCacheSize": 512000000,
"PendingTxsDbCacheIndexAndFilterBlocks": false,

"CodeDbWriteBufferSize": 32000000,
"CodeDbWriteBufferNumber": 4,
"CodeDbBlockCacheSize": 512000000,
"CodeDbCacheIndexAndFilterBlocks": false
},
"EthStats": {
"Enabled": false,
"Server": "ws://localhost:3000/api",
"Name": "Nethermind",
"Secret": "secret",
"Contact": "[email protected]"
},
"Metrics": {
"NodeName": "Mainnet",
"Enabled": false,
"PushGatewayUrl": "http://localhost:9091/metrics",
"IntervalSeconds": 5
}
}
29 changes: 29 additions & 0 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "nethermind.public.dappnode.eth",
"version": "0.0.1",
"upstreamVersion": "v1.3.8",
"shortDescription": "Nethermind Ethereum client",
"description": "Nethermind - The world’s fastest Ethereum .NET Client and P2P Data Marketplace for the decentralised future\nOur flagship .NET Core-based Ethereum client is all about performance and flexibility. We have built a lean, stable and feature-rich gateway to allow anyone, anywhere, to take part in the decentralised future.",
"type": "service",
"dependencies": {},
"chain": "ethereum",
"author": "DAppNode Association <[email protected]> (https://github.com/dappnode)",
"contributors": [
"Eduardo Antuña <[email protected]> (https://github.com/eduadiez)"
],
"categories": [
"Blockchain"
],
"links": {
"endpoint": "http://nethermind.public.dappnode:8545",
"homepage": "https://github.com/dappnode/DAppNodePackage-nethermind#readme"
},
"repository": {
"type": "git",
"url": "https://github.com/dappnode/DAppNodePackage-nethermind.git"
},
"bugs": {
"url": "https://github.com/dappnode/DAppNodePackage-nethermind/issues"
},
"license": "GLP-3.0"
}
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.4'
services:
nethermind.public.dappnode.eth:
build: ./build
image: 'nethermind.public.dappnode.eth:0.0.1'
restart: always
volumes:
- 'data:/data'
environment:
- NETHERMIND_MODE=normal
- NETHERMIND_DOWNLOAD_BODIES_IN_FAST_SYNC=true
- NETHERMIND_DOWNLOAD_RECEIPTS_IN_FAST_SYNC=true
- NETHERMIND_FAST_BLOCKS=false
- NETHERMIND_FAST_SYNC=false
- NETHERMIND_PIVOT_HASH
- NETHERMIND_PIVOT_NUMBER
- NETHERMIND_PIVOT_TOTAL_DIFFICULTY
- NETHERMIND_USE_GETH_LIMITS_IN_FAST_BLOCKS=true
volumes:
data: {}
7 changes: 7 additions & 0 deletions getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Welcome, nodler!

This is your Nethermind node. You are now supporting the Ethereum network by running a full node.

* If you want to learn more on how Nethermind is built and why, please check their website: [nethermind.io](https://nethermind.io/)
* Join their community in [Gitter](https://gitter.im/nethermindeth/nethermind)
* And of course, make sure you join our DAppNode community in our [Riot](riot.im/app/#/room/#DAppNode:matrix.org) or [Telegram](https://t.me/dappnode)
9 changes: 9 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"0.0.1": {
"hash": "/ipfs/QmZboUjwZGca1yREoAGcz3Xo2hgnFijmUKLADSjE57DjQP",
"type": "directory",
"uploadedTo": {
"dappnode": "Tue, 24 Dec 2019 09:54:20 GMT"
}
}
}
42 changes: 42 additions & 0 deletions setup-target.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"mode": {
"type": "environment",
"name": "NETHERMIND_MODE"
},
"DownloadBodiesInFastSync": {
"type": "environment",
"name": "NETHERMIND_DOWNLOAD_BODIES_IN_FAST_SYNC"
},
"DownloadReceiptsInFastSync": {
"type": "environment",
"name": "NETHERMIND_DOWNLOAD_RECEIPTS_IN_FAST_SYNC"
},
"FastBlocks": {
"type": "environment",
"name": "NETHERMIND_FAST_BLOCKS"
},
"FastSync": {
"type": "environment",
"name": "NETHERMIND_FAST_SYNC"
},
"Pivot_Hash": {
"type": "environment",
"name": "NETHERMIND_PIVOT_HASH"
},
"PivotNumber": {
"type": "environment",
"name": "NETHERMIND_PIVOT_NUMBER"
},
"PivotTotalDifficulty": {
"type": "environment",
"name": "NETHERMIND_PIVOT_TOTAL_DIFFICULTY"
},
"UseGethLimitsInFastBlocks": {
"type": "environment",
"name": "NETHERMIND_USE_GETH_LIMITS_IN_FAST_BLOCKS"
},
"mainnet_cfg": {
"type": "fileUpload",
"path": "/nethermind/configs/mainnet.cfg"
}
}
3 changes: 3 additions & 0 deletions setup-ui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ui:order": ["mode", "*"]
}
Loading

0 comments on commit 078112c

Please sign in to comment.