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

Internal bug detected: 'MoneyRange(fee)' #6335

Closed
bit0t opened this issue Oct 22, 2024 · 5 comments
Closed

Internal bug detected: 'MoneyRange(fee)' #6335

bit0t opened this issue Oct 22, 2024 · 5 comments

Comments

@bit0t
Copy link

bit0t commented Oct 22, 2024

My nodes started throwing errors, what's going on?

Error message:
core_write.cpp:338 (TxToUniv)
Internal bug detected: 'MoneyRange(fee)'
You may report this issue here: https://github.com/dashpay/dash/issues

@kxcd
Copy link

kxcd commented Oct 22, 2024

This a valid issue impacting mainnet following the creation of the first platform withdrawal transaction. Code to reproduce.

dash-cli getblock 0000000000000008ea69a991881aaa9969ef8e85a55e09d2427e1ce714a68fdb 2

@jprudent
Copy link

jprudent commented Oct 22, 2024

Hi
same problem here
Is it supposed to be fixed by b7d5430 ?

@knst
Copy link
Collaborator

knst commented Oct 22, 2024

Is it supposed to be fixed by b7d5430 ?
It is an other issue.

I think we will have patch version 21.1.1 to avoid big release with any breaking changes in RPC, see #6336

PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Oct 22, 2024
…th withdrawal transactions (asset unlock)

b9a46f6 refactor: use IsPlatformTransfer in core_write and rpc/blockchain (Konstantin Akimov)
f6169fa fix: make composite rpc 'masternode payments' to work with withdrawals (Konstantin Akimov)
e498378 feat: add test for fee in getmempoolentry (Konstantin Akimov)
b0d06f0 feat: add regression test for `getblock` and `getblockstats` for withdrawal fee calculation failure (Konstantin Akimov)
ab7172b fix: getblockstats rpc to work with withdrawal transactions (Konstantin Akimov)
96c9b46 fix: getblock for withdrawal transaction if verbosity level is 2 (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  dashpay#6335

  ## What was done?
  Applied fixes for `getblock` rpc and `getblockstats` rpc to make them work with withdrawal transactions (asset unlock).

  ## How Has This Been Tested?
  Run updated functional test `feature_asset_locks.py` without the fix causes a failure:
  ```
  2024-10-22T12:01:35.902000Z TestFramework (ERROR): JSONRPC error
  Traceback (most recent call last):
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/test_framework.py", line 160, in main
      self.run_test()
    File "/home/knst/projects/dash-reviews/test/functional/feature_asset_locks.py", line 273, in run_test
      self.test_asset_unlocks(node_wallet, node, pubkey)
    File "/home/knst/projects/dash-reviews/test/functional/feature_asset_locks.py", line 410, in test_asset_unlocks
      self.log.info(f"block info: {node.getblock(block_asset_unlock, 2)}")
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/coverage.py", line 49, in __call__
      return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/authproxy.py", line 148, in __call__
      raise JSONRPCException(response['error'], status)
  test_framework.authproxy.JSONRPCException: Internal bug detected: "MoneyRange(fee)"
  core_write.cpp:338 (TxToUniv)
  Please report this issue here: https://github.com/dashpay/dash/issues
   (-1)
  ```

  With patch functional test `feature_asset_locks.py` succeed.

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone
PastaPastaPasta added a commit that referenced this issue Oct 22, 2024
…drawal transactions (asset unlock)

b9a46f6 refactor: use IsPlatformTransfer in core_write and rpc/blockchain (Konstantin Akimov)
f6169fa fix: make composite rpc 'masternode payments' to work with withdrawals (Konstantin Akimov)
e498378 feat: add test for fee in getmempoolentry (Konstantin Akimov)
b0d06f0 feat: add regression test for `getblock` and `getblockstats` for withdrawal fee calculation failure (Konstantin Akimov)
ab7172b fix: getblockstats rpc to work with withdrawal transactions (Konstantin Akimov)
96c9b46 fix: getblock for withdrawal transaction if verbosity level is 2 (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  #6335

  ## What was done?
  Applied fixes for `getblock` rpc and `getblockstats` rpc to make them work with withdrawal transactions (asset unlock).

  ## How Has This Been Tested?
  Run updated functional test `feature_asset_locks.py` without the fix causes a failure:
  ```
  2024-10-22T12:01:35.902000Z TestFramework (ERROR): JSONRPC error
  Traceback (most recent call last):
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/test_framework.py", line 160, in main
      self.run_test()
    File "/home/knst/projects/dash-reviews/test/functional/feature_asset_locks.py", line 273, in run_test
      self.test_asset_unlocks(node_wallet, node, pubkey)
    File "/home/knst/projects/dash-reviews/test/functional/feature_asset_locks.py", line 410, in test_asset_unlocks
      self.log.info(f"block info: {node.getblock(block_asset_unlock, 2)}")
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/coverage.py", line 49, in __call__
      return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/authproxy.py", line 148, in __call__
      raise JSONRPCException(response['error'], status)
  test_framework.authproxy.JSONRPCException: Internal bug detected: "MoneyRange(fee)"
  core_write.cpp:338 (TxToUniv)
  Please report this issue here: https://github.com/dashpay/dash/issues
   (-1)
  ```

  With patch functional test `feature_asset_locks.py` succeed.

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK b9a46f6
  kwvg:
    utACK b9a46f6
  UdjinM6:
    utACK b9a46f6
  ogabrielides:
    utACK b9a46f6

Tree-SHA512: e49cf73bff5fabc9463ae538c6c556d02b3f9e396e0353f5ea0661afa015259409cdada406d05b77bf0414761c76a013cd428ffc283cbdefbefe3384c9d6ccc5
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Oct 22, 2024
…th withdrawal transactions (asset unlock)

b9a46f6 refactor: use IsPlatformTransfer in core_write and rpc/blockchain (Konstantin Akimov)
f6169fa fix: make composite rpc 'masternode payments' to work with withdrawals (Konstantin Akimov)
e498378 feat: add test for fee in getmempoolentry (Konstantin Akimov)
b0d06f0 feat: add regression test for `getblock` and `getblockstats` for withdrawal fee calculation failure (Konstantin Akimov)
ab7172b fix: getblockstats rpc to work with withdrawal transactions (Konstantin Akimov)
96c9b46 fix: getblock for withdrawal transaction if verbosity level is 2 (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  dashpay#6335

  ## What was done?
  Applied fixes for `getblock` rpc and `getblockstats` rpc to make them work with withdrawal transactions (asset unlock).

  ## How Has This Been Tested?
  Run updated functional test `feature_asset_locks.py` without the fix causes a failure:
  ```
  2024-10-22T12:01:35.902000Z TestFramework (ERROR): JSONRPC error
  Traceback (most recent call last):
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/test_framework.py", line 160, in main
      self.run_test()
    File "/home/knst/projects/dash-reviews/test/functional/feature_asset_locks.py", line 273, in run_test
      self.test_asset_unlocks(node_wallet, node, pubkey)
    File "/home/knst/projects/dash-reviews/test/functional/feature_asset_locks.py", line 410, in test_asset_unlocks
      self.log.info(f"block info: {node.getblock(block_asset_unlock, 2)}")
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/coverage.py", line 49, in __call__
      return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/knst/projects/dash-reviews/test/functional/test_framework/authproxy.py", line 148, in __call__
      raise JSONRPCException(response['error'], status)
  test_framework.authproxy.JSONRPCException: Internal bug detected: "MoneyRange(fee)"
  core_write.cpp:338 (TxToUniv)
  Please report this issue here: https://github.com/dashpay/dash/issues
   (-1)
  ```

  With patch functional test `feature_asset_locks.py` succeed.

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK b9a46f6
  kwvg:
    utACK b9a46f6
  UdjinM6:
    utACK b9a46f6
  ogabrielides:
    utACK dashpay@b9a46f6

Tree-SHA512: e49cf73bff5fabc9463ae538c6c556d02b3f9e396e0353f5ea0661afa015259409cdada406d05b77bf0414761c76a013cd428ffc283cbdefbefe3384c9d6ccc5
@geastman3
Copy link

Is it supposed to be fixed by b7d5430 ?
It is an other issue.

I think we will have patch version 21.1.1 to avoid big release with any breaking changes in RPC, see #6336

When? We had to do a emergency bypass to allow this code to be implemented when all of our nodes went down. We would like to get back to compliance.

@knst
Copy link
Collaborator

knst commented Oct 23, 2024

Is it supposed to be fixed by b7d5430 ?
It is an other issue.

I think we will have patch version 21.1.1 to avoid big release with any breaking changes in RPC, see #6336

When? We had to do a emergency bypass to allow this code to be implemented when all of our nodes went down. We would like to get back to compliance.

Just now:
https://github.com/dashpay/dash/releases/tag/v21.1.1

@knst knst closed this as completed Oct 25, 2024
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

No branches or pull requests

5 participants