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

fix(drive): merk caching in contract caching (irony) #710

Merged
merged 12 commits into from
Jan 9, 2023

Conversation

QuantumExplorer
Copy link
Member

@QuantumExplorer QuantumExplorer commented Jan 5, 2023

Issue being fixed or feature implemented

Merk caching was causing a problem. The returned cost operation might use the cache, and this cache might cause the cost to be lower if we are using transactions and the item was just inserted. Because contracts would be added to the cache on insert this was the case. Fetching them from disk was less expensive. When the node would come back online and fetch it again the cost would differ between nodes causing a source of non determinism.

What was done?

In order to fix this we allow querying without the Merk cache. While this might not have been strictly needed, it was also a good improvement for many query methods when proofs are not needed.

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov changed the title fix: fix for merk caching in contract caching (irony) fix: merk caching in contract caching (irony) Jan 6, 2023
@shumkov shumkov changed the title fix: merk caching in contract caching (irony) fix(drive): merk caching in contract caching (irony) Jan 6, 2023
shumkov
shumkov previously approved these changes Jan 6, 2023
@QuantumExplorer QuantumExplorer merged commit cea37aa into v0.24-dev Jan 9, 2023
@QuantumExplorer QuantumExplorer deleted the fix/deterministicContractCache branch January 9, 2023 13:35
@QuantumExplorer QuantumExplorer restored the fix/deterministicContractCache branch January 9, 2023 13:35
@QuantumExplorer QuantumExplorer deleted the fix/deterministicContractCache branch January 9, 2023 15:47
@thephez thephez added this to the v0.24.0 milestone Feb 1, 2023
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

Successfully merging this pull request may close these issues.

3 participants