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

Implement MultiSignReserve amendment [RIPD-1647]: #2649

Merged
merged 1 commit into from Oct 10, 2018

Conversation

scottschurr
Copy link
Collaborator

Reduces the account reserve for a multisigning SignerList:

  • From (currently) 3 to 10 OwnerCounts, based on the number of signers in the list,
  • To 1 OwnerCount, independent of the number of signers in the list.

Includes a transition process. Implements the changes described in the internal spec.

No hurry on the review. We probably don't want to merge this until after 1.1.0 is in the bag.

@ripplelabs-jenkins
Copy link
Collaborator

ripplelabs-jenkins commented Aug 7, 2018

Jenkins Build Summary

Built from this commit

Built at 20181002 - 06:45:44

Test Results

Build Type Log Result Status
rpm logfile no test results, t: n/a FAIL 🔴
msvc.Debug logfile 1068 cases, 0 failed, t: 537s PASS ✅
msvc.Debug,
NINJA_BUILD=true
logfile 1068 cases, 0 failed, t: 553s PASS ✅
msvc.Debug
-Dunity=OFF
logfile 1068 cases, 0 failed, t: 1170s PASS ✅
msvc.Release logfile 1068 cases, 0 failed, t: 390s PASS ✅
gcc.Release
-Dassert=ON,
MANUAL_TESTS=true
logfile 1101 cases, 0 failed, t: 6m5s PASS ✅
docs logfile 1 cases, 0 failed, t: 0m1s PASS ✅
gcc.Debug
-Dcoverage=ON
logfile 1071 cases, 0 failed, t: 3m51s PASS ✅
clang.Debug logfile 1071 cases, 0 failed, t: 3m10s PASS ✅
gcc.Debug logfile 1071 cases, 0 failed, t: 3m27s PASS ✅
clang.Debug
-Dunity=OFF
logfile 1071 cases, 0 failed, t: 10m37s PASS ✅
gcc.Debug
-Dunity=OFF
logfile 1071 cases, 0 failed, t: 10m1s PASS ✅
clang.Release
-Dassert=ON
logfile 1071 cases, 0 failed, t: 5m41s PASS ✅
gcc.Release
-Dassert=ON
logfile 1071 cases, 0 failed, t: 6m6s PASS ✅
gcc.Debug
-Dstatic=OFF
logfile 1071 cases, 0 failed, t: 3m26s PASS ✅
gcc.Debug
-Dstatic=OFF -DBUILD_SHARED_LIBS=ON
logfile 1071 cases, 0 failed, t: 3m25s PASS ✅
gcc.Debug,
NINJA_BUILD=true
logfile 1071 cases, 0 failed, t: 3m1s PASS ✅
clang.Debug
-Dunity=OFF -Dsan=address,
PARALLEL_TESTS=false,
DEBUGGER=false
logfile 1071 cases, 0 failed, t: 10m59s PASS ✅
clang.Debug
-Dunity=OFF -Dsan=undefined,
PARALLEL_TESTS=false
logfile 1071 cases, 0 failed, t: 12m5s PASS ✅

Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice job.

int
SetSignerList::ownerCountDelta (std::size_t entryCount)
SetSignerList::oldOwnerCountDelta (std::size_t entryCount)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling functions old... or new... get awkward if we modify this code again. Sometimes during a transition we can name things old... and eventually remove the function, but this function needs to stay around forever. For a function like this, I'm OK with a long cumbersome name if you can think of one. Maybe multiOwnerCountDelta?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preMultiSignReserveAmendmentOwnerCountDelta? ;-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point about the "old" name. I struggled with this a bit and then punted. Maybe signerCountBasedOwnerCountDelta()? That reflects what the function does and what we moved away from. I'll go with that unless I hear objections or a better suggestion.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that works 👍

@@ -152,6 +152,9 @@ enum LedgerSpecificFlags
lsfHighNoRipple = 0x00200000,
lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
lsfHighFreeze = 0x00800000, // True, high side has set freeze flag

// ltSIGNER_LIST
lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we didn't have to do this, but I don't see another way.

@scottschurr
Copy link
Collaborator Author

Fixed name and rebased. Thanks for the review, @seelabs!

ledgerEntry->setFieldU32 (sfSignerListID, defaultSignerListID_);
if (flags) // If the flags are zero default them (they default to zeroed).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is a little weirdly worded and I’m not sure it really adds a lot. I think that “non-default flags specified” works better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I've revised the wording on this comment. Thanks.

@codecov-io
Copy link

codecov-io commented Aug 11, 2018

Codecov Report

Merging #2649 into develop will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2649      +/-   ##
===========================================
- Coverage    69.96%   69.96%   -0.01%     
===========================================
  Files          702      702              
  Lines        55141    55151      +10     
===========================================
+ Hits         38578    38584       +6     
- Misses       16563    16567       +4
Impacted Files Coverage Δ
src/ripple/protocol/Feature.h 100% <ø> (ø) ⬆️
src/ripple/app/tx/impl/SetSignerList.h 100% <ø> (ø) ⬆️
src/ripple/protocol/LedgerFormats.h 100% <ø> (ø) ⬆️
src/ripple/protocol/impl/Feature.cpp 95.65% <100%> (+0.06%) ⬆️
src/ripple/app/tx/impl/SetSignerList.cpp 94% <100%> (+0.38%) ⬆️
src/ripple/ledger/impl/ApplyView.cpp 80% <0%> (-2.61%) ⬇️
src/ripple/app/misc/SHAMapStoreImp.cpp 72.53% <0%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a02903...21561eb. Read the comment docs.

@scottschurr scottschurr added Tx Change Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. labels Aug 13, 2018
@scottschurr
Copy link
Collaborator Author

Squashed and rebased to 1.1.0-rc3.

Reduces the account reserve for a multisigning SignerList from
(conditionally) 3 to 10 OwnerCounts to (unconditionally) 1
OwnerCount.  Includes a transition process.
@scottschurr
Copy link
Collaborator Author

Rebased to 1.2.0-b2.

@seelabs seelabs merged commit 6572fc8 into XRPLF:develop Oct 10, 2018
@seelabs
Copy link
Collaborator

seelabs commented Oct 10, 2018

In 1.2.0-b3

@scottschurr scottschurr deleted the multisig-reserve branch November 19, 2018 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. Tx Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants