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

fix EVM <=> TAO balance transfer precision #984

Merged
merged 20 commits into from
Nov 15, 2024
Merged

fix EVM <=> TAO balance transfer precision #984

merged 20 commits into from
Nov 15, 2024

Conversation

sam0x17
Copy link
Contributor

@sam0x17 sam0x17 commented Nov 15, 2024

Previously, the EVM integration imposed a maximum transfer limit of 18.4 TAO to avoid precision loss when converting between EVM (18 decimals) and Substrate (9 decimals).

This update removes the transfer limit by truncating excess decimals from the least significant end during the conversion. As a result, large transfers are now allowed. Infinitesimally small amounts of WEI (less than the precision of TAO) are discarded during this process, and a log entry is generated whenever such precision loss occurs.

also includes some CI fixes:

  • cargo audit version locked for now to prevent regressions of the Cargo.lock parsing issue
  • don't need to install rustup because it is pre-installed with stable already installed

@sam0x17 sam0x17 added the bug Something isn't working label Nov 15, 2024
@sam0x17 sam0x17 self-assigned this Nov 15, 2024
@sam0x17 sam0x17 requested a review from unconst as a code owner November 15, 2024 17:21
@github-actions github-actions bot added the hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet label Nov 15, 2024
@sam0x17 sam0x17 changed the base branch from main to devnet-ready November 15, 2024 17:21
@opentensor opentensor deleted a comment from github-actions bot Nov 15, 2024
@sam0x17 sam0x17 removed the hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet label Nov 15, 2024
gztensor
gztensor previously approved these changes Nov 15, 2024
gztensor
gztensor previously approved these changes Nov 15, 2024
@gztensor gztensor linked an issue Nov 15, 2024 that may be closed by this pull request
@sam0x17 sam0x17 requested a review from gztensor November 15, 2024 21:00
@sam0x17 sam0x17 merged commit 03527fa into devnet-ready Nov 15, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Cannot transfer more than 18.4 TAO with EVM
2 participants