Skip to content

Commit cc0e0d3

Browse files
authored
Merge pull request #56 from input-output-hk/next-2024-12-19
Node 10.1.4, CLI 10.1/10.2, Mithril v2450
2 parents b384a05 + 64e3c59 commit cc0e0d3

File tree

14 files changed

+827
-155
lines changed

14 files changed

+827
-155
lines changed

.github/workflows/nix-jobs-test.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
4646
# Other params
4747
export BYRON_SIGNING_KEY="$KEY_DIR/utxo-keys/shelley.000.skey"
48+
export CARDANO_NODE_NETWORK_ID="42"
49+
export CARDANO_NODE_SOCKET_PATH="$DATA_DIR/node.socket"
4850
export ERA_CMD="alonzo"
4951
export MAJOR_VERSION="7"
5052
export NUM_GENESIS_KEYS="3"
@@ -78,13 +80,25 @@ jobs:
7880
"job-update-proposal-hard-fork"
7981
)
8082
83+
JOB_SEQ_NG=(
84+
"job-gen-custom-node-config-data-ng"
85+
"job-create-stake-pool-keys"
86+
"job-register-stake-pools"
87+
"job-delegate-rewards-stake-key"
88+
"job-retire-bootstrap-pool"
89+
)
90+
8191
RUN_TESTS() {
8292
local JOBS=("$@")
8393
8494
rm -rf workbench
8595
for i in ${JOBS[@]}; do
8696
echo "Running nix job .#$i"
87-
nix run ".#$i"
97+
if [ "$UNSTABLE" = "true" ] && [ "$i" = "job-gen-custom-node-config-data" ]; then
98+
ERA_CMD="conway" nix run ".#$i"
99+
else
100+
nix run ".#$i"
101+
fi
88102
done
89103
}
90104
@@ -106,3 +120,11 @@ jobs:
106120
107121
echo "Running sequence tests on pre-release..."
108122
RUN_TESTS "${JOB_SEQ[@]}"
123+
124+
echo "Running next-gen sequence tests with pre-release versioning..."
125+
set -x
126+
export BOOTSTRAP_POOL_DIR="$KEY_DIR/bootstrap-pool"
127+
export ERA_CMD="conway"
128+
export RICH_KEY="$KEY_DIR/utxo-keys/rich-utxo"
129+
set +x
130+
RUN_TESTS "${JOB_SEQ_NG[@]}"

flake.lock

Lines changed: 32 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
auth-keys-hub.url = "github:input-output-hk/auth-keys-hub";
66
auth-keys-hub.inputs.nixpkgs.follows = "nixpkgs";
77
colmena.inputs.nixpkgs.follows = "nixpkgs";
8-
colmena.url = "github:zhaofengli/colmena/v0.4.0";
8+
colmena.url = "github:zhaofengli/colmena";
99
flake-parts.url = "github:hercules-ci/flake-parts";
1010
inputs-check.url = "github:input-output-hk/inputs-check";
1111
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";

flake/nixosModules/profile-cardano-node-group.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@
365365
startLimitIntervalSec = 900;
366366

367367
serviceConfig = {
368+
# The ~2.3% difference between M and MiB units is already included in the scaling factor
368369
MemoryMax = "${toString (1.15 * cfg.totalMaxHeapSizeMiB / cfg.instances)}M";
369370
LimitNOFILE = "65535";
370371

@@ -392,7 +393,7 @@
392393
"-N${toString cores}"
393394
"-A16m"
394395
"-I3"
395-
"-M${toString (cfg.totalMaxHeapSizeMiB / cfg.instances)}M"
396+
"-M${toString (1.024 * cfg.totalMaxHeapSizeMiB / cfg.instances)}M"
396397
];
397398

398399
systemdSocketActivation = false;

flake/nixosModules/profile-cardano-postgres.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,35 @@
301301
SELECT 100 * (EXTRACT (epoch FROM (MAX (time) AT TIME ZONE 'UTC')) - EXTRACT (epoch FROM (MIN (time) AT TIME ZONE 'UTC')))
302302
/ (EXTRACT (epoch FROM (now () AT TIME ZONE 'UTC')) - EXTRACT (epoch FROM (MIN (time) AT TIME ZONE 'UTC')))
303303
AS sync_percent FROM block;
304+
305+
-- Show the last month of voting activity by hour
306+
PREPARE show_voting_by_hour AS
307+
WITH
308+
cc AS (
309+
SELECT DATE_TRUNC('hour', time) AS time, count(*) AS cc_votes FROM block
310+
INNER JOIN tx ON block_id=block.id
311+
INNER JOIN voting_procedure ON tx_id=tx.id
312+
WHERE time BETWEEN (CURRENT_TIMESTAMP - INTERVAL '30 DAYS') AND CURRENT_TIMESTAMP
313+
AND voter_role='ConstitutionalCommittee'
314+
GROUP BY DATE_TRUNC('hour', time)),
315+
spo AS (
316+
SELECT DATE_TRUNC('hour', time) AS time, count(*) AS spo_votes FROM block
317+
INNER JOIN tx ON block_id=block.id
318+
INNER JOIN voting_procedure ON tx_id=tx.id
319+
WHERE time BETWEEN (CURRENT_TIMESTAMP - INTERVAL '30 DAYS') AND CURRENT_TIMESTAMP
320+
AND voter_role='SPO'
321+
GROUP BY DATE_TRUNC('hour', time)),
322+
drep AS (
323+
SELECT DATE_TRUNC('hour', time) AS time, count(*) AS drep_votes FROM block
324+
INNER JOIN tx ON block_id=block.id
325+
INNER JOIN voting_procedure ON tx_id=tx.id
326+
WHERE time BETWEEN (CURRENT_TIMESTAMP - INTERVAL '30 DAYS') AND CURRENT_TIMESTAMP
327+
AND voter_role='DRep'
328+
GROUP BY DATE_TRUNC('hour', time))
329+
select COALESCE(cc.time, spo.time, drep.time) AS time, cc.cc_votes, spo.spo_votes, drep.drep_votes FROM cc
330+
FULL OUTER JOIN spo ON cc.time = spo.time
331+
FULL OUTER JOIN drep ON COALESCE(cc.time, spo.time) = drep.time
332+
ORDER BY time DESC;
304333
END IF;
305334
END IF;
306335
END$$;

0 commit comments

Comments
 (0)