Enhance KREAd Contract Robustness to Support Upgrades in Zoe#2
Open
Jorge-Lopes wants to merge 5 commits intoDCFoundation:developfrom
Open
Enhance KREAd Contract Robustness to Support Upgrades in Zoe#2Jorge-Lopes wants to merge 5 commits intoDCFoundation:developfrom
Jorge-Lopes wants to merge 5 commits intoDCFoundation:developfrom
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses a vulnerability in the KREAd contract related to handling
subscriberexits, which were not robust toZoevat upgrades. The details of this issue can be found in Issue #8714.Solution Overview
To mitigate this vulnerability, the
subscribeLatestmethod was implemented to replacegetUpdateSincewithin thehandleExitCharacterandhandleExitItemmethods of themarketinterface. ThesubscribeLatestmethod was chosen due to its ability to handle lossy consumption of a subscriber while providing the capability to reconnect after a disconnection and retrieve a new promise.Contract Upgrade
To apply these changes on-chain, it was necessary to build a core-eval to execute a contract upgrade. During this process, an error ("The 'governedParams' term must be an object like Electorate..."), discussed in Discussion #10423, occurred. This error was due to the outdated version of the
@agoric/governancepackage used in KREAd, which did not include recent updates introduced in this commit.Due to dependencies among Agoric packages, updating only the
@agoric/governancepackage was not feasible. Updating all necessary packages resulted in a larger bundle size, which is a known issue discussed in Discussion #9455. To resolve this, theresolutionfield was included at theagoric/package.jsonto manage dependencies and mitigate size issues.Related Issues
rel: Agoric/agoric-sdk#8714
rel: Agoric/agoric-sdk#10392
Checklist