Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Tricks to pry data out of internal transaction #490

Open
ChihChengLiang opened this issue Feb 24, 2021 · 1 comment
Open

Tricks to pry data out of internal transaction #490

ChihChengLiang opened this issue Feb 24, 2021 · 1 comment
Labels
help wanted Extra attention is needed p3

Comments

@ChihChengLiang
Copy link
Collaborator

What's wrong

We currently have some data that are too gas costly to log, we rather want to parse them from the calldata.

But if the function is called from other contracts, we can't parse the calldata.

How can we fix it

  1. use node that supports debug_traceTransaction
  2. use mainnet fork

Quoting Igor

  1. replace all logs to empty and do some tricks for reconstructing the data (add special functions with logging enabled)
  2. load block
  3. fork mainnet in current point with local evm (like ganache)
  4. execute the block with loggable functions
  5. collect the log
@ChihChengLiang ChihChengLiang added help wanted Extra attention is needed p3 labels May 4, 2021
@ChihChengLiang
Copy link
Collaborator Author

This issue is specific to the public key registry contract.

  • The public keys are expensive to log in the event.
  • The coordinator now parse calldata to sync the public key
  • People can register public keys through other proxy contracts. If this happens then the coordinator is not able to sync the public key with the current way
  • Technically it is possible to get the public key from the internal transaction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed p3
Projects
None yet
Development

No branches or pull requests

1 participant