diff options
author | Greg Sanders <gsanders87@gmail.com> | 2023-09-13 13:13:57 -0400 |
---|---|---|
committer | Greg Sanders <gsanders87@gmail.com> | 2023-09-20 08:10:30 -0400 |
commit | 533660c58ad5a218671a9bc1537299b1d67bb55d (patch) | |
tree | 778fdb31bdb83477dd84c6b44ead3ba8435a6dfa /doc/policy | |
parent | 3966b0a0b6b5e6110ba8106c04af1067fc6219bc (diff) |
Replace MAX_PACKAGE_SIZE with MAX_PACKAGE_WEIGHT to avoid vbyte confusion
While allowing submitted packages to be slightly larger than what
may be allowed in the mempool to allow simpler reasoning
about contextual-less checks vs chain limits.
Diffstat (limited to 'doc/policy')
-rw-r--r-- | doc/policy/packages.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/policy/packages.md b/doc/policy/packages.md index 2a5758318a..399ae945d5 100644 --- a/doc/policy/packages.md +++ b/doc/policy/packages.md @@ -18,16 +18,19 @@ tip or some preceding transaction in the package. The following rules are enforced for all packages: -* Packages cannot exceed `MAX_PACKAGE_COUNT=25` count and `MAX_PACKAGE_SIZE=101KvB` total size +* Packages cannot exceed `MAX_PACKAGE_COUNT=25` count and `MAX_PACKAGE_WEIGHT=404000` total weight (#20833) - - *Rationale*: This is already enforced as mempool ancestor/descendant limits. If - transactions in a package are all related, exceeding this limit would mean that the package - can either be split up or it wouldn't pass individual mempool policy. + - *Rationale*: We want package size to be as small as possible to mitigate DoS via package + validation. However, we want to make sure that the limit does not restrict ancestor + packages that would be allowed if submitted individually. - Note that, if these mempool limits change, package limits should be reconsidered. Users may also configure their mempool limits differently. + - Note that the this is transaction weight, not "virtual" size as with other limits to allow + simpler context-less checks. + * Packages must be topologically sorted. (#20833) * Packages cannot have conflicting transactions, i.e. no two transactions in a package can spend |