Comments (2)
- Update existing
softFetch
/softExercise
integration tests to match latest required behaviour. i.e. it must work for any types which satisfy the compatibility relation. And specifically, work for downgrades. Fix existing implementation. - Implement the compatibility relation (i.e code to drop/make-None) within
importValue
/translateValue
, replacing the current code inSBPromoteAnyContract
(which is not in the right place) - Refuse to downgrade optional field values which are not
None
(test and imp) - Control upgrading behaviour via engine-startup feature flag
- Add
ResultNeedUpgradeVerification
to engine/ledger interface (we might yet switch toResultNeedCreate
) - Ensure changes support Ratko's canton level integration test PR. Specifically, so we can replace the related hack PR in the daml repo.
- Restructure contract caching in the engine
- make required calls to
ResultNeedUpgradeVerification
- Add engine level unit tests for upgrading and downgrading.
from daml.
interaction with contract-caching
Following the work to move the compatibility transformation into importValue
it became clear there is a interaction with contract caching (in the engine) which needs to be resolved.
Contract caching prevents the engine from asking the ledger for the same contract twice. Currently the (LF) Value for the contract (received from the ledger) is first converted to an SValue
by importValue
before being cached.
importValue
requires a type to do it's work. Previously (before #17095) it used the type associated with the contract data. Now, to support upgrades, we use the type coming from the code (fetch/exercise) we are running, and then up/down-grade as necessary. Potentially, it seems that the same contract value could be used (fetch/exercise) at two different types (type versions).
This does not play well with the caching of the SValue
resulting from importValue
Remy and I discussed two potential solutions, presented here:
#17095 (comment)
A: cache an (LF) Value. Then convert to SValue on each import
B: cache SValue (like now). Then convert to a new SValue on each import.
We believe that B has too much subtlety and complexity, and scope for bugs.
We agreed that we should attempt A in the first instance.
from daml.
Related Issues (20)
- interpretation Error ValueNesting should not be in Dev
- test ticket
- Document use of Script and Trigger Service TLS Ledger Clients
- Typecheck package upgrades PoC HOT 3
- Deprecate template-local binding syntax ("template-let") HOT 1
- Remove template-local binding syntax ("template-let") HOT 1
- Clean up Canton binary compatibility workarounds.
- `daml test --transactions-output` output styling
- `daml test --transactions-output` with identically named tests in different modules
- Drop support for 'controller..can' syntax
- Cleaning up license files in JARs HOT 5
- merge Andrea's proof PR: #17293
- MultiDAR / Source Dependencies IDE HOT 2
- `module-prefixes` change is ignored by `daml build` HOT 1
- Daml versions are not updated when installing a specific version
- Failure to use arbitrary_canton_sha with patched canton jars HOT 1
- Choice controllers are not rendered nicely in daml reference doc
- Transient `daml version` and `daml install` error
- Daml language server crashes on non-existent data dependency HOT 2
- will daml migrate to pekko ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daml.