Skip to content
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

go/runtime/txpool: Add block propagation delay before tx publish #4959

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

kostko
Copy link
Member

@kostko kostko commented Sep 28, 2022

After processing a new block locally, make sure that any transactions that are checked against that block are only propagated after waiting for the newBlockPublishDelay to increase probability that peers are up to date with the new block.

Obviously a better way would be to check the current round of each peer (e.g., via a p2p update protocol), but such filtering is unfortunately not possible to do with the current go-libp2p-pubsub implementation.

After processing a new block locally, make sure that any transactions
that are checked against that block are only propagated after waiting
for the newBlockPublishDelay to increase probability that peers are up
to date with the new block.

Obviously a better way would be to check the current round of each peer
(e.g., via a p2p update protocol), but such filtering is unfortunately
not possible to do with the current go-libp2p-pubsub implementation.
@kostko kostko force-pushed the kostko/fix/txpool-delay-publish branch from 55c79b8 to 84a3e9b Compare September 28, 2022 16:25
@codecov
Copy link

codecov bot commented Sep 28, 2022

Codecov Report

Merging #4959 (84a3e9b) into master (3a357e3) will increase coverage by 0.03%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master    #4959      +/-   ##
==========================================
+ Coverage   66.61%   66.64%   +0.03%     
==========================================
  Files         464      464              
  Lines       51222    51226       +4     
==========================================
+ Hits        34120    34141      +21     
+ Misses      12912    12885      -27     
- Partials     4190     4200      +10     
Impacted Files Coverage Δ
go/runtime/txpool/txpool.go 85.27% <88.88%> (+0.13%) ⬆️
...onsensus/tendermint/apps/beacon/state/state_vrf.go 73.33% <0.00%> (-13.34%) ⬇️
go/consensus/tendermint/apps/staking/auth.go 62.96% <0.00%> (-7.41%) ⬇️
.../worker/compute/executor/committee/transactions.go 81.81% <0.00%> (-6.82%) ⬇️
go/worker/beacon/tx_retry.go 90.47% <0.00%> (-4.77%) ⬇️
go/storage/mkvs/remove.go 85.85% <0.00%> (-4.05%) ⬇️
go/worker/beacon/worker_vrf.go 64.34% <0.00%> (-3.48%) ⬇️
go/runtime/host/sgx/sgx.go 72.72% <0.00%> (-2.03%) ⬇️
go/consensus/api/submission.go 66.66% <0.00%> (-1.76%) ⬇️
go/oasis-node/cmd/node/node.go 54.30% <0.00%> (-1.68%) ⬇️
... and 16 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kostko kostko marked this pull request as ready for review September 28, 2022 18:39
@pro-wh
Copy link
Contributor

pro-wh commented Sep 28, 2022

oh is this to handle txs that are valid in the new block but invalid in the old block?

@kostko
Copy link
Member Author

kostko commented Sep 29, 2022

Yes.

@kostko kostko merged commit 7b7f292 into master Sep 29, 2022
@kostko kostko deleted the kostko/fix/txpool-delay-publish branch September 29, 2022 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants