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

Send pre-construction extrinsic to parentchain after upgrading parentchain #1360

Open
ziming-zung opened this issue Feb 23, 2023 · 1 comment
Labels
D2-bug Something isn't working I3-high should be completed within 5 working days

Comments

@ziming-zung
Copy link
Contributor

ziming-zung commented Feb 23, 2023

Context

Now, tee-worker send extrinsic to parentchain in this function:
https://github.com/litentry/litentry-parachain/blob/25bf6e0e8137209a0cc1c60cc2c89729ddc83fc6/tee-worker/enclave-runtime/src/top_pool_execution.rs#L245-L276

From the logic of the function, we know that:

  • After producing block successfully, tee-worker will broadcast block to peers
  • construct extrinsic from opaque calls
  • send extrinsic to parentchain

The flow above has a potential bug. Let's imagine:

  • If parentchain runtime version is 1 and the create_identity call type is:
pub fn create_identity(origin: OriginFor<T>, shard: ShardIdentifier, user: T::AccountId, identity: Vec<u8>)
  • We use this call type to construct an extrinsic, try to send it to parentchain later.

  • Before sending above extrinsic to parentchain, the parentchain upgraded. Now parentchain runtime version is 2 and the create_identity call type have changed to:

pub fn create_identity(origin: OriginFor<T>, shard: ShardIdentifier, user: T::AccountId, identity: Vec<u8>, metadata: Option<Vec<u8>>)
  • At this time, tee-worker try to send above extrinsic to parentchain and it should receive an error from parentchain. Beacause the call type doesn't match

  • Finally, the storage values of the sidechain and the parentchain are inconsistent. Use the example above, it means that Identity only exist on sidechain, not parentchain

I still don't have any ideas on this issue. Drop extrinsic directlly?

@ziming-zung ziming-zung added the D2-bug Something isn't working label Feb 23, 2023
@Kailai-Wang Kailai-Wang added the I3-high should be completed within 5 working days label Mar 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2023

❗ This issue is stale because it has been open for 60 days with no activity.
Remove Stale label or update it, otherwise this issue will be closed in 7 days.
@litentry/parachain

@github-actions github-actions bot added the Stale label May 6, 2023
@BillyWooo BillyWooo removed the Stale label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D2-bug Something isn't working I3-high should be completed within 5 working days
Projects
None yet
Development

No branches or pull requests

3 participants