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

feat: change priority in mempool to take into account age #4737

Merged
merged 4 commits into from
Sep 27, 2022

Conversation

SWvheerden
Copy link
Collaborator

Description

Changes the mempool to look at insertion time and not input maturity.
These changes reflect the new updated mempool rfc

Motivation and Context

The current code looks at the min input maturity, aka spending the oldest input, as an equalizer on the fee_per_gram when determining the transaction to pick for mining. This check is moot as even our default implementation of transaction sending uses 0 for all transactions except the coinbases which have their maturity checked on consensus rules. This means that most users will just keep that 0 as its not enforceable and, it will in most cases be 0, meaning this check is moot.

This update adds in a local time as the equalizer for the same fee_per_gram so that we still choose the oldest transactions to put in a block. Adding in this behavior gives preference to older transactions and is desireable for the network as it means most transactions will be mined at some point, and it won't lead to stale transactions sitting in a mempool.

@stringhandler stringhandler merged commit 0dad9e8 into tari-project:development Sep 27, 2022
sdbondi added a commit to sdbondi/tari that referenced this pull request Sep 29, 2022
…re-dan

* network-dependent-grpc-ports:
  feat: different default grpc ports for different networks
  fix(clients): fix tari nodejs client proto paths (tari-project#4743)
  chore: disallow onion v2 (tari-project#4745)
  feat: change priority in mempool to take into account age (tari-project#4737)
  feat: trigger mempool sync on lag (tari-project#4730)
  fix(core): use compact inputs for block propagation (tari-project#4714)
  ci: deny dbg macro (tari-project#4740)
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 3, 2022
* development:
  v0.38.5
  feat: different default grpc ports for different networks (tari-project#4755)
  fix(core): broken doctests (tari-project#4763)
  ci: fix coverage job
  ci: run coverage on prs (tari-project#4738)
  fix(comms): fixes edge case where online status event does not get published (tari-project#4756)
  fix(dht/encryption): greatly reduce heap allocations for encrypted messaging (tari-project#4753)
  docs: explain the emission curve parameters (tari-project#4750)
  fix(comms/peer_manager): add migration to remove onionv2 addresses (tari-project#4748)
  fix(ci): add cargo cache, reduce Ubuntu dependencies and action on pull_request (tari-project#4757)
  feat(tariscript): adds ToRistrettoPoint op-code (tari-project#4749)
  fix: cli wallet cucumber (tari-project#4739)
  fix(clients): fix tari nodejs client proto paths (tari-project#4743)
  chore: disallow onion v2 (tari-project#4745)
  feat: change priority in mempool to take into account age (tari-project#4737)
  feat: trigger mempool sync on lag (tari-project#4730)
  fix(core): use compact inputs for block propagation (tari-project#4714)
  ci: deny dbg macro (tari-project#4740)
@SWvheerden SWvheerden deleted the sw_add_mempool_age branch October 5, 2022 05:36
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.

2 participants