-
Notifications
You must be signed in to change notification settings - Fork 39
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
P8EMemorializeContract: Limit scope field changes. #336
Conversation
…preserve its owners and value owners. Also only add to the data access list (instead of fully overwritting it).
Codecov Report
@@ Coverage Diff @@
## main #336 +/- ##
=======================================
Coverage ? 50.75%
=======================================
Files ? 127
Lines ? 11414
Branches ? 0
=======================================
Hits ? 5793
Misses ? 5056
Partials ? 565
|
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.
Overall looks good... holding approve for a bit in light of automerge so the comment can be seen.
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.
Nice work. LGTM
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.
Awesome.
…preserve its owners and value owners. Also only add to the data access list (instead of fully overwritting it).
Description
This PR makes the following changes to the processing done during P8EMemorializeContract:
Owners
orValueOwnerAddress
fields.DataAccess
values and add any new ones that might be missing (but don't remove any existing values).Details:
Currently, during a P8EMemorializeContract call, the
Scope.Owners
,Scope.ValueOwnerAddress
, andScope.DataAccess
values are populated using only info in theMsgP8EMemorializeContractRequest
.This has caused a problem in the following scenario:
MsgP8EMemorializeContractRequest
is called with a contract just for anORIGINATOR
.MsgP8EMemorializeContractRequest
is called with a contract that has anORIGINATOR
and aSERVICING
, that is to be added to the previously created scope.MsgP8EMemorializeContractRequest
is called again for the contract with just for anORIGINATOR
.Problem: Now, both the
ORIGINATOR
andSERVICING
parties are owners on the scope, so both need to sign for step number 3 (which would then actually remove theSERVICING
owner).After some discussion, we decided that we don't want
MsgP8EMemorializeContractRequest
to update theScope.Owners
, orScope.ValueOwnerAddress
fields. We also want theScope.DataAccess
values to only be additive. E.g., during step number 2 (above), the SERVICING party would be added to theDataAccess
list, but during step 3, they'd still be there (they wouldn't be removed).Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes