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

static type and runtime type doesn't match for publicKey in flow events #2525

Closed
fxamacker opened this issue Jun 4, 2023 · 2 comments · Fixed by #2528
Closed

static type and runtime type doesn't match for publicKey in flow events #2525

fxamacker opened this issue Jun 4, 2023 · 2 comments · Fixed by #2528
Assignees
Labels
Bug Something isn't working Feedback

Comments

@fxamacker
Copy link
Member

fxamacker commented Jun 4, 2023

Current Behavior

Currently, publicKey field's static type and runtime type are different in the latest version of AccountKeyAdded and AccountKeyRemoved events.

For example, flow.AccountKeyAdded:

  • event type has publicKey field type [UInt8] (static type).
  • event value has publicKey field as Struct (runtime type).

Proposed Solution

publicKey should have matching static type and runtime type.

@turbolent
Copy link
Member

This is a duplicate of #1796.

In Stable Cadence, the deprecated key APIs got removed, so PublicKey should be the type of the event field.

@fxamacker
Copy link
Member Author

In Stable Cadence, the deprecated key APIs got removed, so PublicKey should be the type of the event field.

@turbolent I see, thanks!

This issue and PR #2528 were opened because this is a blocker for CCF event encoding PR onflow/flow-go#4417. And the PR #2528 supports both APIs.

Should we support both APIs until Stable Cadence is released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feedback
Projects
None yet
2 participants