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

Node JsonRPC sui_executeTransactionBlock got error response when omitted optional parameters #17666

Open
Ljzn opened this issue May 12, 2024 · 2 comments
Labels

Comments

@Ljzn
Copy link

Ljzn commented May 12, 2024

Hello, SUI team. Today I broadcasted transaction with sui_executeTransactionBlock on my SUI node, got this error:

{
  "error":{
    "code":-32602,
    "message":"invalid type: string \"IP_ADDRESS_HIDDEN:37122\", expected struct SuiTransactionBlockResponseOptions at line 1 column 20"
  },
  "id":1,
  "jsonrpc":"2.0"
}

Should I upgrade my node?


It can be reproduced with this curl command:

curl -v -H "Content-Type: application/json" -d '{"id":1,"params":["AAACAAgAhNcXAAAAAAAgDlE5UxzI//0eAMPsZwG6aaH6dOpcQv0cU9LS6RkkWzgCAgABAQAAAQEDAAAAAAEBAMZACk2KlfimV6aRkKjqCUBjJiMgjceCMMBh+3gapTOOAY4KNVjfSMQyOrwYfhJcB1mzKDh36oXjdbKvQMBLf0NT2Um8BAAAAAAg+c+/kcfO5bRJ6hd4KOtDIk+lY28jPqnxcTxhbsJ4UH/GQApNipX4plemkZCo6glAYyYjII3HgjDAYft4GqUzju4CAAAAAAAAgI1bAAAAAAAA",["AJ8iPcybhsk+g0QkVI+/XjWHK+i6wzwNSxHHTyB0nOow8kzA6tN4+owxL2k3lvLBOuCn8Fdz/2chbLhe8t0V9w/LwM84jKi1T1jFXHrNAdHIYJKqWuzFgBXR3IfYMnmg7w=="]],"method":"sui_executeTransactionBlock","jsonrpc":"2.0"}' "https://fullnode.mainnet.sui.io/" -X POST ;
@Ljzn
Copy link
Author

Ljzn commented May 12, 2024

It seems a bug of interface when Gas Price in that TX is too low.

I tried with all 4 parameters of that method (the last 2 parameters are optional):

curl -v -H "Content-Type: application/json" -d '{"id":1,"params":["AAACAAgAhNcXAAAAAAAgDlE5UxzI//0eAMPsZwG6aaH6dOpcQv0cU9LS6RkkWzgCAgABAQAAAQEDAAAAAAEBAMZACk2KlfimV6aRkKjqCUBjJiMgjceCMMBh+3gapTOOAY4KNVjfSMQyOrwYfhJcB1mzKDh36oXjdbKvQMBLf0NT2Um8BAAAAAAg+c+/kcfO5bRJ6hd4KOtDIk+lY28jPqnxcTxhbsJ4UH/GQApNipX4plemkZCo6glAYyYjII3HgjDAYft4GqUzju4CAAAAAAAAgI1bAAAAAAAA",["AJ8iPcybhsk+g0QkVI+/XjWHK+i6wzwNSxHHTyB0nOow8kzA6tN4+owxL2k3lvLBOuCn8Fdz/2chbLhe8t0V9w/LwM84jKi1T1jFXHrNAdHIYJKqWuzFgBXR3IfYMnmg7w=="], {}, "WaitForLocalExecution"],"method":"sui_executeTransactionBlock","jsonrpc":"2.0"}' "https://fullnode.mainnet.sui.io/" -X POST ;

got the Gas Price too low error:

{"jsonrpc":"2.0","error":{"code":-32002,"message":"Transaction execution failed due to issues with transaction inputs, please review the errors and try again: Gas price 750 under reference gas price (RGP) 751."},"id":1}

So the the bug looks like happening when requesting sui_executeTransactionBlock with only 2 or 3 parameters, and the gas price is too low.

@Ljzn
Copy link
Author

Ljzn commented May 13, 2024

update: I tried that jsonRPC method with a new TX has higher gas price (751), and only 2 parameters, still get error:

"invalid type: string "130.211.2.78:49714", expected struct SuiTransactionBlockResponseOptions at line 1 column 20"

It succeed with all 4 parameters.

@Ljzn Ljzn changed the title Node JsonRPC sui_executeTransactionBlock got error response Node JsonRPC sui_executeTransactionBlock got error response when omitted optional parameters May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants