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

Problem: evm transfer is not efficient #448

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Apr 2, 2024

Description

Solution:

  • override the Transfer callback in block context to do transfer directly, instead of doing burning and minting.

This makes crypto-org-chain/cosmos-sdk#239 unnecessary, will revert later.


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@yihuang yihuang requested a review from mmsqe April 2, 2024 05:46
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 36.00000% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 63.23%. Comparing base (be00d15) to head (b00ab53).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #448      +/-   ##
===========================================
- Coverage    63.29%   63.23%   -0.07%     
===========================================
  Files          125      125              
  Lines        12075    12097      +22     
===========================================
+ Hits          7643     7649       +6     
- Misses        3889     3900      +11     
- Partials       543      548       +5     
Files Coverage Δ
x/evm/keeper/state_transition.go 72.10% <100.00%> (ø)
x/evm/keeper/statedb.go 84.92% <0.00%> (-1.37%) ⬇️
x/evm/statedb/statedb.go 78.24% <36.36%> (-2.71%) ⬇️

go.mod Outdated Show resolved Hide resolved
@yihuang yihuang enabled auto-merge (squash) April 2, 2024 06:57
@yihuang yihuang mentioned this pull request Apr 2, 2024
7 tasks
Solution:
- override the Transfer callback in block context.

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

test reverted sdk

update deps

align input checks
@yihuang yihuang requested a review from mmsqe April 2, 2024 08:04
@yihuang yihuang merged commit 078d3b0 into crypto-org-chain:develop Apr 2, 2024
37 of 39 checks passed
@yihuang yihuang deleted the evm-transfer branch April 2, 2024 11:51
zsystm pushed a commit to b-harvest/ethermint that referenced this pull request Jun 10, 2024
…-chain#448)

Reason for Cherry-pick:
- Required patch for migrating Block STM (Parallel Transaction Execution)
- Avoid common conflict problem when transfer eth

Notes
- (bug) While cherry-picking necessary one, I'm trying to implement native state revert using only SDK's store functions, but some error occurs. Need to fix it.
- (refactor) Refactored test codes by referencing Cronos because it is more clean and maintainable

Original Commit Message:
* Problem: evm transfer is not efficient

Solution:
- override the Transfer callback in block context.

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

* test reverted sdk

* update deps

---------

Signed-off-by: yihuang <[email protected]>

Cherry-picked-by: zsystm <[email protected]>
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.

2 participants