Skip to content

Commit

Permalink
Update documentation about combined_transactions_size_limit (#549)
Browse files Browse the repository at this point in the history
In near/nearcore#11582 we're increasing
`combined_transactions_size_limit`, so let's update the NEP to match the
implementation.
  • Loading branch information
jancionear authored Jun 14, 2024
1 parent ca02c29 commit 7634275
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neps/nep-0509.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ The limits are:
* `max_receipt_size - 4 MiB`:
* All receipts must be below 4 MiB, otherwise they'll be considered invalid and rejected.

Check failure on line 401 in neps/nep-0509.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Unordered list indentation [Expected: 2; Actual: 4]

neps/nep-0509.md:401:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4]
* Previously there was no limit on receipt size. Set to 4MiB, might be reduced to 1.5MiB in the future to match the transaction limit.

Check failure on line 402 in neps/nep-0509.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Unordered list indentation [Expected: 2; Actual: 4]

neps/nep-0509.md:402:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4]
* `combined_transactions_size_limit - 2 MiB`
* `combined_transactions_size_limit - 4 MiB`
* Hard limit on total size of transactions from this and previous chunk. `ChunkStateWitness` contains transactions from two chunks, this limit applies to the sum of their sizes.

Check failure on line 404 in neps/nep-0509.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Unordered list indentation [Expected: 2; Actual: 4]

neps/nep-0509.md:404:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4]
* `new_transactions_validation_state_size_soft_limit - 500 KiB`
* Validating new transactions generates storage proof (recorded trie nodes), which has to be limited. Once transaction validation generates more storage proof than this limit, the chunk producer stops adding new transactions to the chunk.

Check failure on line 406 in neps/nep-0509.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Unordered list indentation [Expected: 2; Actual: 4]

neps/nep-0509.md:406:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4]
Expand All @@ -418,7 +418,7 @@ The limits are:
* A receiving shard will receive receipts from `num_shards - 1` shards using the usual limit and one shard using the big limit.
* The "allowed shard" is the same shard as in cross-shard congestion control. It's chosen in a round-robin fashion, at height 1 the special shard is 0, at height 2 it's 1 and so on.

In total that gives 2 MiB + 500 KiB + 7MB + 5*100 KiB + 4.5 MiB ~= 14 MiB of maximum witness size
In total that gives 4 MiB + 500 KiB + 7MB + 5*100 KiB + 4.5 MiB ~= 16 MiB of maximum witness size. Possibly a little more on missing chunks.

### New limits breaking contracts

Expand Down

0 comments on commit 7634275

Please sign in to comment.