-
Notifications
You must be signed in to change notification settings - Fork 224
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
Transaction stuck in the mempool #80
Comments
@nilhcraiv It's hard to say what's going on in your case. Do you have a stable reproducer of the problem? |
Detailed steps to reproduce the problem:
SEARCHING FOR BUGSIn bytecoin/src/Core/BlockChainState.cpp functions "BlockChainState::create_mining_block_template2" and "BlockChainState::create_mining_block_template" never include this transaction because it is too big. This happens here, tx_size is bigger than block_size_limit then the transaction will never be included.
block_size_limit is calculated as follows:
m_currency.max_block_cumulative_size() depends of current height as follows:
In our new currency we are at the beginning therefore max_size is small, but will increase in the future. This will block the transaction until max_size will be greater but the problem is that this will happen in a very long time... Also, it is limited by CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE QUESTIONSWhen I tried to send 80k the wallet showed TRANSACTION_DOES_NOT_FIT_IN_BLOCK but when I sent 40k the wallet allows me to do it, why? RELATED ISSUESforknote/cryptonote-generator#54 It seems that Monero solves this with rescan_spent method. *EDITED
I fixed temporary this issue. I change this condition in TransactionBuilder.cpp as follows. bytecoin/src/Core/TransactionBuilder.cpp
I have changed it for this code (The same condition as BlockChainState::create_mining_block_templateX)
Now, instead of sending a transaction with a big size the wallet return TRANSACTION_DOES_NOT_FIT_IN_BLOCK in order to avoid unconfirmed transactions. I think both conditions should be the same in both files, right? (TransactionBuilder.cpp and BlockChainState.cpp) On the other hand, how can I return the transactions that remain unconfirmed? I think this could be happening in the bytecoin network at the moment. A method to unlock this type of transaction should be implemented. |
Look at BlockChain State::add transaction method. There is a piece of code: |
I’m reading the code to understand it then I have created my own cryptocurrency and everything works fine but sometimes some transactions are stuck in mempool. The transaction is sent ok by the sender and it is received by the receiver but the transaction amount is locked or unconfirmed for ever. I’ve try to figure out this but I don’t understand what is happening. I write here because I don’t know if this is a bug or this is normal in a new cryptoccurrency with low transactions, in this last case why is not the transaction blocked in the sender side reporting an error?
This happen to me in the last commit release v3.2.1 commits (prime) and v3.2.2 now
The text was updated successfully, but these errors were encountered: