Skip to content

Commit 0b8727d

Browse files
Merge branch 'master' into feat/ice-pallet
2 parents 5151a3c + 8961712 commit 0b8727d

6 files changed

Lines changed: 52 additions & 8 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile.binary

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Package a pre-built linux/amd64 `hydradx` binary into a runnable image — no compile.
2+
# Runtime base matches Dockerfile.with-builder (bookworm, glibc 2.36) so a release binary
3+
# built on the team's bookworm toolchain runs without a libc mismatch. Expects the binary
4+
# at target/release/hydradx; build for the target arch with `docker buildx --platform`.
5+
FROM debian:bookworm-slim
6+
LABEL org.opencontainers.image.source="https://github.com/galacticcouncil/hydration-node"
7+
8+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
RUN useradd -m -u 1000 -U -s /bin/sh -d /hydra hydra && \
12+
mkdir -p /hydra/.local/share && \
13+
chown -R hydra:hydra /hydra
14+
15+
COPY target/release/hydradx /usr/local/bin/hydradx
16+
RUN chmod +x /usr/local/bin/hydradx
17+
18+
USER hydra
19+
EXPOSE 30333 9933 9944 9615
20+
VOLUME ["/hydra/.local/share"]
21+
22+
ENTRYPOINT ["/usr/local/bin/hydradx"]
23+
CMD ["--prometheus-external", "--", "--execution=wasm" ,"--telemetry-url", "wss://telemetry.hydradx.io:9000/submit/ 0"]

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ docker: build
7676
docker build -t hydra-dx .
7777
docker tag hydra-dx galacticcouncil/hydra-dx:latest
7878

79+
# Package a pre-built linux/amd64 `hydradx` binary (at target/release/) into an image —
80+
# no compile, no git fetch. Run e.g. `make docker-amd64 TAG=v399-test`; buildx emits an
81+
# amd64 manifest even on an arm host.
82+
DOCKER_IMAGE := galacticcouncil/hydra-dx
83+
TAG := latest
84+
85+
.PHONY: docker-amd64
86+
docker-amd64:
87+
cd target/release && $(sha256sum) -c hydradx.sha256
88+
docker buildx build --platform linux/amd64 -f Dockerfile.binary -t $(DOCKER_IMAGE):$(TAG) --load .
89+
7990
checksum:
8091
$(sha256sum) target/release/hydradx > target/release/hydradx.sha256
8192
cp runtime/hydradx/target/srtool/release/wbuild/hydradx-runtime/hydradx_runtime.compact.compressed.wasm target/release/

node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hydradx"
3-
version = "15.1.5"
3+
version = "15.1.6"
44
description = "Hydration node"
55
authors = ["GalacticCouncil"]
66
edition = "2021"

node/res/hydradx.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"id": "hydra",
44
"chainType": "Live",
55
"bootNodes": [
6-
"/dns/p2p-01.hydra.hydradx.io/tcp/30333/p2p/12D3KooWHzv7XVVBwY4EX1aKJBU6qzEjqGk6XtoFagr5wEXx6MsH",
7-
"/dns/p2p-02.hydra.hydradx.io/tcp/30333/p2p/12D3KooWR72FwHrkGNTNes6U5UHQezWLmrKu6b45MvcnRGK8J3S6",
8-
"/dns/p2p-03.hydra.hydradx.io/tcp/30333/p2p/12D3KooWFDwxZinAjgmLVgsideCmdB2bz911YgiQdLEiwKovezUz",
9-
"/dns4/boot.helikon.io/tcp/15120/p2p/12D3KooWDcQY1L2ny3F7YPyP4snCZZYc4eKWgPLEzdBvWBUjH5Yt",
10-
"/dns4/boot.helikon.io/tcp/15125/wss/p2p/12D3KooWDcQY1L2ny3F7YPyP4snCZZYc4eKWgPLEzdBvWBUjH5Yt",
6+
"/dns/p2p-01.hydra.hydradx.io/tcp/30333/p2p/12D3KooWDZvr1trejZptZq9aPYE5owDrHAwGhNivw8bpAXkxVGXX",
7+
"/dns/p2p-02.hydra.hydradx.io/tcp/30333/p2p/12D3KooWJchDHSvN8xuerTwJm7GEdEHQ299yGerJ4S1fud5kWUgJ",
8+
"/dns/p2p-03.hydra.hydradx.io/tcp/30333/p2p/12D3KooWJr2g3EFNqcF6z9rUy2EeRracoWUyDUtksdv2CUVxwrqZ",
9+
"/dns/hdx.shellfish.hydration.cloud/tcp/30334/p2p/12D3KooWLbvUYQ2dr5uKsAZZP3FLPba1QEHfSEzsXFwsM9uH712S",
1110
"/dns/hydration.boot.stake.plus/tcp/30332/wss/p2p/12D3KooWGZaDfqPyzVxhA3k1qv72P7xqYTJS8W9U7GWUEdXYhtUU",
1211
"/dns/hydration.boot.stake.plus/tcp/31332/wss/p2p/12D3KooWBJMG8LCh6pLYbGapA3SNzjhQWE87ieGux41jKQrrf5js",
1312
"/dns/hydration-boot-ng.dwellir.com/tcp/443/wss/p2p/12D3KooWMNf1YGh3rxaiWPjzQ1UKQxKq2WSjAKdrSgdcYaFH4ie5",

node/src/service.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,23 @@ pub fn new_partial(
166166
extra_pages: h as _,
167167
});
168168

169+
// The upstream default runtime cache size (2) is too small for nodes serving
170+
// historical state across runtime upgrades: the hot working set spans several
171+
// runtime versions, so a cache of 2 evicts and re-prepares WASM runtimes
172+
// constantly and exhausts the instance pool under indexer/RPC load. Treat the
173+
// upstream default as "unset" and use 8; any explicit operator value is honored.
174+
let runtime_cache_size = if config.executor.runtime_cache_size == 2 {
175+
8
176+
} else {
177+
config.executor.runtime_cache_size
178+
};
179+
169180
let executor = WasmExecutor::builder()
170181
.with_execution_method(config.executor.wasm_method)
171182
.with_onchain_heap_alloc_strategy(heap_pages)
172183
.with_offchain_heap_alloc_strategy(heap_pages)
173184
.with_max_runtime_instances(config.executor.max_runtime_instances)
174-
.with_runtime_cache_size(config.executor.runtime_cache_size)
185+
.with_runtime_cache_size(runtime_cache_size)
175186
.build();
176187

177188
let tx_priority_json = if no_tx_priority_override {

0 commit comments

Comments
 (0)