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

feat(cli): add the batch registration feature to systems, accesses, functions and tables #1871

Closed

Conversation

CrazyNorman
Copy link

Fixes issue #1645.

There are some parts that can be further examined.

One is the batchCall functiin, which is not easy to invoke correctly in Typescript. To address this, I added a helper function getBatchCallData to alleviate this issue.

The other part is the granularity of batching. For systems and access controls, I batched the system and its corresponding access changes together. This approach ensures atomicity of the system and its access control changes, resulting in the invocation of a number of system transactions.

For function registrations, I batched the functions per system, as it seems that a system can naturally divide the functions.

For table registrations, I used a static slicing approach. The number of packed registrations for now is 10, which is a conservative figure designed to adapt to most chain environments. This number could be added to advanced configurations in the future.

PS: I have temporarily set aside the part related to modules, as there is currently no filter available for installedModules.

Copy link

changeset-bot bot commented Nov 3, 2023

⚠️ No Changeset found

Latest commit: 4cffea0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@holic
Copy link
Member

holic commented Mar 5, 2024

We just merged a PR to add batching to RPC calls: #2322

This won't help much with gas but should help with RPC load.

@holic
Copy link
Member

holic commented Aug 15, 2024

closing in favor of batching RPC calls, which reduces complexity

@holic holic closed this Aug 15, 2024
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