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

Deep freeze (#5187) #5187

Open
wants to merge 39 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e57d068
Implement Deep Freeze
HowardHinnant Aug 2, 2024
a0d48ae
[FOLD] Move feature to top of list
HowardHinnant Oct 31, 2024
4aac190
[FOLD] Make use of the deep freeze flags malformed prior
HowardHinnant Oct 31, 2024
306a112
Fixed creation of buy offer transaction to fail with tecFROZEN instantly
vvysokikh1 Nov 15, 2024
f5efa31
Fixed comments #1
vvysokikh1 Nov 18, 2024
8e1977f
Reworked freeze flag handling in SetTrust
vvysokikh1 Nov 20, 2024
a162663
Moved modified trustline flags extraction into separate function
vvysokikh1 Nov 20, 2024
c7c26ac
Added more check to test cases
vvysokikh1 Nov 21, 2024
805102a
Added payment tests for freeze and deep freeze
vvysokikh1 Nov 22, 2024
de58a26
Clarified behavior of individual freeze
vvysokikh1 Nov 22, 2024
91d291a
Added offer test for freeze and deep freeze
vvysokikh1 Nov 28, 2024
e0d59ef
More offer tests
vvysokikh1 Dec 2, 2024
ffa6ccd
Fixed typo
vvysokikh1 Dec 4, 2024
f9107a7
Fixed tx flags check in case trustline doesn't exist yet
vvysokikh1 Dec 4, 2024
1f9ecb8
Added tests for trustline creation freeze handling
vvysokikh1 Dec 4, 2024
010f36d
Partially fixed comments
vvysokikh1 Dec 6, 2024
6bae95d
Partially fixed comments
vvysokikh1 Dec 10, 2024
b5a10ec
Fixed buy offer crossing when deep frozen
vvysokikh1 Dec 10, 2024
a1d7dac
Reverted deep freeze check tests
vvysokikh1 Jan 6, 2025
c971db5
Added revamped deep freeze check tests
vvysokikh1 Jan 10, 2025
9f17d9f
Reverted deep freeze AMM tests
vvysokikh1 Jan 13, 2025
d75894a
Added some AMM tests and fixed comments
vvysokikh1 Jan 15, 2025
03f7b5d
Added offer tests with trustline frozen by currency holder
vvysokikh1 Jan 15, 2025
ae5fae2
Added longer path payment tests
vvysokikh1 Jan 17, 2025
c60d491
Added NFT deep freeze tests
vvysokikh1 Jan 17, 2025
0d8855a
Fixed flag
vvysokikh1 Jan 17, 2025
70235b6
Merge branch 'develop' of github.com:vvysokikh1/rippled into deep_freeze
vvysokikh1 Jan 17, 2025
a73ea01
Small fixes
vvysokikh1 Jan 17, 2025
411a0f0
Unity build fix
vvysokikh1 Jan 17, 2025
4c5c9cc
simplified unity build fix
vvysokikh1 Jan 17, 2025
9f21f5d
Fixed tests
vvysokikh1 Jan 17, 2025
8c40ab9
Fixed NFT deep freeze offer acceptance
vvysokikh1 Jan 20, 2025
c5aa145
Added invariant check for deep freeze flag on a trust line
vvysokikh1 Jan 20, 2025
851e619
Added deep freeze into acoount_lines rpc response
vvysokikh1 Jan 20, 2025
290b908
Uncommented NFT test with freeze on currency holder side
vvysokikh1 Jan 20, 2025
9db6765
Added more invariant tests
vvysokikh1 Jan 21, 2025
7ba80fe
Comment fixes
vvysokikh1 Jan 22, 2025
79a4da3
Comment fixes
vvysokikh1 Jan 23, 2025
c1778e5
Added invariant check for frozen trust line balance change
vvysokikh1 Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/xrpl/protocol/Feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace detail {
// Feature.cpp. Because it's only used to reserve storage, and determine how
// large to make the FeatureBitset, it MAY be larger. It MUST NOT be less than
// the actual number of amendments. A LogicError on startup will verify this.
static constexpr std::size_t numFeatures = 80;
static constexpr std::size_t numFeatures = 81;

/** Amendments that this server supports and the default voting behavior.
Whether they are enabled depends on the Rules defined in the validated
Expand Down
10 changes: 6 additions & 4 deletions include/xrpl/protocol/LedgerFormats.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ enum LedgerSpecificFlags {
lsfHighAuth = 0x00080000,
lsfLowNoRipple = 0x00100000,
lsfHighNoRipple = 0x00200000,
lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
lsfAMMNode = 0x01000000, // True, trust line to AMM. Used by client
// apps to identify payments via AMM.
lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
lsfAMMNode = 0x01000000, // True, trust line to AMM. Used by client
// apps to identify payments via AMM.
lsfLowDeepFreeze = 0x02000000, // True, low side has set deep freeze flag
lsfHighDeepFreeze = 0x04000000, // True, high side has set deep freeze flag

// ltSIGNER_LIST
lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
Expand Down
4 changes: 3 additions & 1 deletion include/xrpl/protocol/TxFlags.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ constexpr std::uint32_t tfSetNoRipple = 0x00020000;
constexpr std::uint32_t tfClearNoRipple = 0x00040000;
constexpr std::uint32_t tfSetFreeze = 0x00100000;
constexpr std::uint32_t tfClearFreeze = 0x00200000;
constexpr std::uint32_t tfSetDeepFreeze = 0x00400000;
constexpr std::uint32_t tfClearDeepFreeze = 0x00800000;
constexpr std::uint32_t tfTrustSetMask =
~(tfUniversal | tfSetfAuth | tfSetNoRipple | tfClearNoRipple | tfSetFreeze |
tfClearFreeze);
tfClearFreeze | tfSetDeepFreeze | tfClearDeepFreeze);

// EnableAmendment flags:
constexpr std::uint32_t tfGotMajority = 0x00010000;
Expand Down
6 changes: 5 additions & 1 deletion include/xrpl/protocol/detail/features.macro
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
// Keep it sorted in reverse chronological order.
// If you add an amendment here, then do not forget to increment `numFeatures`
// in include/xrpl/protocol/Feature.h.
// clang-format off

XRPL_FEATURE(DeepFreeze, Supported::yes, VoteBehavior::DefaultNo)
vvysokikh1 marked this conversation as resolved.
Show resolved Hide resolved
XRPL_FEATURE(MPTokensV1, Supported::yes, VoteBehavior::DefaultNo)
// InvariantsV1_1 will be changes to Supported::yes when all the
// invariants expected to be included under it are complete.
XRPL_FEATURE(MPTokensV1, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(InvariantsV1_1, Supported::no, VoteBehavior::DefaultNo)
XRPL_FIX (NFTokenPageLinks, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (InnerObjTemplate2, Supported::yes, VoteBehavior::DefaultNo)
Expand Down Expand Up @@ -111,3 +113,5 @@ XRPL_FIX (NFTokenNegOffer, Supported::yes, VoteBehavior::Obsolete)
XRPL_FIX (NFTokenDirV1, Supported::yes, VoteBehavior::Obsolete)
XRPL_FEATURE(NonFungibleTokensV1, Supported::yes, VoteBehavior::Obsolete)
XRPL_FEATURE(CryptoConditionsSuite, Supported::yes, VoteBehavior::Obsolete)

// clang-format on
Loading