cardano-rosetta icon indicating copy to clipboard operation
cardano-rosetta copied to clipboard

/construction/submit ShelleyTxValidationErrror

Open bcoste opened this issue 2 years ago • 7 comments

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

bcoste avatar Mar 18 '22 08:03 bcoste

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.

catch-21 avatar Mar 21 '22 13:03 catch-21

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 avatar Mar 22 '22 08:03 bcoste

@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.

catch-21 avatar Mar 22 '22 11:03 catch-21

@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.

bcoste avatar Mar 22 '22 15:03 bcoste

I made another test with a relative_ttl = 5000 and it's working. The default relative_ttl of 1000 is not enough ?

bcoste avatar Mar 22 '22 16:03 bcoste

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.

catch-21 avatar Mar 24 '22 11:03 catch-21

@james-iohk I submit the transaction in less than 50 seconds, I think that a relative_ttl of 1000 should be enough.

bcoste avatar Mar 24 '22 13:03 bcoste