-
Notifications
You must be signed in to change notification settings - Fork 44
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
docs: cip for tx limits #226
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
921a589
docs: cip for tx limits
jcstein 8983582
docs: edits
jcstein 66de5cf
docs: add original context from previous PR
jcstein ffc87f3
Merge branch 'main' into jcs/tx-limit
jcstein 8d435fa
docs: name to cip-28.md
jcstein 8506c2d
docs: add to CIP-25
jcstein 52a5281
Apply suggestions from code review
jcstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
| cip | TBD(28) | | ||
| - | - | | ||
| title | Transaction size limit | | ||
| description | Set limit for transaction size | | ||
| author | Josh Stein ([@jcstein](https://github.com/jcstein)), Nina Barbakadze ([@ninabarbakadze](https://github.com/ninabarbakadze)), Rootul Patel ([@rootulp](https://github.com/rootulp)) | | ||
| discussions-to | <https://forum.celestia.org/t/cip-limit-number-of-pfbs-and-non-pfbs-per-block-increase-transaction-size-limit/1843> | | ||
| status | Draft | | ||
| type | Standards Track | | ||
| category | Core | | ||
| created | 2024-10-16 | | ||
|
||
## Abstract | ||
|
||
This CIP proposes to set the limit for transaction size. The proposal is to set the transaction size limit to 2MiB. Setting the transaction size limit is consensus-breaking. | ||
|
||
## Specification | ||
|
||
1. Transaction size is limited to 2MiB by setting the versioned parameter `MaxTxSize` to 2097152, which is 2MiB in bytes. From version v3 and above, in `CheckTx`, `PrepareProposal`, and `ProcessProposal`, each transaction's size is checked against the `appconsts.MaxTxSize` threshold. This ensures that transactions over the limit are rejected or excluded at all stages, from initial submission to execution. | ||
|
||
## Rationale | ||
|
||
The rationale for this proposal is to set the transaction size limit to 2MiB, even with 8MiB blocks, to prevent issues with gossiping large transactions. Gossiping an 8MiB transaction without chunking could be detrimental to the network. This is a consensus-breaking change. | ||
|
||
## Backwards Compatibility | ||
|
||
This proposal is meant to be included with v3 and the [Ginger Network Upgrade](./cip-25.md). It is a consensus-breaking change. | ||
|
||
## Security Considerations | ||
|
||
This proposal does not introduce any new security risks. However, it does impact network behavior and user experience, which should be carefully considered during implementation. | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ninabarbakadze can you elaborate here on why we implemented this as a consensus breaking change instead of modifying the default mempool
MaxTxBytes
to 2 MiB?I asked about it in a few places (Slack) and celestiaorg/celestia-app#3686 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait on feedback until tomorrow and plan to get draft in then. Thank you @ninabarbakadze and @rootulp !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because every node can set the default to any value they choose to and afaik we don't know the effect large transactions are going to have on the network so in my understanding it's preventative. cc @evan-forbes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed the motivation for the change is preventative.
Nodes can override the default but I expect most nodes will use the default. Assuming most nodes use the default config, transactions larger than 2 MiB won't be included in blocks so blob submitters will continue submitting blobs <= 2 MiB so that their blobs get included in blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you but it seemed like we wanted to have a hard limit on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I'm wondering why did we want the hard limit? The non-consensus breaking change is still preventative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested revision below: #226 (comment)