[Solved] I'm having an issue mining transaction with @aeternity/[email protected] on Testnet

Hello everyone. Recently we’ve upgraded our JavaScript SDK to version 6.0.0 alongside with the contract code for new Sophia compiler. And for some reason now we’re having issues mining transactions. The errors states next:

Error: Giving up after 10 blocks mined. TxHash th_NABTxNghfKTKd6Zz4haYnJYeSYsFjjhdfKisDTJx5GzQhVqFA
Error: While calling getTransactionByHash (hash), GET to https://sdk-testnet.aepps.com/v2/transactions/th_HSuLt3eNZnPB4arsXuUyrohk1mSfTBDaJJ9xJXaKtt5eGDZu1 failed with 404: Transaction not found

Is anyone can help us with guidance what else should be checked and upgraded?
Our configuration:

aeternityCompilerUrl: https://latest.compiler.aepps.com
aeternityUrl: https://sdk-testnet.aepps.com
aeternityInternalUrl: https://sdk-testnet.aepps.com
aeternityNetworkId: ae_uat

You’re not alone. We’re experiencing the same issue with testnet.

1 Like

Hello, this is on @nduchak.chain and @noandrea’s plate, they will surely looking into it and respond soon.

hello, your configuration looks good, the problem it is probably something more subtle.
Which kind of tx are you trying to submit? a call or create?

I suspect the issue could be related to the AEVM/FATE transition, that is, if you are calling a contract that was deployed before the HF you need to tell the compiler to use AEVM as backend, otherwise it will default to FATE.

If that is the case this comment explains how to do that and this post explains the FATE/AEVM transition

2 Likes

Thank you very much! Specifying aevm backend solved my problem.

2 Likes

Happy to read that. Hardfork time is always a time of many components in need of an update. @noandrea is really trying its best to keep it streamlined and working. THANK YOU for that.

Hey @noandrea! We’re experiencing very similar issue with the mainnet now. Our contract is absolutely the same as it was on test net, and we switched configuration only.

aeternityCompilerUrl: https://latest.compiler.aepps.com
aeternityUrl: https://sdk-mainnet.aepps.com
aeternityInternalUrl: https://sdk-mainnet.aepps.com
aeternityNetworkId: ae_mainnet 

Can you please give use some advice what to check. For instance should we create completely new contract for the mainnet, or the one which was working with testnet will fit?

In this case are you experiencing delays between submitting a transaction and see it appear on the chain?

It’s either huge delay or transaction never make it to the chain at all. Waiting around 5-10 minutes and still nothing being returned in response.

I think this is probably related to the issue described here:

Since when are you experiencing the issue?

We started trying establishing connection with the main net about three days ago. Prior to that time it always was test net, so we were never actually connected to the main net.

It’s either huge delay or transaction never make it to the chain at all…

I may have explained things not clearly there. No transaction was ever reached the network. Testing one at this moment - about 30 minutes passed since transaction submission. Still didn’t get any response.

for the records, we got in touch in PM, the issue in this case was that the wrong contract id was used on mainnet.

Also with the upcoming major release the sdk by default perform sanity checks before broadcasting the transactions

2 Likes