Skip to content

TX Submission Logic #4887

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

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open

TX Submission Logic #4887

wants to merge 55 commits into from

Conversation

coot
Copy link
Contributor

@coot coot commented Jun 4, 2024

Description

This is a draft PR (work in progress) which introduces tx-submission logic responsible for choosing from which peer to download a tx.

Checklist

Quality

  • Commit sequence makes sense and have useful messages, see ref.
  • New tests are added and existing tests are updated.
  • Self-reviewed the PR.

Maintenance

  • Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • Added labels.
  • Updated changelog files.
  • The documentation has been properly updated, see ref.

@coot coot added the tx-submission Issues related to tx-submission protocol label Jun 4, 2024
@coot coot linked an issue Jun 4, 2024 that may be closed by this pull request
3 tasks
@coot coot force-pushed the coot/tx-submission branch from fa5c3bd to e5bf5f5 Compare June 4, 2024 08:07
@coot coot force-pushed the coot/tx-submission branch from e5bf5f5 to 3aaa2b8 Compare July 19, 2024 09:46
@coot coot force-pushed the coot/tx-submission branch from 3aaa2b8 to 992a7de Compare July 30, 2024 07:47
@coot coot force-pushed the coot/tx-submission branch 6 times, most recently from 76c0d13 to 11d833b Compare September 18, 2024 11:26
@crocodile-dentist crocodile-dentist force-pushed the coot/tx-submission branch 2 times, most recently from 772809e to 374a78a Compare September 23, 2024 12:37
@coot coot force-pushed the coot/tx-submission branch from 374a78a to 388cc69 Compare September 23, 2024 12:45
@coot coot force-pushed the coot/tx-submission branch from efbc13a to 7b8ec92 Compare October 9, 2024 16:07
@coot coot force-pushed the coot/tx-submission branch from 7b8ec92 to 22c71d5 Compare November 12, 2024 06:13
@coot coot force-pushed the coot/tx-submission branch from 22c71d5 to 6a1bdd9 Compare February 6, 2025 10:40
@coot coot force-pushed the coot/tx-submission branch 2 times, most recently from 974b98d to a764ad1 Compare March 3, 2025 16:03
@coot coot self-assigned this Mar 7, 2025
@coot coot force-pushed the coot/tx-submission branch 6 times, most recently from adae14f to 3258afe Compare March 14, 2025 13:59
@coot coot force-pushed the coot/tx-submission branch from 3258afe to 1d40e61 Compare March 14, 2025 18:34
karknu and others added 29 commits May 9, 2025 13:31
Add the time it took to add TXs to the mempool to the
TxInboundAddedToMempool tracer.
DeltaQ metrics is only available for our warm and hot peers that also
have us as hot. So a fraction of all downstream clients will have a
metric.

This change the ranking of peers to use simple scoring system. Deliver a
new TX before in time before it gets into the block gives you one point.
Delivering a TXs thats already in the mempool, is invalid, or fail
because it was included in a recent blocks gives you a penalty.

Only the peer's that downloaded a TX will attempt to add it to the
mempool
It is using a single map lookup instead of two.
We don't need to compute `max 0` twice, since the inputs are always
non-negative (e.g. `n ≥ 0`) and thus `drained + n ≥ 0`.
Just to make it more outstanding what the output of `acknowledgeTxIds`
is indented for.
Removed `withMempoolSem` and added instead `addTxToMempool`.
Renamed the `EnableNewTxSubmissionProtocol` type to
`TxSubmissionLogicVersion` and moved it to `V2.Types`
Export all functions & supporting types.
The flag enables an initial 60s delay on the inbound side in the same
way as for in the V1 version.
* `ctrl-<addr>` - the control thread
                  (top level threads, e.g. [2], [3], etc..)
* `node-<addr>` - the main node thread
                  ([2,1], [3,1], etc)
* `krnl-<addr>` - the kernel thread (block production)
Removed the `TurbulentCommands` generator.
@coot coot force-pushed the coot/tx-submission branch from ab8366a to 2429043 Compare May 9, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tx-submission Issues related to tx-submission protocol
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

tx-submission decision logic for the inbound side
3 participants