Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Some ETH->NEAR transfers cannot be finished #55

Closed
alexauroradev opened this issue Apr 22, 2021 · 3 comments
Closed

Some ETH->NEAR transfers cannot be finished #55

alexauroradev opened this issue Apr 22, 2021 · 3 comments
Assignees
Labels
bug Something isn't working P1

Comments

@alexauroradev
Copy link

Here's the finalisation transaction of the transfer with bridge-testing repo script:

% node build/3-finalise-deposit.js 0x18195ed958ef09c3f64830be71a88bef89fcab7900fe6cd3a405a4351628338e                 (master)
Finalising deposit, that was started in Ethereum transaction 0x18195ed958ef09c3f64830be71a88bef89fcab7900fe6cd3a405a4351628338e
--------------------------------------------------------------------------------
The proof was successfully found
Bridged token address is 6b175474e89094c44da98b954eedeac495271d0f.factory.bridge.near
Bridged token balance of as.near before finalisation of the deposit: 3575000000000000000
Receipt: 9BQrTYhujFYfdVHw6XUu2GPQuTzcs95VqmVVBeSMdmgh
        Failure [factory.bridge.near]: Error: Smart contract panicked: panicked at 'assertion failed: `(left == right)`
  left: `[69, 207, 88, 86, 162, 127, 119, 69, 1, 222, 54, 184, 116, 229, 76, 21, 224, 200, 222, 61, 232, 75, 48, 37, 67, 1, 4, 48, 198, 49, 194, 109]`,
 right: `[161, 27, 116, 90, 184, 119, 30, 126, 66, 126, 232, 197, 37, 10, 148, 19, 220, 247, 143, 120, 216, 79, 76, 45, 67, 97, 35, 221, 143, 129, 219, 86]`', eth-prover/src/lib.rs:186:13
Receipts: 7MjMomRWfcAFPG6hPmrH7YT4zYBRY6vuqsCRfPXg7rFi, B3qfEGzpvc8M3ZoASdYjt8QqoUPonVUPKaCveQFqtXeg
        Failure [factory.bridge.near]: Error: Smart contract panicked: panicked at 'Callback computation 0 was not successful', src/lib.rs:107:1
ServerTransactionError: Smart contract panicked: panicked at 'Callback computation 0 was not successful', src/lib.rs:107:1
    at Object.parseResultError (/Users/alexshevchenko/code/bridge-testing/node_modules/near-api-js/lib/utils/rpc_errors.js:48:29)
    at Account.signAndSendTransaction (/Users/alexshevchenko/code/bridge-testing/node_modules/near-api-js/lib/account.js:151:36)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /Users/alexshevchenko/code/bridge-testing/node_modules/near-api-js/lib/contract.js:49:39
    at async main (/Users/alexshevchenko/code/bridge-testing/build/3-finalise-deposit.js:58:5) {
  type: 'GuestPanic',
  context: undefined,
  index: 0,
  panic_msg: "panicked at 'Callback computation 0 was not successful', src/lib.rs:107:1",
  kind: {
    panic_msg: "panicked at 'Callback computation 0 was not successful', src/lib.rs:107:1"
  },
  transaction_outcome: {
    proof: [ [Object] ],
    block_hash: 'GyCUbUeiXxAvwX6Nbteut2sN1fW2zG3mVzsempoGfnad',
    id: '9niRvsgv43kJ21SmRhcVikeTKQtT3Y7oWcBCYcGVDM6U',
    outcome: {
      logs: [],
      receipt_ids: [Array],
      gas_burnt: 2434700351888,
      tokens_burnt: '243470035188800000000',
      executor_id: 'as.near',
      status: [Object]
    }
  }
}
@alexauroradev alexauroradev added bug Something isn't working P1 labels Apr 22, 2021
@paouvrard
Copy link

image

When executed from the frontend, this transaction would have failed before the user is redirected to NEAR Wallet.
This is the same issue encountered on Ropsten previously where the computed receipts trie is invalid: the computed trie root does not match the receiptsRoot from the block header.
aurora-is-near/rainbow-bridge-client#22
This was reproduced with the ethereumjs tree and with the new lite version we are using.

Ideas why this could be happening:

  • Invalid rlp serialization of a receipt (invalid value put in the trie)
  • Trie not computed correctly

@mfornet
Copy link
Contributor

mfornet commented Apr 22, 2021

It seems to be related with: Near-One/rainbow-bridge#557

I'm investigating right now.

@mfornet
Copy link
Contributor

mfornet commented Apr 23, 2021

Found the problem, and added a patch: aurora-is-near/eth-object#1

For the moment I used the new code to finalise this tx successfully: https://explorer.near.org/transactions/5T6gJfwucQZdDcpy2Tj1Th5bfJ9t3rCjM5UpRK9wfL4n

@mfornet mfornet closed this as completed Jul 23, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

3 participants