Re: Data base connectivity architecture

Mike Hearn

Whether we retain the custom SQL, which applies only to the finance Cash contract, is still an open question.  The generic vault function tryLockFungibleStatesForSpending

doesn’t have custom SQL and is portable, I believe.  Which is more efficient depends on the amount of contention for states (coins) vs. how many states are needed to fulfil a spend (or rather, the variability of the number of states required.  More testing of scenarios required!

It’s not exactly specific to the finance app, it’s more that we haven’t quite refactored all the fungible asset code out of finance and generalised it into the core system yet. Roger is planning to look at this. The original idea was always that the core system would treat all fungible assets identically, and in the finance/core split that wasn’t quite kept everywhere. But it’s not hard to fix.

Join to automatically receive all group messages.