From 2a91c1b9d82048cc372c06f5e3a6f4491751baec Mon Sep 17 00:00:00 2001 From: Jan Malinowski <149345204+jancionear@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:23:24 +0200 Subject: [PATCH] document the new `ReceiptValidationError::ReceiptSizeExceeded` (#2194) * document the new `ReceiptValidationError::ReceiptSizeExceeded` * Extend the comment about ReceiptSizeExceeded --- docs/6.integrations/errors/error-implementation.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/6.integrations/errors/error-implementation.md b/docs/6.integrations/errors/error-implementation.md index 7e511c6abe4..803bd37c68f 100644 --- a/docs/6.integrations/errors/error-implementation.md +++ b/docs/6.integrations/errors/error-implementation.md @@ -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 }, } ``` @@ -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: {} > {}", ```