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

Dynamically detect CW pool code ID migrations #328

Open
p0mvn opened this issue Jun 18, 2024 — with Linear · 0 comments
Open

Dynamically detect CW pool code ID migrations #328

p0mvn opened this issue Jun 18, 2024 — with Linear · 0 comments

Comments

Copy link
Member

p0mvn commented Jun 18, 2024

Currently, we still sometimes experience issues when cw pools migrate despite adding fault tolerance.

As one of the approaches to mitigate, we should detect cw pool migrations via SDK state-streaming and push them into SQS, replacing code ID in the config.

There are multiple approaches we could pursue:

  1. Write a state entry migration in chain state and then delete it to trigger state-streaming. Dynamically update SQS
  2. Do transaction/message parsing (expensive)
  3. Monitor wasmd state migrations (complex)

Proposing option 1 as the migrations are not expected to be triggered frequently, and we will clean up the state while triggering the necessary component.

This would also simplify the architecture as a whole

As part of this effort, we will have to synchronize the cosmwasm pool config with a read-write lock.

DoD

  • Add logic to update a migration state-entry
  • Dynamically propagate it to SQS ingest
  • Syncronize and update the cosmwasm code id config
  • Unit test
  • Locally test against mainnet state
@p0mvn p0mvn self-assigned this Jun 18, 2024
@p0mvn p0mvn changed the title [Q3] Dynamically detect CW pool code ID migrations Dynamically detect CW pool code ID migrations Jun 21, 2024
@p0mvn p0mvn removed their assignment Jun 21, 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

No branches or pull requests

1 participant