internet-computer-protocol / evm-rpc-canister

Interact with EVM blockchains from the Internet Computer.
https://internetcomputer.org/docs/current/developer-docs/multi-chain/ethereum/evm-rpc/overview
Apache License 2.0
63 stars 13 forks source link

feat: optional console log message filter #241

Closed rvanasa closed 2 weeks ago

rvanasa commented 3 months ago

Resolves https://github.com/internet-computer-protocol/evm-rpc-canister/issues/201 by adding an optional consoleFilter install arg.

Show all log messages (default):

dfx deploy evm_rpc --argument "(record { consoleFilter = opt variant { ShowAll } })"

Hide all log messages:

dfx deploy evm_rpc --argument "(record { consoleFilter = opt variant { HideAll } })"

Only show INFO ... messages:

dfx deploy evm_rpc --argument "(record { consoleFilter = opt variant { ShowPattern = "^INFO" } })"

Hide TRACE_HTTP ... messages:

dfx deploy evm_rpc --argument "(record { consoleFilter = opt variant { HidePattern = "^TRACE_HTTP" } })"

Only show messages related to eth_getLogs:

dfx deploy evm_rpc --argument "(record { consoleFilter = opt variant { ShowPattern = "eth_getLogs" } })"

Note that ShowPattern and HidePattern accept regular expressions and are evaluated using the regex crate.

letmejustputthishere commented 2 weeks ago

We should make sure this is properly documented with a new release. Do we expect projects that deploy their own evm rpc canister to only deploy the latest release as well?

rvanasa commented 2 weeks ago

We should make sure this is properly documented with a new release.

For sure. I'll work with @gregorydemay and @jessiemongeon1 on making sure the documentation is updated for the new changes.

Do we expect projects that deploy their own evm rpc canister to only deploy the latest release as well?

We can recommend this, although the previous version should continue working as well.

letmejustputthishere commented 2 weeks ago

We can recommend this, although the previous version should continue working as well.

what about deploying main?

rvanasa commented 2 weeks ago

If I understand the question correctly, this is a work in progress since it requires an NNS proposal. We also want to give a window of time for developers to migrate to the new version before redeploying.

rvanasa commented 2 weeks ago

Documentation PR: https://github.com/dfinity/portal/pull/3575

letmejustputthishere commented 2 weeks ago

what i meant was should we advise projects not to deploy from main, but only from releases instead :)

rvanasa commented 2 weeks ago

Haha, okay, I see what you're saying. Yes, that is what we should recommend.