-
Notifications
You must be signed in to change notification settings - Fork 992
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
Evict transactions from the pool by order of fee/weight #1417
Comments
Looking at now.. makes sense but sounds like a potentially very frustrating user experience when blocks are full, if transactions are just dropped with no real notification to anyone... anyone affected is just going to have to wait around. Perhaps an 'is this tx in the pool' api function might be in order as well? If we ever start having this problem we're doing very well |
Been staring at this for a while now, mostly to familarise self with code I haven't thought too hard about.. so please bear with me here.. So a bit confused I am most probably missing something about how this should work. I'm assuming that we're only referring to the size of the the 'fluffed' tx pool and not the stem pool. Assuming we're looking for the original transactions with fees most suitable to the weight placed on the chain, once something is fluffed it needs to have each individual transaction available in its unmodified form to decide which should be kept and which should be dropped. So this seems to exist, and when So now, do we need to go and de-aggregate every transaction that's in the txpool as well as the current, (which essentially means finding all of the original transactions) apply the weighting criteria, then drop inputs/outputs and kernels from the Franken-transactions accordingly? Also, do we have any documentation anywhere that describes the full stem/aggregate/fluff/aggregate again process that goes on in the pool? |
As far as the tx_pool is concerned there are no original txs - all it sees is the aggregated fluffed txs.
Note: we only aggregate with txs in the stempool (stem phase, pre-fluffing, not the txpool (after fluffing). We have to either accept a whole "franken-tx" to the txpool or evict it as a whole unit, there is no info available to de-aggregate it back into constituent txs. If we could de-aggregate at this point then the whole tx aggregation thing is broken as we have not gained any privacy here... |
Okay, thanks.. was a bit confused by the
It doesn't sound like this would work from an end-user perspective. I could have my generously fee'ed transaction aggregated with a whole load of minimum-fee spam transactions, and have it rejected as a result. |
Yeah the issue around aggregating txs with widely differing fees has been brought up by @tromp before. And |
The idea of the limit is simply to not have all nodes crash with an out-of-memory. Someone with a lot of money, in the presence of low fees, could try to get cheeky. This has happened to more than one blockchain. At this point, we're trading a bad user experience for a very bad network failure. It'd be best if we could trigger this strictly on transaction size (and not weight or count), simply because that's what would crash the node. And tne evict some cheapo transactions. |
I see what you're saying - weight is an approximation of size, but we don't care about weight here in the Grin sense, we just care about the bytes themselves. |
Some of this is probably already done. Is this closeable / what's still missing? |
Not fixed yet @sesam. Will try to do a final push this week. |
We should evict transactions when the pool gets full (more than
max_pool_size
) instead of plain rejecting them, otherwise one could send a lot of transactions right above the minimum fee and block every other from even entering the pool relatively cheaply. The ordering should be very similar to what's used byprepare_mineable_transactions
, and we could just eliminate the bottom 10%.The text was updated successfully, but these errors were encountered: