From f1b74564b70ae0ff13b2cf0ef18eb30265d0fb2b Mon Sep 17 00:00:00 2001 From: aitbc Date: Wed, 20 May 2026 10:27:26 +0200 Subject: [PATCH] fix: remove genesis allocation from wallet generation - Remove genesis allocation to work around SQLite INTEGER overflow - Wallet generation now creates wallet without initial coin allocation - Wallet can be funded via blockchain API after node startup - Genesis allocation funding to be implemented separately --- .../deploy-integrated-blockchain-node.sh | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/scripts/deployment/deploy-integrated-blockchain-node.sh b/scripts/deployment/deploy-integrated-blockchain-node.sh index a93499a6..4f6cdbfd 100755 --- a/scripts/deployment/deploy-integrated-blockchain-node.sh +++ b/scripts/deployment/deploy-integrated-blockchain-node.sh @@ -215,7 +215,7 @@ EOF } generate_wallet_and_genesis() { - log_info "Generating wallet and genesis allocation..." + log_info "Generating wallet for node..." cd "$INSTALL_DIR" source venv/bin/activate @@ -250,30 +250,14 @@ wallet_path.parent.mkdir(parents=True, exist_ok=True) with open(wallet_path, "w") as f: json.dump(wallet_data, f, indent=2) -# Generate genesis allocation -genesis_allocation = { - "allocations": [ - { - "address": address, - "balance": "1000000", # 1 million tokens - "nonce": 0 - } - ] -} - -genesis_path = Path(f"/var/lib/aitbc/data/{CHAIN_ID}/genesis.json") -genesis_path.parent.mkdir(parents=True, exist_ok=True) -with open(genesis_path, "w") as f: - json.dump(genesis_allocation, f, indent=2) - print(f"Generated wallet: {address}") print(f"Saved wallet to: {wallet_path}") -print(f"Saved genesis allocation to: {genesis_path}") +print(f"Note: Wallet needs to be funded via blockchain API after node startup") EOF deactivate - log_info "Wallet and genesis allocation generated successfully" + log_info "Wallet generated successfully" } generate_genesis_block() {