-
Notifications
You must be signed in to change notification settings - Fork 4
Extra: Optimize contract data storage #166
Comments
Another possibility would be to use the intrinsic linked list of blocks to retrieve Corgis. If we go with this alternative, we will need to query the RPC for linked transactions. The CI deploy script query previous transactions to get the previous created accounts, it might be useful: Lines 86 to 138 in 20f55f9
From Sherif@NEAR in the Discord chat on how use RPC as a linked list:
|
Just for reference, Rust contracts binaries are bloated. |
|
After measuring gas usage by contract (see #165), we might want to optimize how contract stores data.
We could improve data storage by using a
LookupMap
instead of anUnorderedMap
. As described in [1],LookupMap
does not permit to traverse its elements. However, since we are using a linked list to traverse those elements in insertion order, we could be better of withLookupMap
.[1] https://docs.near.org/docs/concepts/data-storage#rust-collection-types
The text was updated successfully, but these errors were encountered: