From 80091783604e3eb66d55fc394c133fb434884d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Thu, 5 Sep 2019 17:29:24 +0200 Subject: [PATCH 01/50] Advance manifest to new version: 0.1.1 --- dappnode_package.json | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 2a97c86..fc4265f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,30 +1,47 @@ { - "name": "ethchain-geth.public.dappnode.eth", - "version": "0.0.3", - "description": "Mainnet Geth", - "avatar": "/ipfs/QmTfnrUdZWaMgr2Zi1h1Z7zS5CbYtQZRs72yqKZQHj5fxT", + "name": "geth.dnp.dappnode.eth", + "version": "0.1.1", + "upstreamVersion": "1.9.3", + "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", + "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", + "avatar": "/ipfs/QmbxQDuXW8AjrP4UKbG7Aothehvzg5PdLDBn7cdGWjvpmU", "type": "library", "chain": "ethereum", "image": { - "path": "ethchain-geth.public.dappnode.eth_0.0.3.tar.xz", - "hash": "/ipfs/QmdQF3arvXiEkJ8DSR1auzCqxyhpmv1fGL1acTBQYyZvfr", - "size": 16184810, + "path": "", + "hash": "", + "size": "", "restart": "always", "ports": [ - "61313:30303", - "61313:30303/udp", - "61314:30304" + "30303", + "30303/udp", + "30304/udp" ], "volumes": [ - "ethchain-geth:/root/.ethereum/ethchain-geth" + "data:/root/.ethereum" ], "environment": [ "EXTRA_OPTS=--rpcapi eth,net,web3,txpool" ] }, - "author": "nanexcool", + "author": "DAppNode Association (https://github.com/dappnode)", + "contributors": [ + "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", + "Eduardo Antuña (https://github.com/eduadiez)" + ], + "categories": [ + "Blockchain" + ], "license": "GLP-3.0", "links": { - "endpoint": "http://my.ethchain-geth.public.dappnode.eth:8545" + "endpoint": "http://geth.dappnode:8545", + "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" + }, + "repository": { + "type": "git", + "url": "https://github.com/dappnode/DAppNodePackage-geth.git" + }, + "bugs": { + "url": "https://github.com/dappnode/DAppNodePackage-geth/issues" } } \ No newline at end of file From 4f8ff15c24d699964fad587930e8acf4525d01cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Thu, 5 Sep 2019 18:49:40 +0200 Subject: [PATCH 02/50] Update --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++++ build/Dockerfile | 8 ++--- dappnode_package.json | 43 ++++++++++++++++++-------- docker-compose.yml | 8 ++--- geth-avatar.png | Bin 0 -> 4716 bytes 5 files changed, 107 insertions(+), 21 deletions(-) create mode 100644 README.md create mode 100644 geth-avatar.png diff --git a/README.md b/README.md new file mode 100644 index 0000000..196c130 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# Görli testnet DAppNode package + +[![DAppNodeStore Available](https://img.shields.io/badge/DAppNodeStore-Available-brightgreen.svg)](http://my.dappnode/#/installer/geth.dnp.dappnode.eth) + + +[![Geth github](https://img.shields.io/badge/Geth-Github-blue.svg)](https://github.com/ethereum/go-ethereum) + +You can use this package without installing it in your DAppNode following these instructions: + +## Prerequisites + +- git + + Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) commandline tool. + +- docker + + Install [docker](https://docs.docker.com/engine/installation). The community edition (docker-ce) will work. In Linux make sure you grant permissions to the current user to use docker by adding current user to docker group, `sudo usermod -aG docker $USER`. Once you update the users group, exit from the current terminal and open a new one to make effect. + +- docker-compose + + Install [docker-compose](https://docs.docker.com/compose/install) + +**Note**: Make sure you can run `git`, `docker ps`, `docker-compose` without any issue and without sudo command. + + +## Buidling + +`docker-compose build` + +## Running + +### Start + +`docker-compose up -d` + +### View logs + +`docker-compose logs -f` + +### Stop + +`docker-compose down` + +## Extra options + +You can edit the `docker-compose.yml` and add extra options, such as: +``` + - EXTRA_OPTS=--wsapi db,eth,net,ssh,miner,web3,personal,admin,txpool +``` + +## Connect using web3js + +If the package is running and you're connected to your dappnode you can use: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://my.geth.dappnode:8546') +web3.eth.getBlockNumber().then(console.log) +``` +In case you are running it locally: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://127.0.0.1:8546') +web3.eth.getBlockNumber().then(console.log) +``` + +## License + +This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details diff --git a/build/Dockerfile b/build/Dockerfile index 0f11e46..b1aeadd 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,10 +5,10 @@ WORKDIR /usr/src/app RUN apk add --no-cache make gcc musl-dev linux-headers git jq -ARG COMMIT=cfbb969da803d4cc92e1a64fc1b3c06db299b564 +ARG BRANCH=v1.9.3 -RUN git clone https://github.com/ethereum/go-ethereum.git -RUN cd go-ethereum && git checkout $COMMIT && make geth +RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git +RUN cd go-ethereum && make geth # Pull Geth into a second stage deploy alpine container FROM alpine:latest @@ -16,4 +16,4 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates COPY --from=builder /usr/src/app/go-ethereum/build/bin/geth /usr/local/bin/ -ENTRYPOINT geth --datadir /root/.ethereum/ethchain-geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS +ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index 2a97c86..fc4265f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,30 +1,47 @@ { - "name": "ethchain-geth.public.dappnode.eth", - "version": "0.0.3", - "description": "Mainnet Geth", - "avatar": "/ipfs/QmTfnrUdZWaMgr2Zi1h1Z7zS5CbYtQZRs72yqKZQHj5fxT", + "name": "geth.dnp.dappnode.eth", + "version": "0.1.1", + "upstreamVersion": "1.9.3", + "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", + "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", + "avatar": "/ipfs/QmbxQDuXW8AjrP4UKbG7Aothehvzg5PdLDBn7cdGWjvpmU", "type": "library", "chain": "ethereum", "image": { - "path": "ethchain-geth.public.dappnode.eth_0.0.3.tar.xz", - "hash": "/ipfs/QmdQF3arvXiEkJ8DSR1auzCqxyhpmv1fGL1acTBQYyZvfr", - "size": 16184810, + "path": "", + "hash": "", + "size": "", "restart": "always", "ports": [ - "61313:30303", - "61313:30303/udp", - "61314:30304" + "30303", + "30303/udp", + "30304/udp" ], "volumes": [ - "ethchain-geth:/root/.ethereum/ethchain-geth" + "data:/root/.ethereum" ], "environment": [ "EXTRA_OPTS=--rpcapi eth,net,web3,txpool" ] }, - "author": "nanexcool", + "author": "DAppNode Association (https://github.com/dappnode)", + "contributors": [ + "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", + "Eduardo Antuña (https://github.com/eduadiez)" + ], + "categories": [ + "Blockchain" + ], "license": "GLP-3.0", "links": { - "endpoint": "http://my.ethchain-geth.public.dappnode.eth:8545" + "endpoint": "http://geth.dappnode:8545", + "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" + }, + "repository": { + "type": "git", + "url": "https://github.com/dappnode/DAppNodePackage-geth.git" + }, + "bugs": { + "url": "https://github.com/dappnode/DAppNodePackage-geth/issues" } } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 677b6e4..9cab3ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ version: '3.4' services: - ethchain-geth.public.dappnode.eth: - image: 'ethchain-geth.public.dappnode.eth:0.0.3' + geth.dnp.dappnode.eth: + image: 'geth.dnp.dappnode.eth:0.1.1' build: ./build volumes: - - 'ethchain-geth:/root/.ethereum/ethchain-geth' + - 'geth:/root/.ethereum' environment: - EXTRA_OPTS= ports: @@ -14,4 +14,4 @@ services: - '61313:30303/udp' - '61314:30304/udp' volumes: - ethchain-geth: {} \ No newline at end of file + geth: {} diff --git a/geth-avatar.png b/geth-avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..27b1dff22b88bc96c5186fbd17e23a49f5f0a221 GIT binary patch literal 4716 zcmV-y5|izTP)Px$eNaqPMMrQ<&fD$8*6zL2^Zfn(|NsBlaff4wZ+&;hTBew+={X2tHx zo#IlA-H4&TowCZP#qmsZpjLaOp1$pwyY513n`D^an6Aiejj@BQ=9akXTYjjKwdsDE zx@VfasO5E{0K8_Q~?@(Dr~+Q1IkoclqF9y`*v8f}GrFuEDff zK>SH}$Li46s@049rEHV(vWnX2!fVnwpYoac-5jQGz~Z>aU~1)!^UxYu000mtNklvLg?dJoA1Vdb^y2Z_c{fAk#=+Qr6S=*b1!sc49fkBDPM#Z(ZpB3!a zhxd~P2RW9mxK+Q@d6JmR%a_F+hlA!(F!p%Xv9%fDj^&%7zv!+nFz}*rux#g|DIWk)xK^}$ zuONyx04%#amN$Srk(sT!AS`F^rXl1J(2G}G z_{*}(Lq;MV$C2d+!ZH%k8%LHO2+J;995;{}(R;6G5n&;TXdLFoinU&KDX^R~#$i5+ z#Z@1xAS~OS>ocHgqHv*NQDHfIMk3atW%&`mEN9e6M6cyXgk|p=iRiWb$gqq=OeBUU zEQ<-2k%%?Rj}?~lGVT)5Yxz-N*>=n&V$aB~#S9Bc#8@{WwOM}DFUyX#L~OVG=&<4} z5q*{)9abU6647V*(P70{B4!sVcvjXH1S`H05hDtzUshZtV$Vp?;{CE>D-m&`koslC zR3buU1Lez#r9@0ZWdr5Qilszcy5fp`SuvD|*@a!074geLO-ON*h;Z3J|FWEzNyPkG z(GvZ#kVIUGQ=@5$P&UxNteBl54zF6oK=Xz+F=8YUTf+gOu;MhQg7=bnzO492M8Het zffXN#2zbd{u;L;S`zI_bG%Pgc8V8A(^b7}tfEABMQ=%wr)>(8|b|D55F+H_wMFJ}h zjiwLpy3xQwr--`GB9bgWURb3Sy-yJ{kE(8DuymhAWLe#rVWC+>oh2gK^5cf3_bejW z^5g%qbe4#L;efEP?ETximJgZr12Ki z$aJ6+4wg1+JhSB&29_qBBANB7djhcZ=oDeM{6fL9%MaAAOTFTgf$w$>tTj8h8S5NAS3l_U4A*)1W6NL<@SYV-KWZN1g zb(k4M;jym}9u{LIA*aJk7llRA1}FlHsgjVf(Uf{gIIcMXSOi>hy-WZ!7!^4-zzARwDv3FH9OfK$rf^FXl{hSDYjmE=<1phy z;kG!cFt7kz^4uGRxkhZ8tE`F?7QT`w-IhcmF8f6xZ&?*FESx7Hi9}5KUk(td6(WX( z+ZxAYaF~;`ZK5y&RFS~)b}G5xoBo9%m&yASZ%nR z{q8p*wM1cbs3L^r#npX@*ql1qeiN!z=o~E1*4XVv)8s~dbq`%DbP`qzSGVi7h-!t7!#cuM?qXj}|Jv@hkOk8XSan>bv2N85nc0K4(SKE)gZ1Re zi!NS;)W2}}%C^;k^|Wy2cK0gN?Efy59A#kr`Fv=)n@1O!@v%L}Q3BS^`_WU~J`?L5 z7~OYNfc3@Kr@QZ#W=`L}76 z@OWIRsi)Jo&z2o2VeP#C_8ZySaI;q*>^btm+Nmw<3Hc(zeK9&%A0A(ob8sMY`m=~~ zF(O#C43u_OI+eXO7fCKg0&7Q((uxp$15pT|NMK1*S`oa{bDy0For~dN?Y#f$8x?LH zOHa=|ce)F!mVxIKxpS=VRLEQm39BYC!-GeR5|%D~AqR5TCm zb@LYV{(HsB#4_;rbK@&71#?jp79j)kH?N@*u&XWcmr+;9$C1l`rti5aXhw*_`tTiK zFCZ5Q{l|5C4EWMV*WEq;C6J4$L9tvEgZ2K~Nx)thta~EP-avPq8uWy(Yq^z)OTa%f zcV|o>7X@G;gYRn~$9g7@KJZf4pI_^*b%was0ho(-%CZ z5@V1H*3O5=fW3eWwqsE*$D@9!#nnciB+AA6!%-N69Iy!XLf-Q~B+vBkrPie?a4sTa zklmzbhDER!&^~$B+_QGKMt|HN0THaxDQZAlj%tba> zwG8ZI(hhRn;Ir%DaFny``Cw6c%uC2ogZE;DH%dFJfVVrxEDX?E)Y=Wqts-X>A2? zRcF4>g5FIq7lW_}UTCli^^E$;d|~j?D*pDKdeH?4pmgxZ1}~xpy-@rfDB~S8!A1KL zbYCzMKpI7iJWAjwMDuqkx+Ck&m6pKhefg%&drnCF=f=xRBJ0(bb(z; z{j)zd(&}mRm>IGcdImmtz++}y5sT5!>O2Q|o%%+K zTfGMqU1*eeWzRkf4G1P_3%lg{8Iy?gm)ud&1(lk}9G;s_3TL3?`kB$%VlKK;$=-}` z21>7=G1eB-V@2>$zfft_Y66*7iWTGQnS^#!(F~NP6N@MEBTTPBGap-e(3?;( z2-X&^=z_|~L7r((RrE8TwS_tA@4>rPJZ<#K=x59hw!rg@=D}L9*SUW7!x8G}=irXW z^+2n;6)3v$oL5Dtq@RPd9&)`Y?dz|sHN|iZW+ zMb1wP)u@L8!`0UY6Y2;5JKUCa$c@T5drJdWjMi3ryyIr2rhXQ-w!BY4z2m)vxcs0m zp+_)VTP;|doUr76i=5BeT0d|*3JcvYozw*uhqcvs4}%j{X)K@6Cze(_2}{<;qJ^!k zk8a0cA^n`u3RafO+Tw$yx_%C6ZSlcUUOxxpA-l)S1U>C*%fiM2(9rBM?IYh*~)773PCO(0QN zTO?Q|jh$qYwIu>eYbROA+Ja#zJjoPNQG?bN3`=(>nV_gwd0}bqB*S?K4kSXbV&Ejh z0d;Lbu(a#M;#AaJuwvmP^D1gQte7~-1Z!&pSIA>wAtyN-Z&-<5++ADvFDq6i7Q3Rx z!HSuQ#jdC^uwrLo;RADfH3pWZ?U3BDc!ds2+jdBPMeRSM4!}a~kQoCCuc!mC^qOP} zsi-H&uwrUr0pUBN_Q8s+i3Jq$?Pt`!;mr7&SdgMFg0SLiVlgS|Hdx5SGI)H2y!VXS z3oACASUll9qi*}MjD997Y7Z=*M`eB*U9ge1= zZo)F9J0Y@Dl{Q$Vc~iPm6?FqvdB{`^bVYpx%lXk5e#A&_R9dh~zZo9nNdL3gxNPj* zPo~16#Sg#KVA+M&|N7OypvJ!|wF?pp|NX(BU|6<(Dk4}v|CUG@7WDY_ck9#UPe}uU uaoO7b-7Hv)_Cw-7znBG!IdX=T!tsATCaM^C($z}<0000 Date: Mon, 21 Oct 2019 16:11:14 +0200 Subject: [PATCH 03/50] Updated --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++ build/Dockerfile | 8 ++--- dappnode_package.json | 20 +------------ docker-compose.yml | 19 ++++++------ 4 files changed, 83 insertions(+), 33 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..196c130 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# Görli testnet DAppNode package + +[![DAppNodeStore Available](https://img.shields.io/badge/DAppNodeStore-Available-brightgreen.svg)](http://my.dappnode/#/installer/geth.dnp.dappnode.eth) + + +[![Geth github](https://img.shields.io/badge/Geth-Github-blue.svg)](https://github.com/ethereum/go-ethereum) + +You can use this package without installing it in your DAppNode following these instructions: + +## Prerequisites + +- git + + Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) commandline tool. + +- docker + + Install [docker](https://docs.docker.com/engine/installation). The community edition (docker-ce) will work. In Linux make sure you grant permissions to the current user to use docker by adding current user to docker group, `sudo usermod -aG docker $USER`. Once you update the users group, exit from the current terminal and open a new one to make effect. + +- docker-compose + + Install [docker-compose](https://docs.docker.com/compose/install) + +**Note**: Make sure you can run `git`, `docker ps`, `docker-compose` without any issue and without sudo command. + + +## Buidling + +`docker-compose build` + +## Running + +### Start + +`docker-compose up -d` + +### View logs + +`docker-compose logs -f` + +### Stop + +`docker-compose down` + +## Extra options + +You can edit the `docker-compose.yml` and add extra options, such as: +``` + - EXTRA_OPTS=--wsapi db,eth,net,ssh,miner,web3,personal,admin,txpool +``` + +## Connect using web3js + +If the package is running and you're connected to your dappnode you can use: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://my.geth.dappnode:8546') +web3.eth.getBlockNumber().then(console.log) +``` +In case you are running it locally: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://127.0.0.1:8546') +web3.eth.getBlockNumber().then(console.log) +``` + +## License + +This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details diff --git a/build/Dockerfile b/build/Dockerfile index 0f11e46..05231ed 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,10 +5,10 @@ WORKDIR /usr/src/app RUN apk add --no-cache make gcc musl-dev linux-headers git jq -ARG COMMIT=cfbb969da803d4cc92e1a64fc1b3c06db299b564 +ARG BRANCH=v1.9.6 -RUN git clone https://github.com/ethereum/go-ethereum.git -RUN cd go-ethereum && git checkout $COMMIT && make geth +RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git +RUN cd go-ethereum && make geth # Pull Geth into a second stage deploy alpine container FROM alpine:latest @@ -16,4 +16,4 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates COPY --from=builder /usr/src/app/go-ethereum/build/bin/geth /usr/local/bin/ -ENTRYPOINT geth --datadir /root/.ethereum/ethchain-geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS +ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index fc4265f..8a81b6e 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,29 +1,11 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.1", - "upstreamVersion": "1.9.3", + "upstreamVersion": "1.9.6", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", - "avatar": "/ipfs/QmbxQDuXW8AjrP4UKbG7Aothehvzg5PdLDBn7cdGWjvpmU", "type": "library", "chain": "ethereum", - "image": { - "path": "", - "hash": "", - "size": "", - "restart": "always", - "ports": [ - "30303", - "30303/udp", - "30304/udp" - ], - "volumes": [ - "data:/root/.ethereum" - ], - "environment": [ - "EXTRA_OPTS=--rpcapi eth,net,web3,txpool" - ] - }, "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", diff --git a/docker-compose.yml b/docker-compose.yml index 677b6e4..b497f94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,16 @@ version: '3.4' services: - ethchain-geth.public.dappnode.eth: - image: 'ethchain-geth.public.dappnode.eth:0.0.3' + geth.dnp.dappnode.eth: + image: 'geth.dnp.dappnode.eth:0.1.1' build: ./build volumes: - - 'ethchain-geth:/root/.ethereum/ethchain-geth' + - 'geth:/root/.ethereum' environment: - - EXTRA_OPTS= + - EXTRA_OPTS=--rpcapi eth,net,web3,txpool ports: - - '127.0.0.1:8546:8546' - - '127.0.0.1:8545:8545' - - '61313:30303' - - '61313:30303/udp' - - '61314:30304/udp' + - '30303' + - '30303/udp' + - '30304/udp' + restart: always volumes: - ethchain-geth: {} \ No newline at end of file + geth: {} From fbdf676e299bf53dcb8ce7383f5da00514754805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 29 Nov 2019 22:48:38 +0100 Subject: [PATCH 04/50] Bump version to Geth v1.9.8 --- build/Dockerfile | 2 +- dappnode_package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 05231ed..fc8b524 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /usr/src/app RUN apk add --no-cache make gcc musl-dev linux-headers git jq -ARG BRANCH=v1.9.6 +ARG BRANCH=v1.9.8 RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git RUN cd go-ethereum && make geth diff --git a/dappnode_package.json b/dappnode_package.json index 8a81b6e..6ac3d2b 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.1", - "upstreamVersion": "1.9.6", + "upstreamVersion": "v1.9.8", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", From b801b89887d65c0bbc2b46e8491ebfdec14cac68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 29 Nov 2019 22:53:22 +0100 Subject: [PATCH 05/50] Advance manifest to new version: 0.1.3 --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 6ac3d2b..3e8e001 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.1", + "version": "0.1.3", "upstreamVersion": "v1.9.8", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", From d31ca98b577c1352f7d3c44b8e64b1b0a007ee17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 29 Nov 2019 22:53:24 +0100 Subject: [PATCH 06/50] Advance compose to new version: 0.1.3 --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b497f94..2e86c26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,16 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.1' + image: 'geth.dnp.dappnode.eth:0.1.3' build: ./build volumes: - 'geth:/root/.ethereum' environment: - - EXTRA_OPTS=--rpcapi eth,net,web3,txpool + - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' ports: - '30303' - - '30303/udp' - - '30304/udp' + - 30303/udp + - 30304/udp restart: always volumes: geth: {} From 5a22cef32e8f599a8a062fb55eb97b342a1c51f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Tue, 17 Dec 2019 08:35:26 +0100 Subject: [PATCH 07/50] Bump version --- build/Dockerfile | 23 +++++++++-------------- docker-compose.yml | 2 +- releases.json | 10 ++++++++++ 3 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 releases.json diff --git a/build/Dockerfile b/build/Dockerfile index fc8b524..b652902 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,19 +1,14 @@ -# Build Geth in a stock Go builder container -FROM golang:1.11-alpine as builder +FROM ethereum/client-go:v1.9.9 as geth -WORKDIR /usr/src/app +# Pull Parity into a second stage deploy alpine container +FROM alpine:edge -RUN apk add --no-cache make gcc musl-dev linux-headers git jq +RUN apk --no-cache add \ + libstdc++ \ + eudev-libs \ + libgcc \ + bash -ARG BRANCH=v1.9.8 - -RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git -RUN cd go-ethereum && make geth - -# Pull Geth into a second stage deploy alpine container -FROM alpine:latest - -RUN apk add --no-cache ca-certificates -COPY --from=builder /usr/src/app/go-ethereum/build/bin/geth /usr/local/bin/ +COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS diff --git a/docker-compose.yml b/docker-compose.yml index 2e86c26..e695d3d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,4 +13,4 @@ services: - 30304/udp restart: always volumes: - geth: {} + geth: {} \ No newline at end of file diff --git a/releases.json b/releases.json new file mode 100644 index 0000000..9bed314 --- /dev/null +++ b/releases.json @@ -0,0 +1,10 @@ +{ + "0.1.2": { + "hash": "/ipfs/QmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 29 Nov 2019 21:53:08 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.2&h=%2Fipfs%2FQmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2" + } +} \ No newline at end of file From 2e2762074501dc743e31b89f961cd93afededc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Tue, 17 Dec 2019 08:38:47 +0100 Subject: [PATCH 08/50] Advance manifest to new version: 0.1.4 --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 3e8e001..6d73070 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.3", + "version": "0.1.4", "upstreamVersion": "v1.9.8", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", From 6e9ac65ceee6573bbbbe0f967a68e68903a6c1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Tue, 17 Dec 2019 08:38:49 +0100 Subject: [PATCH 09/50] Advance compose to new version: 0.1.4 --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e695d3d..99086c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.3' + image: 'geth.dnp.dappnode.eth:0.1.4' build: ./build volumes: - 'geth:/root/.ethereum' @@ -13,4 +13,4 @@ services: - 30304/udp restart: always volumes: - geth: {} \ No newline at end of file + geth: {} From 09349ccb66febf0287fd699c440cfd41001547c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 3 Jan 2020 15:55:39 +0100 Subject: [PATCH 10/50] Bump geth version --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 6d73070..39e0dbf 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.4", - "upstreamVersion": "v1.9.8", + "upstreamVersion": "v1.9.9", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", From f86c6a40d3ee9836bda536d1871287e46b2e7cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 6 Mar 2020 15:06:35 +0100 Subject: [PATCH 11/50] Advance manifest to new version: 0.1.5 --- dappnode_package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 39e0dbf..d94c9b3 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.4", - "upstreamVersion": "v1.9.9", + "version": "0.1.5", + "upstreamVersion": "v1.9.11", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", From adaf06da2f792068ce215b3831159b78a1475751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 6 Mar 2020 15:06:36 +0100 Subject: [PATCH 12/50] Advance compose to new version: 0.1.5 --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 99086c6..d1b9f6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,13 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.4' + image: 'geth.dnp.dappnode.eth:0.1.5' build: ./build volumes: - 'geth:/root/.ethereum' environment: - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' + - SYNCMODE ports: - '30303' - 30303/udp From 601a72de2eddea58bb344b1279686b7078936e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 6 Mar 2020 16:51:14 +0100 Subject: [PATCH 13/50] Added SYNCMODE env --- build/Dockerfile | 5 +++-- dappnode_package.json | 4 ++-- docker-compose.yml | 3 ++- releases.json | 16 ++++++++++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b652902..f671b11 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM ethereum/client-go:v1.9.9 as geth +FROM ethereum/client-go:v1.9.11 as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge @@ -11,4 +11,5 @@ RUN apk --no-cache add \ COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth -ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS +ENV SYNCMODE fast +ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index 39e0dbf..d94c9b3 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.4", - "upstreamVersion": "v1.9.9", + "version": "0.1.5", + "upstreamVersion": "v1.9.11", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index 99086c6..d1b9f6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,13 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.4' + image: 'geth.dnp.dappnode.eth:0.1.5' build: ./build volumes: - 'geth:/root/.ethereum' environment: - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' + - SYNCMODE ports: - '30303' - 30303/udp diff --git a/releases.json b/releases.json index 9bed314..3f4b98c 100644 --- a/releases.json +++ b/releases.json @@ -6,5 +6,21 @@ "dappnode": "Fri, 29 Nov 2019 21:53:08 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.2&h=%2Fipfs%2FQmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2" + }, + "0.1.3": { + "hash": "/ipfs/QmbrBkpBGmx79B5anoTQLhq8wnYPCiz69eNWwu4jiuMGFx", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 03 Jan 2020 14:56:46 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.3&h=%2Fipfs%2FQmbrBkpBGmx79B5anoTQLhq8wnYPCiz69eNWwu4jiuMGFx" + }, + "0.1.4": { + "hash": "/ipfs/QmNqDvqAyy3pN3PvymB6chM7S1FgYyive8LosVKUuaDdfd", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 06 Mar 2020 14:06:12 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.4&h=%2Fipfs%2FQmNqDvqAyy3pN3PvymB6chM7S1FgYyive8LosVKUuaDdfd" } } \ No newline at end of file From c999680a798185673463b88c0042cf036b09fd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 17 Apr 2020 14:05:36 +0200 Subject: [PATCH 14/50] Bump version --- build/Dockerfile | 2 +- releases.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b652902..e5228f3 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM ethereum/client-go:v1.9.9 as geth +FROM ethereum/client-go:v1.9.13 as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge diff --git a/releases.json b/releases.json index 9bed314..82255aa 100644 --- a/releases.json +++ b/releases.json @@ -6,5 +6,4 @@ "dappnode": "Fri, 29 Nov 2019 21:53:08 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.2&h=%2Fipfs%2FQmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2" - } } \ No newline at end of file From 1e509d9eacbe035843ff6bbc05ba25ed32ffdf47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 8 Jun 2020 18:34:11 +0200 Subject: [PATCH 15/50] bump version --- .github/workflows/auto_check.yml | 31 +++++++ .github/workflows/dispatch_release.yml | 123 +++++++++++++++++++++++++ .gitignore | 1 + build/Dockerfile | 3 +- dappnode_package.json | 4 +- docker-compose.yml | 2 +- releases.json | 16 ++++ 7 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/auto_check.yml create mode 100644 .github/workflows/dispatch_release.yml diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml new file mode 100644 index 0000000..8d52ddb --- /dev/null +++ b/.github/workflows/auto_check.yml @@ -0,0 +1,31 @@ +name: Update DAppNode package + +on: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '*/5 * * * *' +jobs: + dappnodepackage-update: + name: Trigger the DAppNode Package update + runs-on: ubuntu-latest + env: + DISPATCH_REPO: dappnode/DAppNodePackage-geth + UPSTREAM_REPO: ethereum/go-ethereum + steps: + - name: Get the tag + id: get_tag + run: | + UPSTREAM_TAG=$(curl https://api.github.com/repos/$UPSTREAM_REPO/releases/latest | jq .tag_name | tr -d "\"" ) + DNP_TAG=$(curl https://api.github.com/repos/$DISPATCH_REPO/releases/tags/$UPSTREAM_TAG | jq .tag_name | tr -d "\"" ) + if [ $UPSTREAM_TAG != $DNP_TAG ];then + echo "::set-output name=trigger_update::true" + fi + echo ::set-output name=TAG::$UPSTREAM_TAG + - name: Send dispatch event to the DAppNode Package repository + if: steps.get_tag.outputs.trigger_update == 'true' + run: | + curl -v -X POST -u "${{ secrets.PAT_GITHUB }}" \ + -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Content-Type: application/json" \ + --data '{"event_type":"new_release", "client_payload": { "tag":"${{ steps.get_tag.outputs.TAG }}"}}' \ + https://api.github.com/repos/$DISPATCH_REPO/dispatches diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml new file mode 100644 index 0000000..0a762d6 --- /dev/null +++ b/.github/workflows/dispatch_release.yml @@ -0,0 +1,123 @@ +name: Remote Dispatch Action Initiator + +on: + repository_dispatch: + +jobs: + new_version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: New remote repository event + id: dispatch-event + run: | + echo "Event '${{ github.event.action }}' with tag: '${{ github.event.client_payload.tag }}'" + echo "::set-output name=TAG::${{ github.event.client_payload.tag }}" + echo VERSION=${{ github.event.client_payload.tag }} > .env + + - name: Setup nodejs + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - name: dappnodesdk install + run: npm install -g @dappnode/dappnodesdk + + - name: Get next DAppNodePackage release + id: next-release + run: echo "::set-output name=DNP_VERSION::$(dappnodesdk next patch -p remote)" + + - name: Check and delete if a release already exists + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + RELEASE_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .id || echo "") + PRE_RELEASE=$(curl -s https://api.github.com/repos/dappnode/${{ github.repository }}releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .prerelease) + if [ $PRE_RELEASE == "false" ];then + exit 1 + elif [ ! -z "$RELEASE_ID" ];then + curl -H "Authorization: token ${GITHUB_TOKEN}" -X DELETE https://api.github.com/repos/${{ github.repository }}/releases/${RELEASE_ID} + fi + + - name: Docker-Compose Build + run: | + docker-compose build + + - name: dappnodesdk publish + id: dappnodesdk-publish + run: | + sed -i "s/upstreamVersion\":.*,/upstreamVersion\": \"${{ steps.dispatch-event.outputs.TAG }}\",/g" dappnode_package.json + dappnodesdk publish patch -p remote + echo "::set-output name=CONTENT_HASH::$(cat ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash | sed 's/\//%2F/g')" + echo "::set-output name=PACKAGE_NAME::$(cat dappnode_package.json | jq .name | tr -d "\"")" + + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + release_name: v${{ steps.next-release.outputs.DNP_VERSION }} + tag_name: ${{ steps.dispatch-event.outputs.TAG }} + body: | + # ${{ steps.dispatch-event.outputs.TAG }} + You can execute a transaction to publish this package from the Admin UI with Metamask by following this pre-filled [link](http://my.dappnode/#/sdk/publish/r=${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}&v=${{ steps.next-release.outputs.DNP_VERSION }}&h=${{ steps.dappnodesdk-publish.outputs.CONTENT_HASH }}) + draft: false + prerelease: true + + - name: Upload release .xz file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz + asset_name: ${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz + asset_content_type: 'application/octet-stream' + + - name: Upload release avatar file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/avatar.png + asset_name: avatar.png + asset_content_type: 'application/octet-stream' + + - name: Upload release dappnode_package.json file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/dappnode_package.json + asset_name: dappnode_package.json + asset_content_type: 'application/octet-stream' + + - name: Upload release docker-compose.yml file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/docker-compose.yml + asset_name: docker-compose.yml + asset_content_type: 'application/octet-stream' + + - name: Upload release content-hash file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash + asset_name: content-hash + asset_content_type: 'application/octet-stream' + + - name: Commit changes + run: | + git config --global user.email "eduadiez@gmail.com" + git config --global user.name "Eduardo" + git commit -am "Github action update" + git push diff --git a/.gitignore b/.gitignore index 2bd624b..9b98eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build_* +.env \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile index 5908d8b..b8f5669 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,5 @@ -FROM ethereum/client-go:v1.9.13 as geth +ARG VERSION +FROM ethereum/client-go:$VERSION as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge diff --git a/dappnode_package.json b/dappnode_package.json index d94c9b3..3cc4808 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.5", - "upstreamVersion": "v1.9.11", + "version": "0.1.7", + "upstreamVersion": "v1.9.14", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index d1b9f6a..bf2be29 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.5' + image: 'geth.dnp.dappnode.eth:0.1.7' build: ./build volumes: - 'geth:/root/.ethereum' diff --git a/releases.json b/releases.json index 3f4b98c..42c83d4 100644 --- a/releases.json +++ b/releases.json @@ -22,5 +22,21 @@ "dappnode": "Fri, 06 Mar 2020 14:06:12 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.4&h=%2Fipfs%2FQmNqDvqAyy3pN3PvymB6chM7S1FgYyive8LosVKUuaDdfd" + }, + "0.1.5": { + "hash": "/ipfs/QmYSoV4pxNZmHckZHXKCLBXBeESWYdbrCgduGFwpWLzPoi", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 17 Apr 2020 12:08:45 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.5&h=%2Fipfs%2FQmYSoV4pxNZmHckZHXKCLBXBeESWYdbrCgduGFwpWLzPoi" + }, + "0.1.6": { + "hash": "/ipfs/QmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3", + "type": "directory", + "uploadedTo": { + "remote": "Thu, 14 May 2020 16:22:40 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.6&h=%2Fipfs%2FQmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3" } } \ No newline at end of file From 0f9c96c3c96769deea23013a6318bc3044ff0089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:49:33 +0200 Subject: [PATCH 16/50] Update auto_check.yml --- .github/workflows/auto_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index 8d52ddb..d32c4b2 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -24,7 +24,7 @@ jobs: - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | - curl -v -X POST -u "${{ secrets.PAT_GITHUB }}" \ + curl -v -X POST -u "${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Content-Type: application/json" \ --data '{"event_type":"new_release", "client_payload": { "tag":"${{ steps.get_tag.outputs.TAG }}"}}' \ From 93a6df414cb5024854b6a79e8131a1b026e95766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:58:06 +0200 Subject: [PATCH 17/50] Update auto_check.yml --- .github/workflows/auto_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index d32c4b2..8d52ddb 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -24,7 +24,7 @@ jobs: - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | - curl -v -X POST -u "${{ secrets.GITHUB_TOKEN }}" \ + curl -v -X POST -u "${{ secrets.PAT_GITHUB }}" \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Content-Type: application/json" \ --data '{"event_type":"new_release", "client_payload": { "tag":"${{ steps.get_tag.outputs.TAG }}"}}' \ From 5e6c58ea8f6102fec7da1255ad4f9b679cafc929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 8 Jun 2020 19:07:14 +0200 Subject: [PATCH 18/50] Add version --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bf2be29..3ff36ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,10 @@ version: '3.4' services: geth.dnp.dappnode.eth: image: 'geth.dnp.dappnode.eth:0.1.7' - build: ./build + build: + context: ./build + args: + - VERSION volumes: - 'geth:/root/.ethereum' environment: From 2dc1d87186a26e2041ea815007ffa1c7de33a6b1 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Mon, 8 Jun 2020 17:12:16 +0000 Subject: [PATCH 19/50] Github action update --- dappnode_package.json | 2 +- releases.json | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 3cc4808..654286b 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.7", - "upstreamVersion": "v1.9.14", + "upstreamVersion": "v1.9.15", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/releases.json b/releases.json index 42c83d4..cc43224 100644 --- a/releases.json +++ b/releases.json @@ -38,5 +38,13 @@ "remote": "Thu, 14 May 2020 16:22:40 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.6&h=%2Fipfs%2FQmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3" + }, + "0.1.7": { + "hash": "/ipfs/Qmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1", + "type": "directory", + "uploadedTo": { + "remote": "Mon, 08 Jun 2020 17:12:10 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.7&h=%2Fipfs%2FQmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1" } } \ No newline at end of file From b31c25b8ccba1ef079f907cf74fb75089940f042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 7 Aug 2020 14:55:05 +0200 Subject: [PATCH 20/50] Bump to new version: 0.1.9 --- dappnode_package.json | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 654286b..a80e22f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.7", + "version": "0.1.9", "upstreamVersion": "v1.9.15", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", diff --git a/docker-compose.yml b/docker-compose.yml index 3ff36ce..e7514ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.7' + image: 'geth.dnp.dappnode.eth:0.1.9' build: context: ./build args: From 73b92a3a036a39d2029b2d44f4c4176a8d56c58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 7 Aug 2020 15:32:26 +0200 Subject: [PATCH 21/50] Added UPSTREAM_VERSION --- build/Dockerfile | 4 ++-- docker-compose.yml | 2 +- releases.json | 18 ++++++++++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b8f5669..6fe02e4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,5 @@ -ARG VERSION -FROM ethereum/client-go:$VERSION as geth +ARG UPSTREAM_VERSION +FROM ethereum/client-go:${UPSTREAM_VERSION} as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge diff --git a/docker-compose.yml b/docker-compose.yml index e7514ef..8b8af4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - - VERSION + - UPSTREAM_VERSION volumes: - 'geth:/root/.ethereum' environment: diff --git a/releases.json b/releases.json index cc43224..48986a9 100644 --- a/releases.json +++ b/releases.json @@ -40,11 +40,25 @@ "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.6&h=%2Fipfs%2FQmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3" }, "0.1.7": { - "hash": "/ipfs/Qmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1", + "hash": "/ipfs/QmTujfYrQwWG7kRwQX4nBD7TmSDjjSfRkj4CdZW3rmDJLC", "type": "directory", "uploadedTo": { - "remote": "Mon, 08 Jun 2020 17:12:10 GMT" + "dappnode": "Fri, 07 Aug 2020 12:53:48 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.7&h=%2Fipfs%2FQmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1" + }, + "0.1.8": { + "hash": "/ipfs/QmUf1uzqZdXyKt4YB96nr1F9GtxUWnPu8hSs7WXJnoc5Cj", + "uploadedTo": { + "remote": "Fri, 07 Aug 2020 12:54:45 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.8&h=%2Fipfs%2FQmUf1uzqZdXyKt4YB96nr1F9GtxUWnPu8hSs7WXJnoc5Cj" + }, + "0.1.9": { + "hash": "/ipfs/QmbpQoSXzPcBwm1LUeVMPosgsVUf772pN32xjDyxWnPEHT", + "uploadedTo": { + "remote": "Fri, 07 Aug 2020 13:19:24 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.9&h=%2Fipfs%2FQmbpQoSXzPcBwm1LUeVMPosgsVUf772pN32xjDyxWnPEHT" } } \ No newline at end of file From 4b37c73c677737a9f6fe43ffebbf1feda0c6a512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 7 Aug 2020 15:35:37 +0200 Subject: [PATCH 22/50] Fix GHA --- .github/workflows/dispatch_release.yml | 48 +++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml index 0a762d6..64e3400 100644 --- a/.github/workflows/dispatch_release.yml +++ b/.github/workflows/dispatch_release.yml @@ -13,24 +13,24 @@ jobs: run: | echo "Event '${{ github.event.action }}' with tag: '${{ github.event.client_payload.tag }}'" echo "::set-output name=TAG::${{ github.event.client_payload.tag }}" - echo VERSION=${{ github.event.client_payload.tag }} > .env - + echo UPSTREAM_VERSION=${{ github.event.client_payload.tag }} > .env + - name: Setup nodejs uses: actions/setup-node@v1 with: - node-version: '10.x' + node-version: "10.x" - name: dappnodesdk install run: npm install -g @dappnode/dappnodesdk - + - name: Get next DAppNodePackage release id: next-release run: echo "::set-output name=DNP_VERSION::$(dappnodesdk next patch -p remote)" - + - name: Check and delete if a release already exists env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | + run: | RELEASE_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .id || echo "") PRE_RELEASE=$(curl -s https://api.github.com/repos/dappnode/${{ github.repository }}releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .prerelease) if [ $PRE_RELEASE == "false" ];then @@ -42,7 +42,7 @@ jobs: - name: Docker-Compose Build run: | docker-compose build - + - name: dappnodesdk publish id: dappnodesdk-publish run: | @@ -70,54 +70,54 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz asset_name: ${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz - asset_content_type: 'application/octet-stream' + asset_content_type: "application/octet-stream" - name: Upload release avatar file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/avatar.png asset_name: avatar.png - asset_content_type: 'application/octet-stream' + asset_content_type: "application/octet-stream" - name: Upload release dappnode_package.json file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/dappnode_package.json asset_name: dappnode_package.json - asset_content_type: 'application/octet-stream' - + asset_content_type: "application/octet-stream" + - name: Upload release docker-compose.yml file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/docker-compose.yml asset_name: docker-compose.yml - asset_content_type: 'application/octet-stream' - + asset_content_type: "application/octet-stream" + - name: Upload release content-hash file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash asset_name: content-hash - asset_content_type: 'application/octet-stream' - + asset_content_type: "application/octet-stream" + - name: Commit changes run: | - git config --global user.email "eduadiez@gmail.com" - git config --global user.name "Eduardo" - git commit -am "Github action update" - git push + git config --global user.email "eduadiez@gmail.com" + git config --global user.name "Eduardo" + git commit -am "Github action update" + git push From aae7855ec656ecbf0e3d7bda77460cf9d704a016 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu, 17 Sep 2020 12:58:22 +0300 Subject: [PATCH 23/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 196c130..6c2daee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Görli testnet DAppNode package +# Geth DAppNode package [![DAppNodeStore Available](https://img.shields.io/badge/DAppNodeStore-Available-brightgreen.svg)](http://my.dappnode/#/installer/geth.dnp.dappnode.eth) From 0eb233ff460748571b0a7047bd7b2eb0ccbfbfeb Mon Sep 17 00:00:00 2001 From: dapplion Date: Wed, 23 Sep 2020 17:32:38 +0300 Subject: [PATCH 24/50] Add main GA --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6a48af9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: "Main" +on: + pull_request: + push: + branches: + - "master" + - "v[0-9]+.[0-9]+.[0-9]+" + paths-ignore: + - "README.md" + +jobs: + build-test: + runs-on: ubuntu-16.04 + name: Build test + if: github.event_name != 'push' + steps: + - uses: actions/checkout@v2 + - run: docker-compose build + + release: + name: Release + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - name: Publish + run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset --timeout 2h + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" From a29ea19a16631cf0b98f3135a80ea2936f89f1b4 Mon Sep 17 00:00:00 2001 From: dapplion Date: Wed, 23 Sep 2020 17:29:52 +0300 Subject: [PATCH 25/50] Support multi-arch --- build/Dockerfile | 17 ++++++++++------- dappnode_package.json | 1 + docker-compose.yml | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 6fe02e4..e96bc3d 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,16 +1,19 @@ +# Build Geth in a stock Go builder container +FROM golang:1.14-alpine as builder + ARG UPSTREAM_VERSION -FROM ethereum/client-go:${UPSTREAM_VERSION} as geth -# Pull Parity into a second stage deploy alpine container +RUN apk add --no-cache make gcc musl-dev linux-headers git && \ + git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ + cd go-ethereum && make geth + + FROM alpine:edge RUN apk --no-cache add \ - libstdc++ \ - eudev-libs \ - libgcc \ - bash + libstdc++ eudev-libs libgcc bash -COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth +COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin ENV SYNCMODE fast ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index a80e22f..414803e 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -5,6 +5,7 @@ "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", + "architectures": ["linux/amd64", "linux/arm64"], "chain": "ethereum", "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ diff --git a/docker-compose.yml b/docker-compose.yml index 8b8af4c..2b049c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - - UPSTREAM_VERSION + - UPSTREAM_VERSION=v1.9.21 volumes: - 'geth:/root/.ethereum' environment: From 6c0ea5af8c79d72aadfe832f8f91b1449308a2d3 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed, 23 Sep 2020 17:36:14 +0300 Subject: [PATCH 26/50] Docker-compose build args as object format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Eduardo Antuña Díez <20141918+eduadiez@users.noreply.github.com> --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2b049c4..5bc55a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - - UPSTREAM_VERSION=v1.9.21 + UPSTREAM_VERSION: v1.9.21 volumes: - 'geth:/root/.ethereum' environment: From 00fcef1522bc8cedbf6f6c860125af6ed7f7691a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Wed, 23 Sep 2020 20:41:47 +0200 Subject: [PATCH 27/50] Update auto_check.yml --- .github/workflows/auto_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index 8d52ddb..a0d1d8c 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -3,7 +3,7 @@ name: Update DAppNode package on: schedule: # * is a special character in YAML so you have to quote this string - - cron: '*/5 * * * *' + - cron: '00 */12 * * *' jobs: dappnodepackage-update: name: Trigger the DAppNode Package update From 57881b01fdb2edf9807ecf8f979732afbbdd31be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:01:26 +0200 Subject: [PATCH 28/50] Add ARM64 compatibility --- .github/workflows/auto_check.yml | 11 +- .github/workflows/dispatch_release.yml | 135 +++++-------------------- build/Dockerfile | 20 ++-- dappnode_package.json | 4 + docker-compose.yml | 2 +- 5 files changed, 46 insertions(+), 126 deletions(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index 8d52ddb..409a3e5 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -3,7 +3,8 @@ name: Update DAppNode package on: schedule: # * is a special character in YAML so you have to quote this string - - cron: '*/5 * * * *' + # - cron: '00 */4 * * *' + - cron: '* * * * *' jobs: dappnodepackage-update: name: Trigger the DAppNode Package update @@ -12,15 +13,17 @@ jobs: DISPATCH_REPO: dappnode/DAppNodePackage-geth UPSTREAM_REPO: ethereum/go-ethereum steps: + - uses: actions/checkout@v2 - name: Get the tag id: get_tag run: | - UPSTREAM_TAG=$(curl https://api.github.com/repos/$UPSTREAM_REPO/releases/latest | jq .tag_name | tr -d "\"" ) - DNP_TAG=$(curl https://api.github.com/repos/$DISPATCH_REPO/releases/tags/$UPSTREAM_TAG | jq .tag_name | tr -d "\"" ) - if [ $UPSTREAM_TAG != $DNP_TAG ];then + UPSTREAM_TAG=$(curl https://api.github.com/repos/$UPSTREAM_REPO/tags | jq .[0].name | tr -d "\"" ) + DNP_UPSTREAM=$(cat dappnode_package.json | jq .upstreamVersion | tr -d "\"" ) + if [ $UPSTREAM_TAG != $DNP_UPSTREAM ];then echo "::set-output name=trigger_update::true" fi echo ::set-output name=TAG::$UPSTREAM_TAG + - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml index 64e3400..64acb74 100644 --- a/.github/workflows/dispatch_release.yml +++ b/.github/workflows/dispatch_release.yml @@ -1,123 +1,36 @@ -name: Remote Dispatch Action Initiator - +name: "Main" on: repository_dispatch: + pull_request: + push: + branches: + - "master" + - "v[0-9]+.[0-9]+.[0-9]+" + paths-ignore: + - "README.md" jobs: - new_version: + build-test: + runs-on: ubuntu-16.04 + name: Build test + if: github.event_name != 'push' + steps: + - name: Checkout + uses: actions/checkout@v2 + - run: docker-compose build + + release: + name: Release runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event_name == 'repository_dispatch' steps: - uses: actions/checkout@v2 - - name: New remote repository event - id: dispatch-event - run: | - echo "Event '${{ github.event.action }}' with tag: '${{ github.event.client_payload.tag }}'" - echo "::set-output name=TAG::${{ github.event.client_payload.tag }}" - echo UPSTREAM_VERSION=${{ github.event.client_payload.tag }} > .env - - - name: Setup nodejs + - name: Setup node uses: actions/setup-node@v1 with: node-version: "10.x" - - - name: dappnodesdk install - run: npm install -g @dappnode/dappnodesdk - - - name: Get next DAppNodePackage release - id: next-release - run: echo "::set-output name=DNP_VERSION::$(dappnodesdk next patch -p remote)" - - - name: Check and delete if a release already exists + - name: Publish + run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - RELEASE_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .id || echo "") - PRE_RELEASE=$(curl -s https://api.github.com/repos/dappnode/${{ github.repository }}releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .prerelease) - if [ $PRE_RELEASE == "false" ];then - exit 1 - elif [ ! -z "$RELEASE_ID" ];then - curl -H "Authorization: token ${GITHUB_TOKEN}" -X DELETE https://api.github.com/repos/${{ github.repository }}/releases/${RELEASE_ID} - fi - - - name: Docker-Compose Build - run: | - docker-compose build - - - name: dappnodesdk publish - id: dappnodesdk-publish - run: | - sed -i "s/upstreamVersion\":.*,/upstreamVersion\": \"${{ steps.dispatch-event.outputs.TAG }}\",/g" dappnode_package.json - dappnodesdk publish patch -p remote - echo "::set-output name=CONTENT_HASH::$(cat ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash | sed 's/\//%2F/g')" - echo "::set-output name=PACKAGE_NAME::$(cat dappnode_package.json | jq .name | tr -d "\"")" - - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - release_name: v${{ steps.next-release.outputs.DNP_VERSION }} - tag_name: ${{ steps.dispatch-event.outputs.TAG }} - body: | - # ${{ steps.dispatch-event.outputs.TAG }} - You can execute a transaction to publish this package from the Admin UI with Metamask by following this pre-filled [link](http://my.dappnode/#/sdk/publish/r=${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}&v=${{ steps.next-release.outputs.DNP_VERSION }}&h=${{ steps.dappnodesdk-publish.outputs.CONTENT_HASH }}) - draft: false - prerelease: true - - - name: Upload release .xz file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz - asset_name: ${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz - asset_content_type: "application/octet-stream" - - - name: Upload release avatar file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/avatar.png - asset_name: avatar.png - asset_content_type: "application/octet-stream" - - - name: Upload release dappnode_package.json file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/dappnode_package.json - asset_name: dappnode_package.json - asset_content_type: "application/octet-stream" - - - name: Upload release docker-compose.yml file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/docker-compose.yml - asset_name: docker-compose.yml - asset_content_type: "application/octet-stream" - - - name: Upload release content-hash file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash - asset_name: content-hash - asset_content_type: "application/octet-stream" - - - name: Commit changes - run: | - git config --global user.email "eduadiez@gmail.com" - git config --global user.name "Eduardo" - git commit -am "Github action update" - git push + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" diff --git a/build/Dockerfile b/build/Dockerfile index 6fe02e4..5e1b655 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,16 +1,16 @@ +# Build Geth in a stock Go builder container +FROM golang:1.14-alpine as builder + ARG UPSTREAM_VERSION -FROM ethereum/client-go:${UPSTREAM_VERSION} as geth -# Pull Parity into a second stage deploy alpine container -FROM alpine:edge +RUN apk add --no-cache make gcc musl-dev linux-headers git && \ + git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ + cd go-ethereum && make geth -RUN apk --no-cache add \ - libstdc++ \ - eudev-libs \ - libgcc \ - bash +# Pull Geth into a second stage deploy alpine container +FROM alpine:latest -COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth +RUN apk add --no-cache ca-certificates +COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin -ENV SYNCMODE fast ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index a80e22f..02b9e0a 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -15,6 +15,10 @@ "Blockchain" ], "license": "GLP-3.0", + "architectures": [ + "linux/amd64", + "linux/arm64" + ], "links": { "endpoint": "http://geth.dappnode:8545", "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" diff --git a/docker-compose.yml b/docker-compose.yml index 8b8af4c..7fd4164 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - - UPSTREAM_VERSION + UPSTREAM_VERSION: v1.9.22 volumes: - 'geth:/root/.ethereum' environment: From 499826a72c8f4cf3a8349c939385acaf543137c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:02:55 +0200 Subject: [PATCH 29/50] change version --- dappnode_package.json | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 02b9e0a..4150b55 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.9", - "upstreamVersion": "v1.9.15", + "upstreamVersion": "v1.9.21", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index 7fd4164..5bc55a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - UPSTREAM_VERSION: v1.9.22 + UPSTREAM_VERSION: v1.9.21 volumes: - 'geth:/root/.ethereum' environment: From ae0ec7d60f91eb712388afc758ad4b9dea290ef3 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu, 17 Sep 2020 12:58:22 +0300 Subject: [PATCH 30/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 196c130..6c2daee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Görli testnet DAppNode package +# Geth DAppNode package [![DAppNodeStore Available](https://img.shields.io/badge/DAppNodeStore-Available-brightgreen.svg)](http://my.dappnode/#/installer/geth.dnp.dappnode.eth) From a4a44218e115447e1fe0bf8a0877f6e8ddc18a2d Mon Sep 17 00:00:00 2001 From: dapplion Date: Wed, 23 Sep 2020 17:32:38 +0300 Subject: [PATCH 31/50] Add main GA --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6a48af9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: "Main" +on: + pull_request: + push: + branches: + - "master" + - "v[0-9]+.[0-9]+.[0-9]+" + paths-ignore: + - "README.md" + +jobs: + build-test: + runs-on: ubuntu-16.04 + name: Build test + if: github.event_name != 'push' + steps: + - uses: actions/checkout@v2 + - run: docker-compose build + + release: + name: Release + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - name: Publish + run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset --timeout 2h + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" From 237056849f7daad7bd41ceb0e7c53f1a7021b7de Mon Sep 17 00:00:00 2001 From: dapplion Date: Wed, 23 Sep 2020 17:29:52 +0300 Subject: [PATCH 32/50] Support multi-arch --- build/Dockerfile | 8 ++++++++ dappnode_package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/build/Dockerfile b/build/Dockerfile index 5e1b655..ee0ecc4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -7,6 +7,14 @@ RUN apk add --no-cache make gcc musl-dev linux-headers git && \ git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ cd go-ethereum && make geth + +FROM alpine:edge +RUN apk add --no-cache make gcc musl-dev linux-headers git && \ + git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ + cd go-ethereum && make geth + +RUN apk --no-cache add \ + libstdc++ eudev-libs libgcc bash # Pull Geth into a second stage deploy alpine container FROM alpine:latest diff --git a/dappnode_package.json b/dappnode_package.json index 4150b55..081b351 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -5,6 +5,7 @@ "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", + "architectures": ["linux/amd64", "linux/arm64"], "chain": "ethereum", "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ From 315b835857b72e7d9edf2f7b41aec0ee1c6065d8 Mon Sep 17 00:00:00 2001 From: next-branch Date: Wed, 23 Sep 2020 15:19:50 +0000 Subject: [PATCH 33/50] Bump to new version: 0.1.11 --- dappnode_package.json | 5 ++++- docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 081b351..f444d49 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -5,7 +5,10 @@ "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", - "architectures": ["linux/amd64", "linux/arm64"], + "architectures": [ + "linux/amd64", + "linux/arm64" + ], "chain": "ethereum", "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ diff --git a/docker-compose.yml b/docker-compose.yml index 5bc55a6..3a5ed43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.9' + image: 'geth.dnp.dappnode.eth:0.1.11' build: context: ./build args: From 26eb1b464dc9bcc7bf0045c21370c93203bfb699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:33:43 +0200 Subject: [PATCH 34/50] Improve autorelease --- .github/workflows/auto_check.yml | 1 - .github/workflows/dispatch_release.yml | 36 -------------------------- build/Dockerfile | 9 ------- dappnode_package.json | 4 --- 4 files changed, 50 deletions(-) delete mode 100644 .github/workflows/dispatch_release.yml diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index a7f8096..409a3e5 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -5,7 +5,6 @@ on: # * is a special character in YAML so you have to quote this string # - cron: '00 */4 * * *' - cron: '* * * * *' - - cron: '00 */12 * * *' jobs: dappnodepackage-update: name: Trigger the DAppNode Package update diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml deleted file mode 100644 index 64acb74..0000000 --- a/.github/workflows/dispatch_release.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "Main" -on: - repository_dispatch: - pull_request: - push: - branches: - - "master" - - "v[0-9]+.[0-9]+.[0-9]+" - paths-ignore: - - "README.md" - -jobs: - build-test: - runs-on: ubuntu-16.04 - name: Build test - if: github.event_name != 'push' - steps: - - name: Checkout - uses: actions/checkout@v2 - - run: docker-compose build - - release: - name: Release - runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event_name == 'repository_dispatch' - steps: - - uses: actions/checkout@v2 - - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: "10.x" - - name: Publish - run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" diff --git a/build/Dockerfile b/build/Dockerfile index 4c58725..84e35bd 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -6,15 +6,6 @@ ARG UPSTREAM_VERSION RUN apk add --no-cache make gcc musl-dev linux-headers git && \ git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ cd go-ethereum && make geth - - -FROM alpine:edge -RUN apk add --no-cache make gcc musl-dev linux-headers git && \ - git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ - cd go-ethereum && make geth - -RUN apk --no-cache add \ - libstdc++ eudev-libs libgcc bash # Pull Geth into a second stage deploy alpine container FROM alpine:latest diff --git a/dappnode_package.json b/dappnode_package.json index f444d49..d5e96dd 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -19,10 +19,6 @@ "Blockchain" ], "license": "GLP-3.0", - "architectures": [ - "linux/amd64", - "linux/arm64" - ], "links": { "endpoint": "http://geth.dappnode:8545", "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" From 3257f24a6e47c29cef6e0ce1bd89497ac6bd268f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:50:38 +0200 Subject: [PATCH 35/50] fix GHA --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a48af9..876b899 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: build-test: runs-on: ubuntu-16.04 name: Build test - if: github.event_name != 'push' + if: github.event_name == 'push' || github.event_name == 'repository_dispatch' steps: - uses: actions/checkout@v2 - run: docker-compose build From bb79cf9cece6a72f04d8642f7b81594f9c4c7c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:56:43 +0200 Subject: [PATCH 36/50] Add repository_dispatch --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 876b899..e89d6e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,6 @@ name: "Main" on: + repository_dispatch: pull_request: push: branches: From c7f91cbd0aaa62ba1f3d5c6be059a2dd26fed87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 5 Oct 2020 11:28:59 +0200 Subject: [PATCH 37/50] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e89d6e6..3f2d211 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: github.event_name == 'push' + if: github.event_name == 'push' || github.event_name == 'repository_dispatch' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 From d381217ee902fe5c392ee4b01933a7fb09a3d5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 5 Oct 2020 11:52:58 +0200 Subject: [PATCH 38/50] Update auto_check.yml --- .github/workflows/auto_check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index 409a3e5..a974388 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -3,8 +3,7 @@ name: Update DAppNode package on: schedule: # * is a special character in YAML so you have to quote this string - # - cron: '00 */4 * * *' - - cron: '* * * * *' + - cron: '00 */4 * * *' jobs: dappnodepackage-update: name: Trigger the DAppNode Package update From 3639988ebd02ac6c084c4347db9c3eab2170c79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 5 Oct 2020 12:39:58 +0200 Subject: [PATCH 39/50] Update auto_check.yml --- .github/workflows/auto_check.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index a974388..dacbebc 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -22,7 +22,15 @@ jobs: echo "::set-output name=trigger_update::true" fi echo ::set-output name=TAG::$UPSTREAM_TAG - + - name: update UPSTREAM_VERSION and commit changes + if: steps.get_tag.outputs.trigger_update == 'true' + run: | + sed -i "s/ UPSTREAM_VERSION: .*/ UPSTREAM_VERSION: ${{ steps.get_tag.outputs.TAG }}/g" docker-compose.yml + sed -i "s/ \"upstreamVersion\": \".*\",/ \"upstreamVersion\": \"${{ steps.get_tag.outputs.TAG }}\",/g" dappnode_package.json + git config --global user.email "eduadiez@gmail.com" + git config --global user.name "Eduardo" + git commit -am "Github action bumped version to ${{ steps.get_tag.outputs.TAG }}" + git push - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | From b179fb3ab08f07d7583fe21cb3e6d2b3baf812cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 5 Oct 2020 13:00:52 +0200 Subject: [PATCH 40/50] Update dappnode_package.json --- dappnode_package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index d5e96dd..912ef51 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.9", - "upstreamVersion": "v1.9.21", + "upstreamVersion": "v1.9.22", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", @@ -30,4 +30,4 @@ "bugs": { "url": "https://github.com/dappnode/DAppNodePackage-geth/issues" } -} \ No newline at end of file +} From 62e3e422dd0f5d1531038b01c66f4da444706686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 5 Oct 2020 13:01:09 +0200 Subject: [PATCH 41/50] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3a5ed43..1ba1667 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - UPSTREAM_VERSION: v1.9.21 + UPSTREAM_VERSION: v1.9.22 volumes: - 'geth:/root/.ethereum' environment: From 5dea9eb29ab4bf41d82de0685f21307a0a43daab Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 15 Oct 2020 12:04:57 +0000 Subject: [PATCH 42/50] Github action bumped version to v1.9.23 --- dappnode_package.json | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 912ef51..6f2c9e4 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.9", - "upstreamVersion": "v1.9.22", + "upstreamVersion": "v1.9.23", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index 1ba1667..ba9f387 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - UPSTREAM_VERSION: v1.9.22 + UPSTREAM_VERSION: v1.9.23 volumes: - 'geth:/root/.ethereum' environment: From 12866c74566074d89e2b73ba0dc753ac752ad614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Thu, 12 Nov 2020 22:48:25 +0100 Subject: [PATCH 43/50] Bump golang version to 1.15.5 --- build/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 84e35bd..977ecd1 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,10 +1,15 @@ # Build Geth in a stock Go builder container -FROM golang:1.14-alpine as builder +FROM golang:1.15-alpine as builder ARG UPSTREAM_VERSION -RUN apk add --no-cache make gcc musl-dev linux-headers git && \ - git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ +RUN apk add --no-cache make gcc musl-dev linux-headers git +ADD https://golang.org/dl/go1.15.5.src.tar.gz /tmp/go.tar.gz +RUN (cd /tmp && tar -xf go.tar.gz) +RUN (cd /tmp/go/src && ./make.bash) +ENV PATH="/tmp/go/bin:${PATH}" + +RUN git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ cd go-ethereum && make geth # Pull Geth into a second stage deploy alpine container From c75e5c1937398a683cc00be26201d1c36fe98208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Thu, 12 Nov 2020 22:53:43 +0100 Subject: [PATCH 44/50] Bumo version --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ba9f387..f9ab744 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - UPSTREAM_VERSION: v1.9.23 + UPSTREAM_VERSION: v1.9.24 volumes: - 'geth:/root/.ethereum' environment: From 58d756e94b4511d3dbbb61683e534b5742955229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Thu, 12 Nov 2020 22:54:37 +0100 Subject: [PATCH 45/50] Add bash --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 977ecd1..8de01cf 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -3,7 +3,7 @@ FROM golang:1.15-alpine as builder ARG UPSTREAM_VERSION -RUN apk add --no-cache make gcc musl-dev linux-headers git +RUN apk add --no-cache make gcc musl-dev linux-headers git bash ADD https://golang.org/dl/go1.15.5.src.tar.gz /tmp/go.tar.gz RUN (cd /tmp && tar -xf go.tar.gz) RUN (cd /tmp/go/src && ./make.bash) From e3a8d037bfedbd0d14c434bc9c41dfff79e82c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 13 Nov 2020 08:59:33 +0100 Subject: [PATCH 46/50] update deprecated flags --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 8de01cf..4317efd 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -19,4 +19,4 @@ RUN apk add --no-cache ca-certificates COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin -ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS +ENTRYPOINT geth --http --http.addr 0.0.0.0 --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --ws.addr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS From 582375931d5e991c551be1a71f94fcb4048b7b32 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed, 18 Nov 2020 18:58:39 +0000 Subject: [PATCH 47/50] Add dockerTimeout What would be a sensible value for the max timeout? It should leave enough time for Geth to store pending states in memory. **MUST** make sure that signals propagate correctly beforehand --- dappnode_package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/dappnode_package.json b/dappnode_package.json index 6f2c9e4..7941477 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -10,6 +10,7 @@ "linux/arm64" ], "chain": "ethereum", + "dockerTimeout": "5min", "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", From 72d55c8809e2186975b4b0c78cbbb8c914c8c2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Wed, 25 Nov 2020 13:29:58 +0100 Subject: [PATCH 48/50] Minor fixes --- build/Dockerfile | 6 +----- docker-compose.yml | 10 +++++----- releases.json | 6 +++--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 4317efd..3c8773f 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -4,10 +4,6 @@ FROM golang:1.15-alpine as builder ARG UPSTREAM_VERSION RUN apk add --no-cache make gcc musl-dev linux-headers git bash -ADD https://golang.org/dl/go1.15.5.src.tar.gz /tmp/go.tar.gz -RUN (cd /tmp && tar -xf go.tar.gz) -RUN (cd /tmp/go/src && ./make.bash) -ENV PATH="/tmp/go/bin:${PATH}" RUN git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ cd go-ethereum && make geth @@ -19,4 +15,4 @@ RUN apk add --no-cache ca-certificates COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin -ENTRYPOINT geth --http --http.addr 0.0.0.0 --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --ws.addr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS +ENTRYPOINT geth --http --http.addr 0.0.0.0 --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --ws.addr 0.0.0.0 --syncmode ${SYNCMODE:-fast} $EXTRA_OPTS diff --git a/docker-compose.yml b/docker-compose.yml index f9ab744..da9aee7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,18 @@ -version: '3.4' +version: "3.4" services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.11' + image: "geth.dnp.dappnode.eth:0.1.9" build: context: ./build args: UPSTREAM_VERSION: v1.9.24 volumes: - - 'geth:/root/.ethereum' + - "geth:/root/.ethereum" environment: - - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' + - "EXTRA_OPTS=--rpcapi eth,net,web3,txpool --nousb" - SYNCMODE ports: - - '30303' + - "30303" - 30303/udp - 30304/udp restart: always diff --git a/releases.json b/releases.json index 48986a9..3c6bba0 100644 --- a/releases.json +++ b/releases.json @@ -55,10 +55,10 @@ "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.8&h=%2Fipfs%2FQmUf1uzqZdXyKt4YB96nr1F9GtxUWnPu8hSs7WXJnoc5Cj" }, "0.1.9": { - "hash": "/ipfs/QmbpQoSXzPcBwm1LUeVMPosgsVUf772pN32xjDyxWnPEHT", + "hash": "/ipfs/QmPF4HJoNmJkoFBedv2CfVQGdPECYTmnZU3kCTodN4vkqg", "uploadedTo": { - "remote": "Fri, 07 Aug 2020 13:19:24 GMT" + "dappnode": "Wed, 25 Nov 2020 09:18:56 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.9&h=%2Fipfs%2FQmbpQoSXzPcBwm1LUeVMPosgsVUf772pN32xjDyxWnPEHT" } -} \ No newline at end of file +} From a7b132a52ac1bae4ee1a8574362c040873a2af6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Wed, 16 Dec 2020 08:38:44 +0100 Subject: [PATCH 49/50] Increase timeout --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 7941477..068b7a5 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -10,7 +10,7 @@ "linux/arm64" ], "chain": "ethereum", - "dockerTimeout": "5min", + "dockerTimeout": "20min", "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", From cec3afda30b518b6d1a071a043b1b00b44f44954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Wed, 16 Dec 2020 08:41:20 +0100 Subject: [PATCH 50/50] Bump version and add metrics --- build/Dockerfile | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 3c8773f..033866d 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -15,4 +15,4 @@ RUN apk add --no-cache ca-certificates COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin -ENTRYPOINT geth --http --http.addr 0.0.0.0 --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --ws.addr 0.0.0.0 --syncmode ${SYNCMODE:-fast} $EXTRA_OPTS +ENTRYPOINT geth --http --http.addr 0.0.0.0 --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --ws.addr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --metrics --metrics.addr 0.0.0.0 $EXTRA_OPTS diff --git a/docker-compose.yml b/docker-compose.yml index da9aee7..5ff2e99 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - UPSTREAM_VERSION: v1.9.24 + UPSTREAM_VERSION: v1.9.25 volumes: - "geth:/root/.ethereum" environment: @@ -15,6 +15,6 @@ services: - "30303" - 30303/udp - 30304/udp - restart: always + restart: unless-stopped volumes: geth: {}