I'm dry-running an operation with an xtz amount that is close to my max balance to an unrevealed tz2 account on mainnet to get the fees.
When estimating for fees I run two RPC endpoints at the same time:
/chains/main/blocks/head/helpers/scripts/run_operation
with an empty 64 encoded byte array signature:
{
"chain_id": "NetXdQprcVkpaWU",
"operation": {
"contents": [
{
"amount": "234023908",
"storage_limit": "60000",
"gas_limit": "800000",
"kind": "transaction",
"fee": "0",
"destination": "tz2TrNfsT9zt1RW6oefQBrebLg8kMHbcvdRd",
"source": "tz1...",
"counter": "7613069"
}
],
"signature": "edsig...",
"branch": "BLUJG76seoXDxuq8UBWDPvFPJv3StaVckxfijCtvemKmm3tzNYt"
}
}
And
/chains/main/blocks/<branch>/helpers/forge/operations
with this json:
{
"contents": [
{
"amount": "234023908",
"storage_limit": "60000",
"gas_limit": "800000",
"kind": "transaction",
"fee": "0",
"destination": "tz2TrNfsT9zt1RW6oefQBrebLg8kMHbcvdRd",
"source": "tz1...",
"counter": "7613069"
}
],
"branch": "BLUJG76seoXDxuq8UBWDPvFPJv3StaVckxfijCtvemKmm3tzNYt"
}
To get the bytes needed for the storage fee.
I'm in a situation where I cannot check the response of each individual call but I know the error I get is:
Failed to parse the request body: No case matched:
At /kind, unexpected string instead of endorsement
At /kind, unexpected string instead of seed_nonce_revelation
At /kind, unexpected string instead of double_endorsement_evidence
At /kind, unexpected string instead of double_baking_evidence
At /kind, unexpected string instead of activate_account
At /kind, unexpected string instead of proposals
At /kind, unexpected string instead of ballot
At /kind, unexpected string instead of reveal
At /kind, unexpected string instead of transaction
At /kind, unexpected string instead of origination
At /kind, unexpected string instead of delegation
Usually the real reason can be found in between the list but, in this case, nothing else is returned. Is there any way I can investigate further about this error and its cause?
If the problem would be the amount I'm giving is too high, I'd be getting a cannot_pay_storage_fee
kind of error, so I'm guessing the problem is elsewhere?
signature
andchain_id
fields, is this on purpose? – arvidj Oct 26 '20 at 8:54