fix: correct transaction field mapping and standardize genesis path resolution in PoA consensus
All checks were successful
Integration Tests / test-service-integration (push) Successful in 49s
Documentation Validation / validate-docs (push) Successful in 15s
Security Scanning / security-scan (push) Successful in 1m15s
Python Tests / test-python (push) Successful in 1m18s

🔧 Transaction Field Mapping:
• Change sender field from "sender" to "from" in transaction parsing
• Change recipient field from nested "payload.to" to direct "to"
• Change value field from nested "payload.amount" to direct "amount"
• Align transaction structure with RPC endpoint format

📁 Genesis File Path Resolution:
• Use standardized /var/lib/aitbc/data/{chain_id}/genesis.json path
• Remove
This commit is contained in:
2026-03-30 08:13:57 +02:00
parent 5775b51969
commit 893ac594b0
9 changed files with 246 additions and 58 deletions

View File

@@ -8,32 +8,29 @@ echo "=== AITBC Wallet Creation (Enhanced CLI) ==="
echo "1. Pre-creation verification..."
echo "=== Current wallets on aitbc ==="
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py list'
/opt/aitbc/aitbc-cli list
echo "2. Creating new wallet on aitbc..."
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py create --name aitbc-user --password-file /var/lib/aitbc/keystore/.password'
/opt/aitbc/aitbc-cli create --name aitbc-user --password-file /var/lib/aitbc/keystore/.password
# Get wallet address using CLI
WALLET_ADDR=$(ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py balance --name aitbc-user --format json | jq -r ".address"')
WALLET_ADDR=$(/opt/aitbc/aitbc-cli balance --name aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
echo "New wallet address: $WALLET_ADDR"
# Verify wallet was created successfully using CLI
echo "3. Post-creation verification..."
echo "=== Updated wallet list ==="
ssh aitbc "/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py list --format json | jq '.[] | select(.name == \"aitbc-user\")'"
/opt/aitbc/aitbc-cli list | grep aitbc-user || echo "Wallet not found in list"
echo "=== New wallet details ==="
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py balance --name aitbc-user'
/opt/aitbc/aitbc-cli balance --name aitbc-user
echo "=== All wallets summary ==="
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py list'
/opt/aitbc/aitbc-cli list
echo "4. Cross-node verification..."
echo "=== Network status (aitbc1) ==="
/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py network
echo "=== Network status (aitbc) ==="
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py network'
echo "=== Network status (local) ==="
/opt/aitbc/aitbc-cli network 2>/dev/null || echo "Network status not available"
echo "✅ Wallet created successfully using enhanced CLI!"
echo "Wallet name: aitbc-user"