Skip to content

Commit

Permalink
document the new ReceiptValidationError::ReceiptSizeExceeded (#2194)
Browse files Browse the repository at this point in the history
* document the new `ReceiptValidationError::ReceiptSizeExceeded`

* Extend the comment about ReceiptSizeExceeded
  • Loading branch information
jancionear authored Aug 9, 2024
1 parent 923b60a commit 2a91c1b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/6.integrations/errors/error-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,13 @@ pub enum ReceiptValidationError {
NumberInputDataDependenciesExceeded { number_of_input_data_dependencies: u64, limit: u64 },
/// An error occurred while validating actions of an ActionReceipt.
ActionsValidation(ActionsValidationError),
/// Receipt is bigger than the limit.
/// ReceiptSizeExceeded means that there was a receipt above the size limit (currently 4MiB).
/// NEAR will refuse to execute receipts that are above the size limit.
/// The most likely source of such receipts would be cross-contract calls with a lot of large actions
/// (contract deployment, function call with large args, etc).
/// This error means that the user has to adjust their contract to generate smaller receipts.
ReceiptSizeExceeded { size: u64, limit: u64 },
}
```

Expand All @@ -466,6 +473,9 @@ ReceiptValidationError::NumberInputDataDependenciesExceeded { number_of_input_da
"The number of input data dependencies {} exceeded the limit {} in an ActionReceipt"

ReceiptValidationError::ActionsValidation(e)

ReceiptValidationError::ReceiptSizeExceeded { size, limit }
"The size of the receipt exceeded the limit: {} > {}",
```


Expand Down

0 comments on commit 2a91c1b

Please sign in to comment.