Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Error tranfering NFT from Ethereum Goerli to Polygon Edge: proposal execution is skipped #796

Closed
pedro-haeser-cryptotao opened this issue Jun 22, 2022 · 3 comments
Assignees

Comments

@pedro-haeser-cryptotao
Copy link

pedro-haeser-cryptotao commented Jun 22, 2022

I'm trying to transfer a NFT from Ethereum Goerli to Polygon Edge blockchain.
I can successfullly use cb-sol-cli to mint the token and approve the transaction, but the moment I call cb-sol-cli deposit I can see from the logs that the proposal was submitted to vote, but the execution was skipped:

WARN[06-22|17:10:53] Block watch limit exceeded, skipping execution source=5 dest=100 nonce=3

Expected Behavior

I expected the deposit transaction to complete, so that the NFT from Ethereum Goerli would be transferred to Polygon Edge.

Current Behavior

It seems that the transfer is failing at the final step. I can see that the transaction was successful through goerli etherscan:
https://goerli.etherscan.io/tx/0x571779f78368118a8382a625d66eb7d3d991baaac3560f641e956627505c1380

According to the transaction above, the token was transferred to the handler contract (within Goerli). But the bridge failed to execute the proposal, so the token was not successfully transferred to Polygon Edge.

INFO[06-22|17:07:13] Creating erc721 proposal chain=polygon-edge src=5 nonce=3
INFO[06-22|17:07:13] Watching for finalization event chain=polygon-edge src=5 nonce=3
INFO[06-22|17:07:13] Submitted proposal vote chain=polygon-edge tx=0x3589d3ab8183d414aa4230ca14984e44c9fd953991500bb2b837337a9ea71f7d src=5 depositNonce=3 gasPrice=10000048
WARN[06-22|17:10:53] Block watch limit exceeded, skipping execution source=5 dest=100 nonce=3

Possible Solution

I'm really not sure about what is happening here, anyone faced a similar issue? Any help is much appreciated.

Steps to Reproduce (for bugs)

I'm following the exact steps from here to make the NFT transfer using Chainbridge:

Basically I was able to successfully

  1. Deploy the contracts
  2. Setup the Relayer
  3. Failed at ERC721 Transfer
cb-sol-cli erc721 deposit \
  --url [GOERLI_URL] \
  --privateKey [PRIVATE_KEY] \
  --bridge [BRIDGE_ADDRESS] \
  --resourceId "0x000000000000000000000000000000e389d61c11e5fe32ec1735b3cd38c69501" \
  --id 0x50 \
  --dest 5 \
  --recipient [POLYGON_EDGE_RECEIVING_ADDRESS]

Versions

ChainBridge commit (or docker tag): f2aa093 on main branch
chainbridge-solidity version:
chainbridge-substrate version:
Go version:

@P1sar
Copy link
Member

P1sar commented Jun 27, 2022

Hey @pedro-haeser-cryptotao! It looks like vote transaction (0x3589d3ab8183d414aa4230ca14984e44c9fd953991500bb2b837337a9ea71f7d) somehow failed on blockchain, there could be dozens of reasons, so first of all, you should find logs of this transaction to understand why

@pedro-haeser-cryptotao
Copy link
Author

pedro-haeser-cryptotao commented Jul 1, 2022

Hi @P1sar , thanks for the clarifications. I tried the other way around -- bridging a NFT from Polygon Edge to Goerli in order to get logs easier from Etherscan.

It seems that during the proposal execution the transaction was reverted due to "Fail with error 'ERC721: operator query for nonexistent token'"

Just to ensure that I didn't do something fundamentally wrong during my steps...

  1. I added a minter role to the handler contract on Polygon Edge blockchain
  2. Minted token "0x54"
  3. Checked the owner of token 0x54: it was assigned to the Polygon Edge chainbridge admin account
  4. Approved the transfer from token 0x54 from ERC 721 contract to ERC 721 contract handler (both contracts on Polygon Edge)
  5. Called deposit method for token 0x54 setting the recipient as the Goerli ERC 721 contract address

These are the logs from last step:

INFO[07-01|13:40:47] Handling nonfungible deposit event       chain=polygon-edge
INFO[07-01|13:40:47] Attempting to resolve message            chain=goerli type=NonFungibleTransfer src=100 dst=5 nonce=1 rId=000000000000000000000000000000e389d61c11e5fe32ec1735b3cd38c69501
INFO[07-01|13:40:47] Creating erc721 proposal                 chain=goerli src=100 nonce=1
INFO[07-01|13:40:48] Watching for finalization event          chain=goerli src=100 nonce=1
INFO[07-01|13:40:49] Submitted proposal vote                  chain=goerli tx=0x4c4d106e2897606e984afb175ee9d668a26b4e7c94e1a4a3cdfeb2edc5ccb613 src=100 depositNonce=1 gasPrice=1500000014
INFO[07-01|13:43:35] Submitted proposal execution             chain=goerli tx=0x6596c7f067bf9b155c0fe0d153b3f27fee78ffad668025be96bfb7e8c61a98c6 src=100 dst=5 nonce=1 gasPrice=1500000014

And looking at Etherscan the proposal was successfully submitted, however the execution failed with the error above

Just wanted to check if you see anything wrong with the steps above while I keep troubleshooting it.
The reason why I ask that is because I am trying to transfer the NFT from Polygon Edge to Goerli... so I kinda of expected that the token shouldn't exist at Goerli that moment.

Thanks in advance!

@P1sar
Copy link
Member

P1sar commented Jul 4, 2022

You were trying to bridge ERC721 token that was not minted in advance.
If you want bridge to mint the token you need to set Mintable/Burnable param for this token and also grant Bridge as minter roles for your ERC721

@P1sar P1sar self-assigned this Jul 4, 2022
@P1sar P1sar closed this as completed Jul 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants