diff --git a/README.md b/README.md index 4e8051ec03d2b184979dc2e79c4ed2e467ecaa04..ae8bb3261753f6ccf8ad7c737b129d51d8ec2109 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ Para poder levantar todo con docker-compose primero es necesario crear las imág ```` docker build -t nodobfa nodo/ ```` +Config: +- Actualmente se [installbfa.sh](https://gitlab.bfa.ar/blockchain/nucleo/-/blob/master/bin/installbfa.sh) oficial tiene problemas con la instalacion de geth por loq ue se fixio cambiando remplazando el [installbfa.sh](https://gitlab.bfa.ar/blockchain/nucleo/-/blob/master/bin/installbfa.sh) por [fix_installbfa.sh](nodo/fix_installbfa.sh) se llevo acabo la solucion planteada en https://gitlab.bfa.ar/blockchain/nucleo/-/issues/8 +- Se puede establecer el config.toml que se precise cambiandolo en [config.toml](nodo/config.toml). Hay ejemplos en +[aca](nodo/config.example/) + **API** ```` diff --git a/nodo/Dockerfile b/nodo/Dockerfile index a6ec38267cc0dd2a915a10ba23e6b4d1c04f0715..511c324d03db8773861c8bed62172f7f29f3dc1c 100644 --- a/nodo/Dockerfile +++ b/nodo/Dockerfile @@ -15,10 +15,14 @@ COPY fix_installbfa.sh /bfa/bin/installbfa.sh RUN chmod +x /bfa/bin/installbfa.sh +ENV NEW="/home/bfa/bfa" + RUN /bfa/bin/installbfa.sh RUN chown bfa:bfa -R /nodo_data/ +COPY config.toml /home/bfa/bfa/network/config.localhost+full+arch + RUN sed -i 's/--rpccorsdomain \\\*/--rpccorsdomain \\\* \\\n --rpcaddr 0.0.0.0\t\\\n --rpcport 8545/g' /home/bfa/bfa/bin/start.sh RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/nodo/config.example/config.full+archive+http.toml b/nodo/config.example/config.full+archive+http.toml new file mode 100644 index 0000000000000000000000000000000000000000..94c8bc55e35b528e4c7828a43a1f19f59ee6e70f --- /dev/null +++ b/nodo/config.example/config.full+archive+http.toml @@ -0,0 +1,22 @@ +[Eth] +NetworkId = 47525974938 +SyncMode = "full" +NoPruning = true +DatabaseCache = 4096 + +[Node.P2P] +BootstrapNodes = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"] +BootstrapNodesV5 = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"] + +[Node] +DataDir = "/home/bfa/bfa/network/node" +HTTPHost = "0.0.0.0" +HTTPCors = ["*"] +omitempty = "" +IPCPath = "geth.ipc" +HTTPPort = 8545 +HTTPVirtualHosts = ["*"] +HTTPModules = ["net", "web3", "eth", "clique"] +WSHost = "0.0.0.0" +WSPort = 8546 +WSModules = ["eth", "net", "web3", "clique"] diff --git a/nodo/config.example/config.full+archive+nohttp.toml b/nodo/config.example/config.full+archive+nohttp.toml new file mode 100644 index 0000000000000000000000000000000000000000..b2de2efeebdd129723bbbe8756760dcf02fcfba8 --- /dev/null +++ b/nodo/config.example/config.full+archive+nohttp.toml @@ -0,0 +1,12 @@ +[Eth] +NetworkId = 47525974938 +SyncMode = "full" +NoPruning = true +DatabaseCache = 4096 + +[Node.P2P] +BootstrapNodes = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"] +BootstrapNodesV5 = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"] + +[Node] +DataDir = "/home/bfa/bfa/network/node" diff --git a/nodo/config.example/docker-config.toml b/nodo/config.example/docker-config.toml new file mode 100644 index 0000000000000000000000000000000000000000..f414c8755727a134f8e906bb7a2ff821c52b1364 --- /dev/null +++ b/nodo/config.example/docker-config.toml @@ -0,0 +1,21 @@ +[Eth] +NetworkId = 47525974938 +SyncMode = "fast" +NoPruning = false +DatabaseCache = 2048 + +[Node] +DataDir = "/home/bfa/bfa/network/node" +HTTPHost = "0.0.0.0" +HTTPCors = ["*"] +IPCPath = "geth.ipc" +HTTPPort = 8545 +HTTPVirtualHosts = ["*"] +HTTPModules = ["net", "web3", "eth", "clique"] +WSHost = "0.0.0.0" +WSPort = 8546 +WSModules = ["net", "web3", "eth", "clique"] + +[Node.P2P] +BootstrapNodes = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://59ae768ecdee632e0daceccb6f71b215392eba89230d626573f2fb4e9c0786c9a661027ab7343820ca63d96fe48ffd81ed1bf6e4d512f0ba50ec072c9efd9e4e@200.108.146.100:30301"] +BootstrapNodesV5 = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://59ae768ecdee632e0daceccb6f71b215392eba89230d626573f2fb4e9c0786c9a661027ab7343820ca63d96fe48ffd81ed1bf6e4d512f0ba50ec072c9efd9e4e@200.108.146.100:30301"] diff --git a/nodo/config.toml b/nodo/config.toml new file mode 100644 index 0000000000000000000000000000000000000000..b2de2efeebdd129723bbbe8756760dcf02fcfba8 --- /dev/null +++ b/nodo/config.toml @@ -0,0 +1,12 @@ +[Eth] +NetworkId = 47525974938 +SyncMode = "full" +NoPruning = true +DatabaseCache = 4096 + +[Node.P2P] +BootstrapNodes = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"] +BootstrapNodesV5 = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"] + +[Node] +DataDir = "/home/bfa/bfa/network/node" diff --git a/nodo/fix_installbfa.sh b/nodo/fix_installbfa.sh index 83ada3baca708359f61cdfc013abbaee7da800b1..a58d1d971c0cefe59593c82ed9da1f85f838b1e5 100644 --- a/nodo/fix_installbfa.sh +++ b/nodo/fix_installbfa.sh @@ -87,25 +87,6 @@ function gethinstall install --verbose --owner=bfa --group=bfa --target-directory=${HISBINDIR} ${NEW}/go-ethereum/build/bin/{geth,bootnode,abigen,ethkey,puppeth,rlpdump,wnode,swarm,swarm-smoke} } -function gethinstallFIXED -{ - # Instalá la última versión de golang - wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz - rm -rf /usr/local/go - tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz - export PATH=$PATH:/usr/local/go/bin - go version - - # Instalá Go Ethereum (geth) - add-apt-repository -y ppa:ethereum/ethereum - apt-get update - apt-get -y install ethereum - geth version -} - - - - function initgenesis { ( @@ -220,20 +201,49 @@ function setupquestions fi } +function gethinstallFIXED +{ + echo "===================================================================" + echo " gethinstallFIXED - install go" + echo " URL: https://gitlab.bfa.ar/blockchain/nucleo/-/issues/8 " + echo "===================================================================" + + # Instalá la última versión de golang + wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz + rm -rf /usr/local/go + tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz + export PATH=$PATH:/usr/local/go/bin + go version + + + echo "===================================================================" + echo " gethinstallFIXED - install geth" + echo " URL: https://gitlab.bfa.ar/blockchain/nucleo/-/issues/8 " + echo "===================================================================" + + # Instalá Go Ethereum (geth) + add-apt-repository -y ppa:ethereum/ethereum + apt-get update + apt-get -y install ethereum + geth version + +} + + usersetup setupquestions # Ubuntu necesita mas repos grep -q Ubuntu /etc/issue && apt-add-repository multiverse # apt update -# fix URL: https://gitlab.bfa.ar/blockchain/nucleo/-/issues/8 -gethinstallFIXED # development tools -aptinstall dirmngr apt-transport-https curl git curl build-essential sudo software-properties-common golang +aptinstall dirmngr apt-transport-https curl git curl build-essential sudo software-properties-common wget aptinstall jq libjson-perl libwww-perl libclass-accessor-perl userconfig nodejsinstall - +# fix URL: https://gitlab.bfa.ar/blockchain/nucleo/-/issues/8 +gethinstallFIXED +#gethinstall initgenesis cronit welcome