Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping Catch-up Mode to Access TXPool for Current Block in Full node #2669

Open
waelsy123 opened this issue Apr 16, 2023 · 1 comment
Open

Comments

@waelsy123
Copy link

waelsy123 commented Apr 16, 2023

Issue Description:
I am currently setting up a Conflux full node and would like to access the transaction pool (TXPool) for the current last block immediately upon starting the node. However, the catch-up mode is automatically initiated, making it difficult to access the TXPool directly for the current block.

I understand that catch-up mode is essential for syncing the node with the blockchain, but for my some cases, we only need the TXPool information for the most recent block. Therefore, I would like to know if there is a way to skip or bypass the catch-up mode and gain direct access to the TXPool for the current block.

Additional Context:
Conflux-rust version: v2.2.3

Expected Behavior:
I expect the full node to allow me to access the TXPool for the current block (last) without having to wait for the catch-up mode to complete.

Actual Behavior:
The node initiates catch-up mode and syncs with the entire blockchain, causing delays in accessing the TXPool for the current block.

Steps to Reproduce:
Start the Conflux full node
Observe that the catch-up mode begins
Attempt to access the TXPool for the last block

Proposed Solution:
If there is a way to skip or bypass the catch-up mode, please provide detailed instructions on how to achieve this. Alternatively, if a configuration option or command-line flag could be added to enable this functionality, it would be greatly appreciated. This would allow users like me to access the TXPool for the most recent block without waiting for the node to sync completely.

@peilun-conflux
Copy link
Contributor

This cannot be achieved in the current version, and implementing it is also a bit tricky.

The main issue is that maintaining the transaction pool requires knowledge of the latest state (like account nonce and balance). If we simply start the transaction pool with an empty state before catching up, it is likely that all received transactions will be dropped directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants