cardano-rosetta
cardano-rosetta copied to clipboard
/construction/submit ShelleyTxValidationErrror
I have an issue with cardano-rosetta 1.7.0 testnet, encountered when I send my transaction with construction/submit call. I use the following standard rosetta flow :
- /construction/derive
- /construction/preprocess
- /construction/metadata
- /construction/payloads
- /construction/combine
- /construction/submit
The same flow was working fine with cardano-rosetta 1.6.1 testnet.
Please see the logs : rosetta_logs.txt
Hi @bcoste. I see OutsideValidityIntervalUTxO
which is telling us the transaction is valid until slot 45707677 but the current slot is 53069672.
Is it possible you are not applying an updated ttl (slot number) for the transaction? This is what /metadata
endpoint returns.
Hi @james-iohk, Thanks for you fast answer. I found no informations on how to calculate the relative_ttl value for the construction/preprocess call. How to get the right ttl with cardano-rosetta ?
@bcoste The relative ttl can be any value provided the transaction is submit within that number of slots. The default is 1000 which means you have 1000 slots to submit before the transaction is invalid.
It's the /metadata
endpoint that returns the absolute ttl
for you to use in future requests. You must use this ttl slot to construct the transaction before submitting.
@james-iohk I currently use a relative_ttl of 1000, and I correctly use the absolute provided ttl.
I've checked with the debugger and here are the values I use : /contruction/preprocess request.metadata.relative_ttl = 1000 response.options.relative_ttl = 1000
/contruction/metadata request.options.relative_ttl = 1000 response.metadata.ttl = 53589935
/construction/payloads request.metadata.ttl = 53589935 => crash
I'm doing something wrong with the ttl ? It was working with cardano-rosetta 1.6.1.
I made another test with a relative_ttl = 5000 and it's working. The default relative_ttl of 1000 is not enough ?
default relative_ttl of 1000 is not enough ?
@bcoste It depends when you submit the transaction. Using 1000 relative slots gives you 1000 seconds to submit. If you take longer it'll fail validation with OutsideValidityIntervalUTxO
.
@james-iohk I submit the transaction in less than 50 seconds, I think that a relative_ttl of 1000 should be enough.