-
Notifications
You must be signed in to change notification settings - Fork 140
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
[network] Remove Legacy Gossiper + Only Push Gossip from RPC #497
Conversation
c143a26
to
3bad7ac
Compare
Ignore this, I misunderstood. I thought the change was making it so we only push gossip locals (since we mark transactions as local when they're issued via the API), but we explicitly push gossip transactions if they are added via API instead of using the tx pool's definition of local. |
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]> Signed-off-by: Patrick O'Grady <[email protected]>
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.
just few nits
Failing test:
|
…s#497) Co-authored-by: Joshua Kim <[email protected]> Co-authored-by: Stephen Buttolph <[email protected]> Co-authored-by: Darioush Jalali <[email protected]>
Related: ava-labs/avalanchego#2772
This PR removes the legacy tx gossiper and switches to exclusively use the
AvalancheGo PushGossiper
(https://github.com/ava-labs/avalanchego/blob/master/network/p2p/gossip/gossip.go). Additionally, this PR updatescoreth
to only send push gossip for transactions submitted over RPC.TODO
Add submitted txs to bloom filter to avoid getting gossiped back what we gossipedAlready handled:coreth/plugin/evm/gossip.go
Lines 133 to 165 in 9d9639b
Handle the case where we restore local transactions from the journal (I don't think this is currently handled correctly for push gossip anyways, so we may want to punt to when we actually allow people to use the journal):
// If local transactions and journaling is enabled, load from disk
if !config.NoLocals && config.Journal != "" {
pool.journal = newTxJournal(config.Journal)
if err := pool.journal.load(pool.AddLocals); err != nil {
log.Warn("Failed to load transaction journal", "err", err)
}
if err := pool.journal.rotate(pool.local()); err != nil {
log.Warn("Failed to rotate transaction journal", "err", err)
}
}
(Remove unused journaling configs #500)coreth/core/txpool/txpool.go
Lines 354 to 364 in 9d9639b
Consider adding an "executable" check to the mempool so we only gossip txs that can be used (i.e. don't gossip txs with nonces) -> may not work great under load because peers won't be given a "run" of transactions to includeIf we take a pessimistic view on our ability to determine the usefulness of any particular transaction, what we do now is the most robust approach.