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

Fail with gRPC Proxy executing Trx FrontEnd and don't redirect to another one #1524

Closed
AdrianKBL opened this issue Mar 25, 2023 · 15 comments · Fixed by #1613 or #1611
Closed

Fail with gRPC Proxy executing Trx FrontEnd and don't redirect to another one #1524

AdrianKBL opened this issue Mar 25, 2023 · 15 comments · Fixed by #1613 or #1611
Assignees
Labels
bug Something isn't working
Milestone

Comments

@AdrianKBL
Copy link

Description

After 2555 NFTs minted in Mainnet (255 Batches and each batch is based on: Transaction sending Hbar + Transactions of Minting NFTs, in total 510 Transactions has been executed), directly from the browser (It means the Transaction don't get executed in BackEnd), It gets executed directly in the FrontEnd via gRPC + Proxies, we got a 503 in the Node04 of Swirlds (We have a work around to retry 3 times to get the receipt, although I thought you guys fixed this last time we opened the issue. As far as I thought the SDK would directly rebalance to an operative Proxie & Node, but as I can see It's not working as expected. After my 3 retries the execution is cut by throwing an Error.

Also after this, we got the same Error than we reported 2-3 months ago, that you guys weren't able to reproduce it.
Transaction must have been frozen before calculating the hash will be stable, try callen freeze

This is something critical for Kabila App, since we're providing this services and our customers are having troubles with it.

image
image

Steps to reproduce

let mintTx = new TokenMintTransaction()
    .setMaxTransactionFee(new Hbar(maxFee))
    .setTokenId(tokenId);
    .setMetadata(metadata);
   mintTx.freezeWith(client);
   const mintTxSign = await mintTx.sign(supplyKey);
   const mintTxResponse =  await mintTxSign.execute(client);
   const receipt = await mintTxResponse.getReceipt(client);
    
   let txTransfer = new TransferTransaction()
     .setMaxTransactionFee(new Hbar(maxFee))
     .setTransactionMemo(memo)
     .addHbarTransfer(account1, hbarAmount.negated()) 
     .addHbarTransfer(account2, hbarAmount);
   const mintTxResponse = await txTransfer.execute(client);
   const receipt = await txSubmit.getReceipt(client);

Additional context

No response

Hedera network

mainnet

Version

2.20.0

Operating system

Windows

@AdrianKBL AdrianKBL added the bug Something isn't working label Mar 25, 2023
@ochikov ochikov self-assigned this Mar 26, 2023
@ochikov
Copy link
Contributor

ochikov commented Mar 27, 2023

Hello @AdriMsM91,
I've spent the weekend investigating the two bugs reported above:

  • About the bug reported for retries when we hit the Node with partial outage (Node 4 with NodeAccoundID 7), I am applying a couple of screenshots with the retrying visualised (transfer and receipt retries):

Screenshot 2023-03-26 at 22 42 05

Screenshot 2023-03-26 at 22 54 17

Screenshot 2023-03-26 at 22 54 57

Screenshot 2023-03-26 at 22 42 09

Screenshot 2023-03-26 at 22 52 51

Screenshot 2023-03-26 at 22 53 47

Screenshot 2023-03-26 at 23 02 23

Screenshot 2023-03-26 at 23 03 13

You can see from the images provided that no matter the error, by default we've got 10 max retries and we are retrying and getting the receipt. On some of the screenshots we are retrying 2-3 times, and on some 5-6 times. The screenshots are taken from React App and Node.js App.

  • About the second problem Transaction must have been frozen before calculating the hash will be stable, try callen freeze I was able only to reproduce it randomly during the weekend. It starts to happen only when my laptop is going to sleep or I left it unattended and the display is off. I tried a large number of times and this is the way to reproduce it.

Screenshot 2023-03-27 at 0 01 56

I will continue to dig it today.

@ochikov
Copy link
Contributor

ochikov commented Mar 27, 2023

@AdriMsM91 regarding the retries, I cannot see any problem. Did you lock the nodes on your side?

@AdrianKBL
Copy link
Author

What do you mean by lock the nodes?

@ochikov
Copy link
Contributor

ochikov commented Mar 27, 2023

@AdriMsM91 I mean by setting the setter:

          .setNodeAccountIds([
            new AccountId(7),
            new AccountId(8),
            new AccountId(9),
          ])

for example with specified nodes?

@AdrianKBL
Copy link
Author

Nop,

let client = Client.forNetwork(network);

@ochikov
Copy link
Contributor

ochikov commented Mar 27, 2023

Perfect, so from my applied screenshots, you can see that it works as expected. I am still trying to identify why

Transaction must have been frozen before calculating the hash will be stable, try callen freeze

is happening. Because when it occurs, all transactions are failing. I still cannot reproduce it without closing the lid of the laptop. It's super strange behavior.

@AdrianKBL
Copy link
Author

It usually works as expected, but some times It doesn't and I don't know why.

@ochikov
Copy link
Contributor

ochikov commented Mar 27, 2023

@AdriMsM91 is there any chance when you are waiting for the NFTs to be minted and for the transfer transaction, something to kill the process of the SDK? What time is needed for the execution of the process?

@AdrianKBL
Copy link
Author

I don't think so @ochikov sometimes we have minted 8,000 NFTs without any problem in Mainnet, sometimes we have problems with 2.5k and the process is exactly the same, also differents customers have the same problem.

@Petyo-Lukanov Petyo-Lukanov added this to the 2.24.0 milestone Mar 28, 2023
@ochikov
Copy link
Contributor

ochikov commented Mar 30, 2023

@AdriMsM91 I cannot catch any problem related with the healthy/unhealthy nodes.

@AdrianKBL
Copy link
Author

Yeah it's super hard to catch up, only happens when you mint really big amounts + big amounts of Hbar Transfer in Mainnet in the FrontEnd directly, without using Node.js for anything related about executing transactions. :(

@AdrianKBL
Copy link
Author

AdrianKBL commented Apr 2, 2023

@ochikov Again today another customer with the same problem.
image

@Petyo-Lukanov Petyo-Lukanov modified the milestones: 2.24.0, 2.25.0 Apr 4, 2023
@ochikov
Copy link
Contributor

ochikov commented Apr 10, 2023

@AdriMsM91 I understand, but the behavior is really hard to be reproduced. I cannot propose any solution right now.

@SimiHunjan SimiHunjan modified the milestones: 2.25.0, 2.26.0 Apr 13, 2023
@ochikov
Copy link
Contributor

ochikov commented Apr 26, 2023

@AdriMsM91 Hello, I will close the issue.

@Petyo-Lukanov Petyo-Lukanov modified the milestones: 2.24.2, 2.25.0 May 3, 2023
@ochikov
Copy link
Contributor

ochikov commented May 22, 2023

Version 2.26.0-beta.2 should fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants