Skip to content

tx-submission demo#5354

Open
coot wants to merge 25 commits intomainfrom
coot/tx-submission-demo
Open

tx-submission demo#5354
coot wants to merge 25 commits intomainfrom
coot/tx-submission-demo

Conversation

@coot
Copy link
Copy Markdown
Collaborator

@coot coot commented Apr 16, 2026

Description

tx-submission-demo

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 added 4 commits April 13, 2026 13:35
* generate a tx cache using QuickCheck generators.
* analyse a tx cache, output minumum, maximum and average tx size.
@coot coot requested a review from a team as a code owner April 16, 2026 12:44
@github-project-automation github-project-automation Bot moved this to In Progress in Ouroboros Network Apr 16, 2026
@coot coot added the tx-submission Issues related to tx-submission protocol label Apr 16, 2026
@coot coot linked an issue Apr 16, 2026 that may be closed by this pull request
@coot coot self-assigned this Apr 16, 2026
@coot coot force-pushed the coot/tx-submission-demo branch from ec1fdd0 to f729ce3 Compare April 17, 2026 08:35
coot and others added 16 commits April 17, 2026 10:48
Once all txs are served, the outbound side can cleanly exit.
Use `WithBearer` with a custom `show` function.
* maximum number of txids to request
* unackwnoledged buffer size
Increased span of mini-protocol numbers.
This avoids re-serialisation cost to get the size, increases allocation
by storing bytes of the original `tx`.
WithBytes retains tx bytes for whole tx life time (e.g. until the
inbound side exits), avoiding it we can GC the bytes after decoding is
done and we extract the length of a tx.
./network-mux/demo/ns-setup.sh is a generic script for running client
/ server applications using traffic shaping.  We can reuse it for
`tx-submission` demo.
This makes it easier to analyse different runs, since all of them use
the same connection four tuples.
Co-authored-by: Karl Knutsson <karl.fb.knutsson@gmail.com>
@coot coot force-pushed the coot/tx-submission-demo branch from f729ce3 to 6e428f2 Compare April 17, 2026 09:09
@coot coot force-pushed the coot/tx-submission-demo branch from 6e428f2 to c4835ab Compare April 17, 2026 10:05
local default_settings = {
-- the port used by `./network-mux/demo/mux-leios-demo.sh`
port = 9001,
port = 4000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, lets not do this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want the port 9001 or none?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say leave it unchanged. If you need this to match to make your demo easier move the demo to use pot 9001.

Copy link
Copy Markdown
Contributor

@crocodile-dentist crocodile-dentist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running cabal run demo-tx-submission it outputs:

Missing: (COMMAND | COMMAND | COMMAND | COMMAND)

Usage: demo-tx-submission (COMMAND | COMMAND | COMMAND | COMMAND)

instead of one of the expected inbound, outbound, etc.

Comment on lines +18 to +19
min_mini_protocol_num = 1,
max_mini_protocol_num = 15,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is not necessary and manually scanning for lost/OOO packets can be very slow. Wireshark can do this automatically, if you go to Edit->Preferences and select Protocols->TCP in the list on the left then ensure that 'Allow subdissector to reassemble TCP streams' and 'Reassemble out-of-order segments' are checked. Then some of the previous changes to this file can be reverted, or we can essentially re-use the ouroboros-network.lua dissector from @karknu, just including the new miniprotocols numbers for this demo.

Comment thread ouroboros-network/demo/tx-submission/main.hs
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.

TxSubmissionV2 demo

3 participants