Skip to content

Mempool/tx debug#246

Merged
BlobMaster41 merged 21 commits intomainfrom
mempool/tx-debug
Feb 27, 2026
Merged

Mempool/tx debug#246
BlobMaster41 merged 21 commits intomainfrom
mempool/tx-debug

Conversation

@BlobMaster41
Copy link
Contributor

Description

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Performance improvement
  • Consensus change (changes that affect state calculation or validation)
  • Refactoring (no functional changes)
  • Documentation update
  • CI/CD changes
  • Dependencies update

Checklist

Build & Tests

  • npm install completes without errors
  • npm run build completes without errors
  • npm test passes all tests

Code Quality

  • Code follows the project's coding standards
  • No new compiler warnings introduced
  • Error handling is appropriate
  • Logging is appropriate for debugging and monitoring

Documentation

  • Code comments added for complex logic
  • Public APIs are documented
  • README updated (if applicable)

Security

  • No sensitive data (keys, credentials) committed
  • No new security vulnerabilities introduced
  • RPC endpoints properly authenticated
  • Input validation in place for external data

OP_NET Node Specific

  • Changes are compatible with existing network state
  • Consensus logic changes are documented and tested
  • State transitions are deterministic
  • WASM VM execution is reproducible across nodes
  • P2P protocol changes are backward-compatible (or migration planned)
  • Database schema changes include migration path
  • Epoch finality and PoC/PoW logic unchanged (or documented if changed)

Testing

Consensus Impact

Related Issues


By submitting this PR, I confirm that my contribution is made under the terms of the project's license.

Introduce a MempoolTransaction/InvalidTransaction shape and replace previous boolean-false failure returns with structured InvalidTransaction objects across the mempool verifier stack. Update TransactionVerifierManager, TransactionVerifier interface, and BitcoinTransactionVerificatorV2 to return success/error info; set success=true for valid transactions and populate error messages on failure. Adjust Mempool to check decodedTransaction.success and include the verifier error in the response. These changes improve error reporting and typing for failed verification cases.
Add informative logging when the current block height is polled and when the mempool triggers transaction revalidation on block changes to improve observability (BlockchainInfoRepository, MempoolManager). Also clean up and consolidate import formatting in BitcoinTransactionVerificatorV2 for readability and maintainability.
Format some imports in bitcoin-mempool files and add more descriptive log prefixes for mempool components. MempoolManager imports were adjusted (minor reformatting) and its block-change log now includes a [MANAGER] tag; Mempool now logs a [MEM] prefix when the block height changes. These are non-functional cleanup changes to improve log clarity and code formatting.
Clean up noisy debug output and unused symbols: remove/disable console.log calls in TransactionFactory and BitcoinTransactionVerificatorV2, drop the unused toHex import, and tidy/reorganize imports in Mempool (group RPCMessage imports, add OPNetBroadcastData and BitcoinRPCThreadMessageType where appropriate). These changes reduce logging noise and fix an unused-import/lint issue.
Uncommented and added console.log statements to aid debugging: TransactionFactory now logs allowedChallenges and miner, and BitcoinTransactionVerificatorV2 logs solutions. Also reorganized and reformatted imports in BitcoinTransactionVerificatorV2 for clarity (reordered grouping and removed stray commas/spacing). These are non-functional changes intended to improve traceability while processing/verifying transactions.
Remove unused toHex import and comment out debug console.log in TransactionFactory; remove debug console.log in BitcoinTransactionVerificatorV2. Reorder and clean up imports in Mempool (normalize RPCMessage/RPCMessageData, add OPNetBroadcastData import) and adjust formatting. Update watchBlockchain log to use '<=' in the message to match the comparison. These are small refactors and logging cleanup with no substantive behavioral changes aside from clearer log text.
Remove a stray console.log in Mempool.watchBlockchain. In BitcoinTransactionVerificatorV2, add a serial blockChangeQueue and currentSolutionsHeight to deduplicate and serialize onBlockChange updates, ensuring allowedChallenges are loaded once per height and preventing rapid block-change DB floods. Old async implementation is commented out and imports/formatting are tidied.
@BlobMaster41 BlobMaster41 merged commit c7b3dce into main Feb 27, 2026
6 checks passed
@BlobMaster41 BlobMaster41 deleted the mempool/tx-debug branch February 27, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant