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

[EVM] Bridged account creation event consolidation #5414

Closed
Tracked by #5536
sideninja opened this issue Feb 20, 2024 · 6 comments · Fixed by #5791
Closed
Tracked by #5536

[EVM] Bridged account creation event consolidation #5414

sideninja opened this issue Feb 20, 2024 · 6 comments · Fixed by #5791
Assignees
Labels

Comments

@sideninja
Copy link
Contributor

Currently, the event emitted for COA account creation doesn't have a type that is consistent with other EVM events. The event type ID right now is: A.f8d6e0586b0a20c7.EVM.BridgedAccountCreated.

This is wrong for two reasons:

  • we renamed bridged accounts to COA
  • other EVM service events have the ID schema of: EVM.{name}

The event should probably be renamed to: EVM.COACreated or EVM.CreatedCOA.

@sideninja sideninja self-assigned this Feb 20, 2024
@ramtinms
Copy link
Contributor

I think we ideally should do the reverse, emitting all the events with type A.f8d6e0586b0a20c7.X then we don't need any special handling on access nodes or flow go. thoughts?

@ramtinms
Copy link
Contributor

then if we shard multiple EVMs the events won't cause any issue.

@sideninja
Copy link
Contributor Author

Consensus is to move back to generic event type ID A.{address}.EVM.{name}

cc @ramtinms @m-Peter

@m-Peter
Copy link
Collaborator

m-Peter commented Apr 22, 2024

Sounds good 👍 This will only require a small change in the EVM Gateway, for the indexer component.

@m-Peter
Copy link
Collaborator

m-Peter commented Apr 23, 2024

We should also include the event definitions in the EVM contract itself, for example:

access(all)
event BlockExecuted(
    height: UInt64,
    hash: String,
    totalSupply: Int,
    parentHash: String,
    receiptRoot: String,
    transactionHashes: [String]
)

access(all)
event TransactionExecuted(
    blockHeight: UInt64,
    blockHash: String,
    transactionHash: String,
    encodedTransaction: String,
    failed: Bool,
    vmError: String,
    transactionType: UInt8,
    gasConsumed: UInt64,
    deployedContractAddress: String,
    returnedValue: String,
    logs: String
)

This will be helpful for other tools (such as the Cadence testing framework), to make use of these types.

@sideninja
Copy link
Contributor Author

The consensus was to just rollback special even type IDs for EVM, and use the generic type ID signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants