-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Mempool Reverification Model (MRM): Optimizing our nodes #1140
Comments
Hi @vncoelho, I think we should wait for at least 2 approvals before adding something to the neo 3 milestone. If everyone start adding or removing issues to Neo 3 milestone we are surely going into conflicts. |
I see, @lock9, makes sense. I added this one because the current implementation for mempool is not completed. Thus, in any case, we need to pass though this. |
@igormcoelho, how are the current possibilities for an invocation to spend GAS of other address, if the Witness is passed as a parameter of the call? @lock9, this is not really related to |
@vncoelho this is related to how the network will process the transactions, right? For me, this is a network policy issue. |
Makes sense, @lock9, however, just be aware that the logic does not change. It just would just add new field to payable txs themselves. |
Sorry, @vncoelho I had forgotten to add the ledger tag too. |
I think it is a basic functionality, but it is a feature because it would need a new field on tx....ahauaha The current mempool reverification is not yet fully completed, thus, it is already expected to be part of the development. |
Maybe it only relates to the ledger, if this is the default way and doesn't change |
The only point would be an extra field of allowance of GAS, which is really a negative point. However, we still did not see another way to quick revalidate. Currently, we can do that, but it costs more for our revalidation, which is a critical thing, because all seed nodes do that all the time. Considering that, in favor of scalability, I keep this as a priority in terms of design. We can keep compatibility by saying that Currently, we have open possibilities for consensus node attacks, as @belane & @shargon once sent a report. |
Completely necessary |
@shargon, I am going to start a draft of this PR as soon as possible. |
@shargon @igormcoelho, should the field on the transaction be an independent one or an |
@erikzhang, I started the implementation as a new field, such as /// <summary>
/// Max allowed amount of GAS that the transaction is allowing to be transfered from Sender
/// If null, not passed, no parallel transactions will be accepted on the mempool since all remaining GAS would be allowed
/// </summary>
public long MaxTransferableGAS; However, as a field like this I am finding it hard to make it optional.
In such case:
Maybe the best way is like a Edited: |
I'm not sure it is needed. |
It would be good if we could manage without this additional field. What is your idea, @erikzhang? How could we quickly @shargon, my description of the issue was not fully correct, in fact, as @erikzhang says, it currently work, because we move all PS: However, this additional field will be optional, as described. Just for those that want the |
Another pending question is: @igormcoelho @shargon @erikzhang, will it be possible for a transaction to transfer |
@erikzhang, I just talked to @igormcoelho and he explained me that currently only In this sense, this proposed solution is quite suitable and should be implemented, it looks like to be a good path for scalability. Since it is only the |
I think a cosigner can send GAS also. |
@erikzhang, perhaps send for systemfee and netfee, right? Igor mentioned that not spent cosigners GAS during Application. |
@vncoelho I think "payable" attribute is very useful attribute. Currently we move all txs to unverified and slowly reverify after block persisted.We @eryeer have done a test that this process takes up 40% of the entire block persist process.If we add "payable" attribute,we will not reverify txs,this will save a lot of time. Tps will increase significantly. |
It is great to hear that from you, @doubiliu, and @eryeer, as well as that you are already investigating that. After we merge #1183 it might be good time to push this one. @doubiliu, I believe that we can do the "payable" attribute as optional, thus, light wallets/clients implementation do not need necessarily to change. When the "payable" is |
@vncoelho I think we can discuss the detail implementation scheme before implement this. Maybe there are some detail issue we need to take care of, such as how to solve cosigner's transfer. |
@eryeer, last time I talked to @igormcoelho he mentioned that |
Is there such a constraint? I'm not quite sure about this, where is this GAS spending limitation? Average tx reverify time: 1.8e-5s |
Summary
Currently, mempool reverification model for NEO3 is not completely finished.
Imagine the scenario that you have 5 GAS in your address:
tx_1
,...
,tx_2
) that uses 1 GAS each (sysfees
+netfees
)txs
enter in the mempooltx_1
enter in the next blockCurrent implementation of NEO3:
txs
are revalidated and kept on the mempoolThis may lead nodes to keep, in their mempool,
txs
that do not have GAS to be anymore spent. Thus,txs
that can not pay its sysfee and netfees.Edited:
This description has been updated since currently we move all
txs
to unverified and slowlyreverify
in batches.Possibilities:
tx_ 1
uses 4 GAS in its Application (transferring to other address), thus all 4 remainingtxs
shall be discardedtx_ 1
uses 3 GAS in its Application (transferring to other address), thus, 1 out of 4 of the remainingtxs
shall be discardedDo you have any solution you want to propose?
With @igormcoelho, we were addressing this design neo-project/specification#3 some months ago.
payable
transactions, in which it says the limit ofGAS
it can spend on Applicationsenders
in the current mempoolWhere in the software does this update applies to?
The text was updated successfully, but these errors were encountered: