Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created article about dictionaries #587

Merged
merged 3 commits into from
May 27, 2024

Conversation

ProgramCrafter
Copy link
Contributor

Why is it important?

This article makes it written knowledge that dictionaries can have limited amount of key-value pairs and tend to make contract run out of gas if a large number of updates is made. Article also gives some information about other types of maps (according to other information sources available; prefix dictionaries don't have any, and trying to reverse-engineer them has an inconclusive results).

Related Issue

ton-society/grants-and-bounties#455

@reveloper
Copy link
Member

reveloper commented May 27, 2024

@ProgramCrafter, you've done a great job for our docs, thank you!

I have several suggestions on improvements collected from the developer community, could you add information according to these comments?

  1. Overall, the article is correctly written—the only thing I would add is that the @wallet bot's issue was primarily with the unlimited number of loop iterations, and the hashmap updates just made these iterations quite costly. Even without the hashmap, you might exceed the gas limit with an unlimited cycle. (@akifoq)

  2. Could you add an example in the form of a cell dump showing what the map looks like inside? For instance, a dict int 256 with 3 different keys in it. (@xssnick)

@reveloper
Copy link
Member

@ProgramCrafter, thank you!

@reveloper reveloper merged commit fad8f7b into ton-community:main May 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants