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

AccountStore in-memory state initialization and synchronization #3133

Merged
merged 56 commits into from
Oct 25, 2024

Conversation

silva-fj
Copy link
Contributor

@silva-fj silva-fj commented Oct 17, 2024

As topic, The main changes in this PR are the following:

  • In memory AccountStore initialization: During worker's initialization it gets the state from the parachain and load the account stores into memory, with the block height. (this happens only once)
  • In memory state sync on every relevant omni-account pallet event (if not processed yet, based on the block number)

@silva-fj silva-fj marked this pull request as ready for review October 18, 2024 14:07
@silva-fj silva-fj requested a review from a team October 18, 2024 14:07
@silva-fj silva-fj changed the title Omni account state sync AccountStore in-memory state initialization and synchronization Oct 18, 2024
Copy link
Collaborator

@Kailai-Wang Kailai-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got pretty much nothing to complain, thanks!

Have you tried it locally?

  • I had some problem with nested ecall -> ocall, in some old issue though
  • Does the paged retrieval work correctly?

tee-worker/identity/service/src/main_impl.rs Show resolved Hide resolved
@silva-fj
Copy link
Contributor Author

I've got pretty much nothing to complain, thanks!

Have you tried it locally?

  • I had some problem with nested ecall -> ocall, in some old issue though
  • Does the paged retrieval work correctly?

I ran it locally but it's not fully tested as we currently don't have an easy way to generate enough data for testing

@Kailai-Wang
Copy link
Collaborator

I think a (so far) easy way is to use cli to batch request vcs (which will generate new IDGraphs if it's a new account), and then use upload-id-graph to upload it on-chain 😂

Then you can see if it can be downloaded

@silva-fj silva-fj enabled auto-merge (squash) October 25, 2024 17:38
@silva-fj silva-fj merged commit cc87102 into dev Oct 25, 2024
21 checks passed
@silva-fj silva-fj deleted the omni-account-state-sync branch October 25, 2024 18:53
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.

3 participants