Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ledger Pruning is incompatible with the use of divulged contracts #9283

Closed
bame-da opened this issue Mar 30, 2021 · 7 comments
Closed

Ledger Pruning is incompatible with the use of divulged contracts #9283

bame-da opened this issue Mar 30, 2021 · 7 comments
Assignees

Comments

@bame-da
Copy link
Contributor

bame-da commented Mar 30, 2021

The new Ledger Pruning feature causes problems for applications that use divulged contracts as part of interpretation. Since participants may never learn of the archival of a divulged contracts, the only sensible behaviour is to prune all contracts that were only divulged before the pruning offset. However, there is no guarantee that these contracts are actually archived. Thus a fetch on an active contract may fail during interpretation. This behaviour is inconsistent with an unpruned Sandbox and thus harms portability and the separation of concerns between node operations (pruning) and application development.

As a remedy, we should deprecate the use of divulged contracts during interpretation and explicitly say in the pruning documentation that pruning is incompatible with the use of this behaviour. This is a pure documentation change.

With the introduction of explicit disclosure, we should consider disabling this behaviour by default, only maintaining a "legacy" mode in which divulged contracts are usable.

@cocreature
Copy link
Contributor

Do we want to deprecate this before we have explicit divulgence? It seems nicer to wait until that is ready.

@bame-da
Copy link
Contributor Author

bame-da commented Mar 30, 2021

I don't like having incompatibility between two stable features. And if we know we'll change functionality, I think it's better to be quick about marking it as such.

@cocreature
Copy link
Contributor

Alright, no strong objection from me. Just seemed nicer to have a clear alternative to migrate to when something gets deprecated.

@meiersi-da
Copy link
Contributor

Thanks @bame-da . I agree with your reasoning.

@daravep
Copy link
Contributor

daravep commented Apr 15, 2021

@bame-da what is the intended timeline for this? can we assume this will be the default mode in our stack by Q3/2021? and can you confirm that the result would be that pruning would just prune the divulged contracts as well?

@bame-da
Copy link
Contributor Author

bame-da commented Apr 15, 2021

The reason I opened this ticket is that I think we should deprecate the use of divulged contracts in interpretation, and add a warning to the pruning docs asap. We do not want anyone to start relying on both pruning and the use of divulged contracts.

Making the change to actually prune away the divulged contracts can then happen whenever it makes sense to slot it in, but at the latest with the Explicit Disclosure work which is currently targeted for Q3.

@cocreature
Copy link
Contributor

Closing this, I think we’ve resolved this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants