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

Use smoldot's database system in the extension #675

Closed
wants to merge 3 commits into from

Conversation

wirednkod
Copy link
Contributor

  • Add functionality to extension in order to periodically call smoldotClient.databaseContent() for the hardcoded chains (Polkadot, Kusama, Rococo, Westend) and save the result in local storage, using the chrome feature alarms.
  • The alarm will repeat every 5 (periodInMinutes) minutes after the initial event for DatabaseContentAlarm
  • databaseContent() is called with QUOTA_BYTES: 5000000 divided by the amount of known chains (as of now 4). The maximum amount (in bytes) of data that can be stored in local storage, as measured by the JSON stringification of every value plus every key's length.

Fixes #568

@wirednkod wirednkod requested review from tomaka and josepot January 21, 2022 18:59
@wirednkod wirednkod marked this pull request as draft January 21, 2022 19:01
wirednkod and others added 3 commits January 25, 2022 14:57
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.1.30...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* improve typings of `ToExtension` & `ToApplication`

* separate headers

* remove ToApplicationChainHeader & ToExtensionChainHeader
@wirednkod wirednkod force-pushed the nik-smoldot-databasecontent branch from ff16022 to 2d2d3b4 Compare January 25, 2022 12:59
@wirednkod wirednkod closed this Jan 25, 2022
@wirednkod
Copy link
Contributor Author

Closed this one and opened #680 in its place in order to keep the history clear

@tomaka tomaka deleted the nik-smoldot-databasecontent branch February 11, 2022 15:43
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.

Use smoldot's database system in the extension
3 participants