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

Feature: support logs for evm hooks #418

Merged

Conversation

thomas-nguy
Copy link
Collaborator

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

@thomas-nguy thomas-nguy requested a review from a team as a code owner April 7, 2022 03:22
@thomas-nguy thomas-nguy requested review from yihuang and leejw51crypto and removed request for a team April 7, 2022 03:22
@thomas-nguy thomas-nguy force-pushed the thomas/gravity-bridge-cancel branch from a02021b to 88f20c2 Compare April 7, 2022 03:24
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #418 (8597c43) into main (8fa3299) will increase coverage by 0.23%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
+ Coverage   39.40%   39.63%   +0.23%     
==========================================
  Files          31       31              
  Lines        1571     1607      +36     
==========================================
+ Hits          619      637      +18     
- Misses        906      924      +18     
  Partials       46       46              
Impacted Files Coverage Δ
x/cronos/keeper/evm_hooks.go 50.00% <28.00%> (-30.00%) ⬇️
x/cronos/keeper/evm_log_handlers.go 84.43% <100.00%> (+0.93%) ⬆️

@thomas-nguy thomas-nguy force-pushed the thomas/gravity-bridge-cancel branch 5 times, most recently from 2eb94a2 to c71a354 Compare April 8, 2022 05:02
Copy link
Collaborator

@yihuang yihuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good, should we do some test on it?

@thomas-nguy
Copy link
Collaborator Author

for the integration tests, we need the latest ethermint main.

Is it safe to upgrade ethermint at this moment? or still need to work on a forked version for the final release?

@yihuang
Copy link
Collaborator

yihuang commented Apr 15, 2022

for the integration tests, we need the latest ethermint main.

Is it safe to upgrade ethermint at this moment? or still need to work on a forked version for the final release?

time to create the release/v0.7.x branch I guess.

I just created, you can make breaking changes to main branch now.

@thomas-nguy thomas-nguy changed the title [WIP] Support logs for evm hooks [WIP] Feature: support logs for evm hooks Apr 18, 2022
@thomas-nguy thomas-nguy force-pushed the thomas/gravity-bridge-cancel branch from c71a354 to a81e1a5 Compare May 18, 2022 13:00
@thomas-nguy
Copy link
Collaborator Author

blocked by evmos/ethermint#1088

@thomas-nguy thomas-nguy changed the title [WIP] Feature: support logs for evm hooks Feature: support logs for evm hooks May 20, 2022
@@ -153,7 +153,7 @@ require (
replace (
// TODO: fix keyring upstream
github.com/99designs/keyring => github.com/crypto-org-chain/keyring v1.1.6-fixes
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.4
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.44.4-0.20220518050709-bd4ca739c699
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed for ethermint main dependency

# __CronosSendToEthereum
# __CronosSendToEthereumResponse
assert len(txreceipt.logs) == 3
assert get_id_from_receipt(txreceipt) == \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a test

@thomas-nguy thomas-nguy force-pushed the thomas/gravity-bridge-cancel branch from 7732249 to 10a4928 Compare May 20, 2022 06:05
@thomas-nguy thomas-nguy force-pushed the thomas/gravity-bridge-cancel branch from 10a4928 to 55a5b02 Compare May 20, 2022 06:08
github.com/tendermint/tm-db v0.6.7
github.com/tharsis/ethermint v0.6.1-0.20220503175102-93d15db4d086
github.com/tharsis/ethermint v0.6.1-0.20220519101126-9edc87d1147f
Copy link
Collaborator Author

@thomas-nguy thomas-nguy May 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update ethermint to latest to include evmos/ethermint@9edc87d

@thomas-nguy thomas-nguy requested a review from yihuang May 23, 2022 06:39
Copy link
Collaborator

@yihuang yihuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thomas-nguy thomas-nguy merged commit 3c7d726 into crypto-org-chain:main May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants