-
Notifications
You must be signed in to change notification settings - Fork 220
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
Excise reallocate()
#10871
Open
Chris-Hibbert
wants to merge
6
commits into
master
Choose a base branch
from
6679-exciseReallocate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Excise reallocate()
#10871
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bd7ae9e
refactor!: remove reallocate and support for staged allocations
Chris-Hibbert 7854c0a
refactor: satisfies() no longer needs zcf param
Chris-Hibbert 24475c6
test: drop zcfProbe test
Chris-Hibbert e46d102
docs: update references to zcf.reallocate() in docs
Chris-Hibbert da28af3
docs: drop obsolete comment references to incrementBy, decrementBy
Chris-Hibbert b6231b6
test: update obsolete reallocate() call in test
Chris-Hibbert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -18,6 +18,8 @@ The main focus of most threats would be a breach of one of Zoe's core invariants | |||||
|
||||||
## Reallocation | ||||||
|
||||||
THIS SECTION IS OBSOLETE. We've converted all code to use attomicRearrange | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
The current approach (staging, incrementBy/decrementBy and the fact that all seats must | ||||||
be included in realloc) has led to a few bugs. It's probably worth looking for other cases | ||||||
that create new stagings or presume there are none outstanding. We plan to replace this | ||||||
|
This file contains 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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we have coverage of basic upgrade functionality through some other test (preferably something lighter than an integration test)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't.
In order to test upgrading a contract from one version of ZCF to another, we'd need to be able to do what I call time-travel testing, or maintain two different versions of ZCF to install within a single test. We can do that in
agoric-3-proposals
to represent the change from a past version to the current version, or ina3p-integration
to represent the change from the current-on-chain version to this new one. But otherwise, any unit test or bootstrap test would be testing a move the the current version to itself, which is no change at all.The test it would be straightforward to add to
a3p-integration
would callE(zoeConfigFacet).updateZcfBundleId(newBundleId)
, early in the upgrade process, and then any vat that gets upgraded later will use the new ZCF. The tests inp::upgrade-19
exercise ZCF enough to show that the upgrade will be successful.I'll add that to the tests, and also add the update to the staged changes in
upgrade.go
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we had the ability to do a fake livelsots test of a single contract? I suppose any interaction with Zoe is a problem for such a test?