Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions .github/scripts/update_upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
- Updates the upstream version in dappnode_package-mainnet.json
- Updates the image tag in docker-compose-mainnet.yml
- Updates the VERSION build arg in docker-compose-mainnet.yml
- Applies the same updates to the root dappnode_package.json
and docker-compose.yml

Note: Only mainnet files are updated by this script.
Note: Only mainnet files (build/ and repo root) are updated by this script.
"""

import json
Expand Down Expand Up @@ -229,30 +231,31 @@ def main():
print(f"Update available: {current_upstream} -> {latest_geth_version}")
print("=" * 60 + "\n")

# Only update mainnet files
# Mainnet build files and their root-level counterparts
mainnet_package = build_dir / 'dappnode_package-mainnet.json'
mainnet_compose = build_dir / 'docker-compose-mainnet.yml'

if not mainnet_package.exists():
print(f"Error: {mainnet_package} not found")
sys.exit(1)

if not mainnet_compose.exists():
print(f"Error: {mainnet_compose} not found")
sys.exit(1)

print("Updating mainnet package file...")

root_package = repo_root / 'dappnode_package.json'
root_compose = repo_root / 'docker-compose.yml'

for required_file in (mainnet_package, mainnet_compose, root_package, root_compose):
if not required_file.exists():
print(f"Error: {required_file} not found")
sys.exit(1)

print("Updating package files...")

# Calculate new version
new_pkg_version = increment_patch_version(current_version)
# Update package JSON

# Update package JSONs
update_package_json(mainnet_package, new_pkg_version, latest_geth_version)

print("\nUpdating mainnet docker-compose file...")

# Update docker-compose
update_package_json(root_package, new_pkg_version, latest_geth_version)

print("\nUpdating docker-compose files...")

# Update docker-compose files
update_docker_compose(mainnet_compose, new_pkg_version, latest_geth_version)
update_docker_compose(root_compose, new_pkg_version, latest_geth_version)

print("\n" + "=" * 60)
print("Update completed successfully!")
Expand All @@ -270,7 +273,7 @@ def main():
print("\nSummary:")
print(f" Geth version: {current_upstream} -> {latest_geth_version}")
print(f" Package version: {current_version} -> {new_pkg_version}")
print(f" Files updated: mainnet only")
print(f" Files updated: build mainnet + repo root")


if __name__ == '__main__':
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/update_upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ jobs:
### Changes made:

- Updated `upstream` version in `dappnode_package-mainnet.json`
and `dappnode_package.json`
- Incremented `version` (patch level) in
`dappnode_package-mainnet.json`
`dappnode_package-mainnet.json` and `dappnode_package.json`
- Updated `image` tag in `docker-compose-mainnet.yml`
and `docker-compose.yml`
- Updated `VERSION` build argument in
`docker-compose-mainnet.yml`
`docker-compose-mainnet.yml` and `docker-compose.yml`

### Package version changes:

Expand Down
15 changes: 5 additions & 10 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ethchain-geth.public.dappnode.eth",
"version": "10.0.81",
"upstream": "v1.17.3",
"version": "10.0.82",
"upstream": "v1.17.4",
"autoupdate": true,
"title": "Ethereum node (Geth + mainnet)",
"description": "Ethereum Client - based on Geth",
Expand All @@ -10,13 +10,8 @@
"chain": "ethereum",
"image": {
"restart": "always",
"ports": [
"30303:30303",
"30303:30303/udp"
],
"volumes": [
"ethchain-geth:/root/.ethereum/ethchain-geth"
],
"ports": ["30303:30303", "30303:30303/udp"],
"volumes": ["ethchain-geth:/root/.ethereum/ethchain-geth"],
"environment": [
"NETWORK=mainnet",
"EXTRA_OPTS=--http.api eth,net,web3,txpool"
Expand All @@ -30,4 +25,4 @@
"WS endpoint": "ws://ethchain-geth.my.ava.do:8546",
"EE endpoint (http)": "http://ethchain-geth.my.ava.do:8551"
}
}
}
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: '3.4'
version: "3.4"
services:
ethchain-geth.public.dappnode.eth:
image: 'ethchain-geth.public.dappnode.eth:10.0.81'
image: "ethchain-geth.public.dappnode.eth:10.0.82"
build:
context: ./build
args:
VERSION: v1.17.3
VERSION: v1.17.4
volumes:
- 'ethchain-geth:/root/.ethereum/ethchain-geth'
- "ethchain-geth:/root/.ethereum/ethchain-geth"
ports:
- '443:443'
- '8545:8545'
- '8546:8546'
- '8551:8551'
- '30303:30303'
- '30303:30303/udp'
- "443:443"
- "8545:8545"
- "8546:8546"
- "8551:8551"
- "30303:30303"
- "30303:30303/udp"
restart: always
environment:
- NETWORK=mainnet
Expand Down
Loading