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.
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
Deep freeze (#5187) #5187
base: develop
Are you sure you want to change the base?
Deep freeze (#5187) #5187
Changes from 3 commits
e57d068
a0d48ae
4aac190
306a112
f5efa31
8e1977f
a162663
c7c26ac
805102a
de58a26
91d291a
e0d59ef
ffa6ccd
f9107a7
1f9ecb8
010f36d
6bae95d
b5a10ec
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Don't need to repeat the code. Just add a conditional error:
And then use it in
pay
: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.
Actually, you shouldn't test here and other updated unit-tests if the feature is disabled because
trust
is going to fail. You need a separate test for disabled feature inSetTrust
and also add toSetTrust
tests for invalid combination of the flags. Also need to addOfferCreate
and offer crossing, if not added yet, toOffer
.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.
AMM Create, Deposit, Withdraw are not impacted in any way by deep freeze, correct? Just want to check.
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.
from design perspective it should not, deep freeze imposes a superset of restrictions of the existing regular freeze feature. so any restrictions in these transactions should have already been implemented through the freeze feature already.
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.
seems to missing some test when cashing a check. Example:
for these tests we should also add pre/post amendment behavior as Greg noted, would be easier to compare the difference in behavior
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.
Should add deep freeze check to
CreateCheck
transactor.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.
Shouldn't this fail on check create? Alice is not allowed to receive anyways.
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.
from my understanding we would always allow check creation, it would fail only when someone tries to cash it
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.
Are there any use-cases where
CheckCreate
needs to succeed for deep-frozen tokens?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.
That was an idea we discussed quite some time ago.
Basically, creation of the check is not a payment. It's only a promise to pay.
In that sense the freeze should not affect the creation of checks. It only should prevent cashing out of such checks when necessary.
Later on the sentiment has changed and we decided to address this behavior separately (if we feel like we need to). I'm still reworking Check_test and AMM_test so this is not yet final.
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.
Okay. The existing behavior returns
tecFROZEN
error even if the trust-line is regularly frozen. This file has three instances oftecFROZEN
return code forGlobalFreeze
, low-account-freeze and high-account-freeze of the trust-line.Since a deep-frozen trust line implies that the trust-line is also regularly frozen, there should be continuity of behavior. Sorry, I didn't get around to reading the source code yesterday.
Any change in behavior will break backwards compatibility right?
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.
This line appears to contradict the comment in line 560.
gw1
has deep-frozen the trust-line withalice
andUSD
Issued-Currency. Why is theCheckCreate
operation successful here ?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.
Could someone explain the difference in behavior when low-account deep-freezes a trust line versus high-account deep-freezes a trust line? Is there any impact on the behavior of
Check
s ?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.
There's technically no difference. High freeze and low freeze flags are simply used to figure out which counterparty enacted freeze. If we have 2 accounts, A and B, the hash of one of those must be higher (be it A > B, or B > A).
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.
okay, understood
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.
when the freeze is cleared, perhaps the trust-line limit should be higher? If you'd want send a payment through.