Error in integration test after upgrading to 1.0: "INVALID_ARGUMENT: Disputed"

After we tried to upgrade our project to use DAML SDK 1.0, we got the following error in an integration test:
INVALID_ARGUMENT: Disputed: recreated and original transaction mismatch

What is such an error and what may cause it given that the same integration test worked with previous SDK versions?

See the following PR that does the upgrade and fixes compilation but fails with the above error :

3 Likes

The error is a validation error. Ie the validation code ā€œdisputesā€ the submitted transaction. That shouldnā€™t be possible in the Sandbox except with contract keys, which you donā€™t use, so it suggests a bug. Weā€™ll need to investigate.

1 Like

Could you provide the full error message please? It should contain both the expected and the recreated transaction and give us a better idea of what might have gone wrong. Thank you.

1 Like

You can see the error if you click on the circle CI link on the github PR https://circleci.com/gh/digital-asset/ex-bond-issuance/765?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

Copying the relevant part here:

io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Disputed: recreated and original transaction mismatch GenTransaction(Map(NodeId(0) -> NodeExercises(None,AbsoluteContractId(008ab00113b981785d9db1aeb1757d2b28024bc02cac02a7ebab8b29d88593ee07),d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:BidderParticipation,BidderParticipation_PlaceBid,None,false,Set(Bank1),VersionedValue(ValueVersion(6),ValueRecord(Some(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:BidderParticipation_PlaceBid),ImmArray((Some(price),ValueNumeric(42.0000000000)),(Some(quantity),ValueInt64(200000))))),Set(AuctionAgent, Bank1, Issuer, Regulator),Set(AuctionAgent, Issuer),Set(Bank1),ImmArray(NodeId(1)),Some(VersionedValue(ValueVersion(6),ValueContractId(AbsoluteContractId(0065f8ddbafbbc0b2d7b6394ff8dbca0e83d111e6f3a8ec6ef677de3000f939f21)))),None), NodeId(1) -> NodeCreate(None,AbsoluteContractId(0065f8ddbafbbc0b2d7b6394ff8dbca0e83d111e6f3a8ec6ef677de3000f939f21),ContractInst(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:PlaceBidBotTrigger,VersionedValue(ValueVersion(6),ValueRecord(Some(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:PlaceBidBotTrigger),ImmArray((Some(cashAssetId),ValueRecord(Some(af4883c0b0a58101f424e475221f905c7af77a363841054a36ccd9b34d0468aa:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(ed2beae6b3bc8a8804ef43a7add61c87689c18e7b4a2ed45ec2f866df40d16f0:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((CentralBank,ValueUnit))))))),(Some(label),ValueText(USD)),(Some(version),ValueInt64(0))))),(Some(cashProvider),ValueParty(CentralBank)),(Some(bondProvider),ValueParty(CSD)),(Some(bidder),ValueParty(Bank1)),(Some(auctionAgent),ValueParty(AuctionAgent)),(Some(issuer),ValueParty(Issuer)),(Some(bidData),ValueRecord(Some(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:BidData),ImmArray((Some(price),ValueNumeric(42.0000000000)),(Some(quantity),ValueInt64(200000)),(Some(submissionTime),ValueTimestamp(2020-04-21T19:42:05.610248Z))))),(Some(auctionName),ValueText(testAuction)),(Some(bondAssetId),ValueRecord(Some(af4883c0b0a58101f424e475221f905c7af77a363841054a36ccd9b34d0468aa:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(ed2beae6b3bc8a8804ef43a7add61c87689c18e7b4a2ed45ec2f866df40d16f0:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((CSD,ValueUnit))))))),(Some(label),ValueText(BOND-007)),(Some(version),ValueInt64(0))))),(Some(regulators),ValueList(FrontStack(ValueParty(Regulator))))))),),None,Set(AuctionAgent, Bank1),Set(AuctionAgent, Bank1, Regulator),None)),ImmArray(NodeId(0))) expected, but GenTransaction(Map(NodeId(0) -> NodeExercises(Some(Hash(27a958b96a137611696bb7e8b51fdb4dd8e4d27e3fad7beca3620d0789b5f2d3)),AbsoluteContractId(008ab00113b981785d9db1aeb1757d2b28024bc02cac02a7ebab8b29d88593ee07),d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:BidderParticipation,BidderParticipation_PlaceBid,Some(Location(ed2beae6b3bc8a8804ef43a7add61c87689c18e7b4a2ed45ec2f866df40d16f0,DA.Internal.Prelude,$u002b$u002b,(380,25),(380,27))),false,TreeSet(Bank1),VersionedValue(ValueVersion(6),ValueRecord(Some(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:BidderParticipation_PlaceBid),ImmArray((Some(price),ValueNumeric(42.0000000000)),(Some(quantity),ValueInt64(200000))))),TreeSet(AuctionAgent, Bank1, Issuer, Regulator),TreeSet(AuctionAgent, Issuer),TreeSet(Bank1),ImmArray(NodeId(1)),Some(VersionedValue(ValueVersion(6),ValueContractId(AbsoluteContractId(0065f8ddbafbbc0b2d7b6394ff8dbca0e83d111e6f3a8ec6ef677de3000f939f21)))),None), NodeId(1) -> NodeCreate(Some(Hash(89ae0238bc076b179aced331e1309efc04b51382c27c615b84f19ec956b94bf5)),AbsoluteContractId(0065f8ddbafbbc0b2d7b6394ff8dbca0e83d111e6f3a8ec6ef677de3000f939f21),ContractInst(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:PlaceBidBotTrigger,VersionedValue(ValueVersion(6),ValueRecord(Some(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:PlaceBidBotTrigger),ImmArray((Some(cashAssetId),ValueRecord(Some(af4883c0b0a58101f424e475221f905c7af77a363841054a36ccd9b34d0468aa:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(ed2beae6b3bc8a8804ef43a7add61c87689c18e7b4a2ed45ec2f866df40d16f0:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((CentralBank,ValueUnit))))))),(Some(label),ValueText(USD)),(Some(version),ValueInt64(0))))),(Some(cashProvider),ValueParty(CentralBank)),(Some(bondProvider),ValueParty(CSD)),(Some(bidder),ValueParty(Bank1)),(Some(auctionAgent),ValueParty(AuctionAgent)),(Some(issuer),ValueParty(Issuer)),(Some(bidData),ValueRecord(Some(d20982a667182bce8eb61395fb1c30e5c8ad5f20af14ad518c4a58cccddde1a5:DA.RefApps.Bond.Auction:BidData),ImmArray((Some(price),ValueNumeric(42.0000000000)),(Some(quantity),ValueInt64(200000)),(Some(submissionTime),ValueTimestamp(2020-04-21T19:42:35.212276Z))))),(Some(auctionName),ValueText(testAuction)),(Some(bondAssetId),ValueRecord(Some(af4883c0b0a58101f424e475221f905c7af77a363841054a36ccd9b34d0468aa:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(ed2beae6b3bc8a8804ef43a7add61c87689c18e7b4a2ed45ec2f866df40d16f0:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((CSD,ValueUnit))))))),(Some(label),ValueText(BOND-007)),(Some(version),ValueInt64(0))))),(Some(regulators),ValueList(FrontStack(ValueParty(Regulator))))))),),Some(Location(ed2beae6b3bc8a8804ef43a7add61c87689c18e7b4a2ed45ec2f866df40d16f0,DA.Internal.Prelude,$u002b$u002b,(380,25),(380,27))),TreeSet(AuctionAgent, Bank1),TreeSet(AuctionAgent, Bank1, Regulator),None)),ImmArray(NodeId(0))) is recreated
	at com.digitalasset.refapps.bondissuance.BondIssuanceIT.testFullWorkflow(BondIssuanceIT.java:139)
2 Likes

Iā€™ve opened https://github.com/digital-asset/daml/issues/5662 to track this.

2 Likes

@gaborh: I found an issue in your SDK upgrade PR and posted a comment there. You are setting the min_ledger_time_rel field when thereā€™s actually no need for it. I suspect this is an artifact from the LET/MRT settings that was used previously. For the purpose of your PR, you can simply set the parameter to Optional.empty().

However, this surfaced a bug in the ledger time handling, so thanks for that. We will add a test case together with a fix.

2 Likes