Merged
Conversation
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.
This reverts commit f393d6f.
This reverts commit 8edeba4.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Checklist
Build & Tests
npm installcompletes without errorsnpm run buildcompletes without errorsnpm testpasses all testsCode Quality
Documentation
Security
OP_NET Node Specific
Testing
Consensus Impact
Related Issues
By submitting this PR, I confirm that my contribution is made under the terms of the project's license.