Reputation: 144
After upgrading to V3 from V2, all our ledger DSL tests failed with "java.lang.IllegalArgumentException: Transaction exceeded network's maximum transaction size limit : 10485760 bytes."
Not sure how the transaction can be that big - it is just some simple ones. And they work with V2.
\Sean
Upvotes: 1
Views: 594
Reputation: 144
After some experiments, here is what I have observed and also a workaround -
The default maxTransactionSize in NetworkParameters is 10485760 bytes for all three test types: MockServices, MockNetwork, and Driver. But the state and contract jar is easily over 20 MB for even the simplest use case. What is strange is that the CordappLoader sometimes loads the complete jar and sometimes a much smaller temporary test jar, depending on which module the tests are in or even on which machine the tests are run on. V3 WireTransaction.toLedgerTransactionInternal adds a new checkTransactionSize so if the full jar is loaded then the check will fail.
My workaround is to increase the maxTransactionSize parameter to accommodate for the erratic behavior. It is not great but for now I just want to get the tests to pass to move on.
I hope there is a better solution.
\Sean
Upvotes: 1