Fail with error 'Gateway: invalid signature. pHash: 0xae3f38dd2c251a2c752a40d1be40d35e3989984955b353cd8a1f090e88e9991 ...'
Closed this issue · 13 comments
I'm using the official "@renproject/ren": "^2.0.2 » library to send BTC to RBTC in Ethernet from mainnet, this problem occurs while withdrawing. phash, sigture, nhash are all generated by SDK。What is the reason for this?
The transaction you provided was successful on RenVM - https://mainnet.renproject.io/renvm/tx/0xa1b08de754bd589d8973d5c2411aa207379909e363fbe5669f118c653d74e774
Can you try to submit via the dev-tools to receive your renBTC https://renproject.github.io/dev-tools/ with the tx hash obCN51S9WJ2Jc9XCQRqiBzeZCeNj++VmnxGMZT1053Q= ?
Also what parameters did you use to construct the ren-js object?
Did you successfully test on testnet beforehand?
ren-js construct parameters
("BTC","mainnet","https://mainnet.infura.io","0x","0x0000000000000000000000000000000000000000000000008a1f7f3230822334");
Can you tell me the reason? @TheAncientGoat
Those parameters do not match any of the functoin calls exposed in renjs v2.0 - can you please provide a code snippet demonstrating the issue?
Also did the dev-tools tx submission work?
https://github.com/lishuailibertine/RenBrigeAcrossChain/blob/main/renBrigeTest/App/acrosschain.js; This is a demo where the parameters are changed to the ones posted above; I want to achieve cross-chain through this SDK, the withdrawal part of the code is implemented in the app
@TheAncientGoat
The code makes sense, but I don't see where deposit.signed
and deposit.submit
is being called (as I can see the ethereum txs you made previously, I assume this is happening somewhere?)
Yes, the logic code for signing and depositing is implemented elsewhere. The signed data is returned by the REN SDK。 Not quite sure what went wrong。Etherscan tx : https://cn.etherscan.com/tx/0x0d507d8bf904dfbaeac20507c66c6cd09084ee0696cf0cce9214165e860770d5. It has the signature information that I submitted.
@TheAncientGoat
If you call .sign
and .submit
from your accrosschain.js
script, you can check that the generated signatures are correct. I suspect there is an issue in how you are passing the transaction data from the script you have provided to the script that is signing / submitting the signatures.
The callback(JSON.stringify(deposit._state),null)
is suspect - if you try and resume the transaction with that data using JSON.parse
it will fail, as not all of the state is serializable to JSON.
There is a flat 100,000 satoshi fee for btc tx fee; so that gets deducted from the transferred amount. This will be adjusted to a dynamic amount in the next network upgrade
There is a flat 100,000 satoshi fee for btc tx fee; so that gets deducted from the transferred amount. This will be adjusted to a dynamic amount in the next network upgrade
So the reason for the withdrawal failure is this amount? 😂
If the amount
passed to the mint
eth contract call does not match the amount
in the out
query, it will fail.
If the
amount
passed to themint
eth contract call does not match theamount
in theout
query, it will fail.
https://cn.etherscan.com/tx/0x2eeafff823c475b6449f7a684a4ab5b38da6d49707da20eb46669740571cd8d3. The withdrawal was successful. Thank you for your help。