-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Option to not mark transactions as local when received over RPC #8820
Comments
While granular control over RPC methods would be nice, what about a CLI flag that can simply turn off local transactions all together? That might be a lot simpler, and for public facing nodes - they don't really matter. In the worst case, it's not that difficult to write a proxy that filters particular methods, just doesn't feel like a good solution. |
What exactly do you mean by
Is it the same as with my option (2)? So that the transactions from |
FYI I don't know Rust or the Parity architecture (so I invented // from /miner/src/pool/scoring.rs
// Always kick out non-local transactions in favour of local ones.
if new.priority().is_local() && !old.priority().is_local() && config.prioritise_local() {
return true;
}
// And never kick out local transactions in favour of external ones.
if !new.priority().is_local() && old.priority.is_local() && config.prioritise_local() {
return false;
} Basically a flag that can totally nullify local checks (i.e. parity becomes indiscriminate between local and non-local functions) |
Also, @tomusdrw - I think I have a temporary fix. Although our RPC port on the node was set to |
@XertroV ok, I see. So that's similar to what I thought, but a bit more extreme (i.e. doesn't even treat transactions that you have private key for as local). Good that you found a workaround, we should fix it anyway though. |
@tomusdrw - yeah, I don't mind how extreme the measure is personally, I just thought that might be quicker/safer to implement. It's sort of a workaround - technically ppl can still submit raw txs. One thing that would be nice to know is if there's a way to log when this is happening. If it keeps happening I'll implement a small shim that sits between the load balancer and the RPC interface and filters out all |
Hi, I think not only me face this issue because of |
@5chdn might be worth bumping priority on this one, perhaps a 1.11 release blocker as well. |
So reading the thread this was forked from gave me an idea - the issue is that the node doesn't have the privkey for the transaction; why not just check the address against local known addresses and only mark local if we find it? Is this how |
I have an idea: Add a miner config variable: When a tx is dispatched the dispatcher checks this flag and calls Working on a PR for this now. Personally, btw, the default should be false |
Currently the node will mark transactions submitted using
eth_sendRawTransaction
as local ones.This means that such transactions will have a higher priority and also can go below configured minimal gas price.
Such situation can cause issues for public-facing nodes that expose
eth
namespace.Solution:
eth
but noteth_sendRawTransaction
The text was updated successfully, but these errors were encountered: