From 16dda390c623c0a65726a5f1a31349f1453eeef4 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Fri, 1 Aug 2025 16:41:00 -0400 Subject: [PATCH] fix: update start time when starting devnet Signed-off-by: Chris Gianelloni --- .gitignore | 1 + config/cardano/devnet/byron-genesis.json | 2 +- config/cardano/devnet/shelley-genesis.json | 2 +- devnet.sh | 8 +++++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b6b7b83e..3fd5f62c 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ go.work # Local data directory /.dingo +/.devnet # node_modules for npm publishing node_modules/ diff --git a/config/cardano/devnet/byron-genesis.json b/config/cardano/devnet/byron-genesis.json index 09653910..7c4ccd03 100644 --- a/config/cardano/devnet/byron-genesis.json +++ b/config/cardano/devnet/byron-genesis.json @@ -3,7 +3,7 @@ "k": 2160, "protocolMagic": 42 }, - "startTime": 1657186415, + "startTime": 1754080724, "blockVersionData": { "scriptVersion": 0, "slotDuration": "250", diff --git a/config/cardano/devnet/shelley-genesis.json b/config/cardano/devnet/shelley-genesis.json index bb16c082..d2fc4232 100644 --- a/config/cardano/devnet/shelley-genesis.json +++ b/config/cardano/devnet/shelley-genesis.json @@ -60,6 +60,6 @@ "074a515f7f32bf31a4f41c7417a8136e8152bfb42f06d71b389a6896": "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60" } }, - "systemStart": "2022-07-07T09:33:35Z", + "systemStart": "2025-08-01T20:38:44Z", "updateQuorum": 2 } diff --git a/devnet.sh b/devnet.sh index 6dc52cbe..e41c5353 100755 --- a/devnet.sh +++ b/devnet.sh @@ -1,10 +1,16 @@ #!/usr/bin/env bash export CARDANO_NETWORK=devnet -export CARDANO_CONFIG=./config/cardano/${CARDANO_NETWORK}/config.json +export CARDANO_CONFIG=./config/cardano/devnet/config.json export CARDANO_DATABASE_PATH=.devnet export CARDANO_DEV_MODE=true +conf=$(dirname $CARDANO_CONFIG) +now=$(date -u +%s) +echo setting start time in $conf to $now +sed -i -e "s/startTime\": .*,/startTime\": $now,/" $conf/byron-genesis.json +sed -i -e "s/systemStart\": .*,/systemStart\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ --date=@$now)\",/" $conf/shelley-genesis.json + echo resetting .devnet rm -rf .devnet/*