Implement RECEIPT_CLAIM transaction type
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 4s
Documentation Validation / validate-docs (push) Successful in 12s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Failing after 12s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Successful in 31s

- Add status fields to Receipt model (status, claimed_at, claimed_by)
- Add RECEIPT_CLAIM handling to state_transition.py with validation and reward minting
- Add type field to Transaction model for reliable transaction type storage
- Update router to use TransactionRequest model to preserve type field
- Update poa.py to extract type from mempool transaction content and store only original payload
- Add RECEIPT_CLAIM to GasType enum with gas schedule
This commit is contained in:
aitbc
2026-04-22 13:35:31 +02:00
parent a6a840a930
commit f36fd45d28
40 changed files with 1194 additions and 349 deletions

View File

@@ -1,7 +1,7 @@
# Blockchain Documentation
**Generated**: 2026-03-08 13:06:38
**Last Updated**: 2026-04-20
**Last Updated**: 2026-04-22
**Total Files**: 3
## Documentation Files
@@ -9,6 +9,34 @@
- [Adding gitea-runner as Third Blockchain Node (aitbc2)](adding_gitea_runner_as_third_node.md) - Complete guide for adding a third node to the AITBC blockchain network, including configuration steps, issues encountered, and verification procedures.
- [Blockchain Synchronization Issues and Fixes](blockchain_synchronization_issues_and_fixes.md) - Documentation of synchronization issues between AITBC nodes and their resolutions.
## Transaction Types
The AITBC blockchain supports the following transaction types:
- **TRANSFER**: Standard value transfer between accounts
- **MESSAGE**: On-chain messaging (value=0, fee-only) - allows sending short text messages without balance transfers
- **RECEIPT_CLAIM**: Claim rewards from job completion receipts
- **GPU_MARKETPLACE**: GPU marketplace transactions (bids, offers, purchases)
- **EXCHANGE**: Exchange transactions (orders, trades, swaps, liquidity)
### MESSAGE Transaction Type
The MESSAGE transaction type allows users to send short on-chain messages without affecting account balances. The message is stored in the transaction payload and only the fee is deducted from the sender's balance.
**Usage:**
```bash
curl -X POST http://localhost:8006/rpc/transaction \
-H "Content-Type: application/json" \
-d '{"type":"MESSAGE","from":"address","to":"address","amount":0,"fee":1000,"nonce":1,"payload":{"message":"Hello blockchain!"},"sig":"signature"}'
```
**Characteristics:**
- value must be 0
- fee > 0
- recipient can be any address (or special "null" address)
- No balance transfers (only fee deduction)
- Message stored in transaction payload
## Category Overview
This section contains documentation related to blockchain node setup, synchronization, and network configuration.