Skip to content

Commit

Permalink
Add note on highload wallet pecularities
Browse files Browse the repository at this point in the history
  • Loading branch information
EmelyanenkoK authored Jan 9, 2024
1 parent a52045b commit cf83bd1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crypto/smartcont/highload-wallet-v2-code.fc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
;; this version does not use seqno for replay protection; instead, it remembers all recent query_ids
;; in this way several external messages with different query_id can be sent in parallel


;; Note, when dealing with highload-wallet the following limits need to be checked and taken into account:

This comment was marked as spam.

Copy link
@tikto29

tikto29 Sep 27, 2024

crypto/smartcont/highload-wallet-v2-code.fc

;; 1) Storage size limit. Currently, size of contract storage should be less than 65535 cells. If size of
;; old_queries will grow above this limit, exception in ActionPhase will be thrown and transaction will fail.
;; Failed transaction may be replayed.
;; 2) Gas limit. Currently, gas limit is 1'000'000 gas units, that means that there is a limit of how much
;; old queries may be cleaned in one tx. If number of expired queries will be higher, contract will stuck.

;; That means that it is not recommended to set too high expiration date:
;; number of queries during expiration timespan should not exceed 1000.
;; Also, number of expired queries cleaned in one transaction should be below 100.

;; Such precautions are not easy to follow, so it is recommended to use highload contract
;; only when strictly necessary and the developer understands the above details.


() recv_internal(slice in_msg) impure {
;; do nothing for internal messages
}
Expand Down

2 comments on commit cf83bd1

@tikto29

This comment was marked as spam.

@tikto29

This comment was marked as spam.

Please sign in to comment.