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

TxSubmission, part 1: code refactoring #4914

Merged
merged 11 commits into from
Jul 19, 2024
Merged

Conversation

coot
Copy link
Contributor

@coot coot commented Jul 18, 2024

Description

This PR is preparation work for #3311. It includes code refactoring, fixes some warnings, and adds newtype wrappers.

  • nothunks: updated to ^>=0.2
  • ouroboros-network-api: added monoid instance for SizeInBytes
  • ouroboros-network-api: SizeInBytes Show instance
  • block-fetch: moved TMergeVar to its own module
  • block-fetch-tests: export PeerGSVT
  • tx-submission: use SizeInBytes
  • tx-submission: Tx arbitrary generator
  • tx-submission: code style
  • tx-submission: fixed warnings
  • tx-submission: newtype wrappers NumTxIdsTo{Ack,Req}

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 requested a review from a team as a code owner July 18, 2024 06:14
@coot coot added the tx-submission Issues related to tx-submission protocol label Jul 18, 2024
@coot coot self-assigned this Jul 18, 2024
coot added 9 commits July 18, 2024 09:06
Use Quiet to derive the Show instance.
Deprecated TxSizeInBytes.
Use `chooseEnum` to guarantee that the maximal tx size has a small
upper bound.

Note: this came up when using `SizeInBytes` semigroup instance and
encountering an overflow.  We never should have more than 4GB inflight
txs, so it's fine for now.
* `-c` only check committed files in HEAD
* `-u` only check uncommitted files
* `-h` show help message

Without any flag; check all files.
@coot coot force-pushed the coot/tx-submission-refactoring branch from 1fe9d57 to e4a28e9 Compare July 18, 2024 07:54
@coot coot requested review from newhoggy and a team as code owners July 18, 2024 07:54
Copy link
Contributor

@bolt12 bolt12 left a comment

Choose a reason for hiding this comment

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

Very good! LGTM! :)

@coot coot enabled auto-merge July 18, 2024 09:34
@coot coot force-pushed the coot/tx-submission-refactoring branch from 719b3a1 to e4a28e9 Compare July 18, 2024 09:38
@coot coot added this pull request to the merge queue Jul 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 18, 2024
@coot coot added this pull request to the merge queue Jul 19, 2024
@dermetfan dermetfan removed this pull request from the merge queue due to a manual request Jul 19, 2024
@dermetfan dermetfan added this pull request to the merge queue Jul 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 19, 2024
@dermetfan dermetfan added this pull request to the merge queue Jul 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 19, 2024
@coot coot added this pull request to the merge queue Jul 19, 2024
Merged via the queue into master with commit 68e5f16 Jul 19, 2024
17 of 21 checks passed
@coot coot deleted the coot/tx-submission-refactoring branch July 19, 2024 18:44
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: Done
Development

Successfully merging this pull request may close these issues.

2 participants