-
Notifications
You must be signed in to change notification settings - Fork 249
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
XDM: Message submission checks to avoid validating duplicate XDM #3278
Conversation
Currently the block interval is set to 5 blocks. If XDM is submitted to txpool at block x, we do not submit the same xdm until x+6
… xdm submission checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t have enough context to approve, but it looks reasonable to me.
The error is because even though the XDM is the same the content of the XDM is changing as it is constructed at different blocks (the MMR proof is changing), so the tx pool is unable to use the hash of tx to easily detect duplicate tx. FP has a similar issue and I have opened paritytech/polkadot-sdk#3705 as a general solution.
These checks seem server as a short-circuit to front run some checks before submitting XDM to tx pool to do a complete check, it does eliminate the error log but not much cost as these checks also come with their own cost. Would be great to have optimization on the sender side to stop relaying stale XDM at the first place. |
Not necessarily true. All operators are able to publish the XDM at the same time for the same block. So Proof is same and so does the txHash. This is something I have verified over the tests and txpool rejecting the transactions due to already exisiting XDM validated and in ready state.
I'm not able to follow completely here. I'm not worried about the costs here as they are pretty much unwrappers and this process is dedicated to just XDM and Channel updates. Should not an issue IMHO.
This is something I have thought but I would like to test the first set of changes before adding similar checks in the sender side. |
Then I'm more confused:
I didn't mean it is an issue, just comparing the cost of having this front check with letting the tx pool do the complete check. |
Ohh sorry for confusion.
This will be a low cost since txpool validate unsigned will be higher and will be blocking operation for txpool to accept other transactions |
This PR aims to eliminate
tx_pool low priority
error since there is already an XDM in the txpoolInvalidTransaction(201)
but not trying to add the xdm to txpool since such XDM already executed in the canonical chain.Code contributor checklist: