feat: implement MESSAGE transaction type and re-enable state root computation
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 5s
Integration Tests / test-service-integration (push) Failing after 13s
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 38s

- Add MESSAGE transaction type to router.py valid_types
- Add MESSAGE handling to state_transition.py (value=0, fee-only)
- Add GasType.MESSAGE to gas schedules
- Re-enable state root computation in poa.py
- Change SQLite journal_mode to WAL for corruption prevention
- Add chattr +C to setup.sh for Btrfs CoW prevention
This commit is contained in:
aitbc
2026-04-22 13:06:01 +02:00
parent 054adaf7be
commit a6a840a930
5 changed files with 146 additions and 37 deletions

View File

@@ -173,7 +173,7 @@ def _serialize_receipt(receipt: Receipt) -> Dict[str, Any]:
class TransactionRequest(BaseModel):
type: str = Field(description="Transaction type, e.g. TRANSFER, RECEIPT_CLAIM, GPU_MARKETPLACE, EXCHANGE")
type: str = Field(description="Transaction type, e.g. TRANSFER, RECEIPT_CLAIM, GPU_MARKETPLACE, EXCHANGE, MESSAGE")
sender: str
nonce: int
fee: int = Field(ge=0)
@@ -183,7 +183,7 @@ class TransactionRequest(BaseModel):
@model_validator(mode="after")
def normalize_type(self) -> "TransactionRequest": # type: ignore[override]
normalized = self.type.upper()
valid_types = {"TRANSFER", "RECEIPT_CLAIM", "GPU_MARKETPLACE", "EXCHANGE"}
valid_types = {"TRANSFER", "RECEIPT_CLAIM", "GPU_MARKETPLACE", "EXCHANGE", "MESSAGE"}
if normalized not in valid_types:
raise ValueError(f"unsupported transaction type: {normalized}. Valid types: {valid_types}")
self.type = normalized