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 threshold for the intersection of lists of validators #5112

Merged
merged 37 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2063053
Add test case
Bronek Sep 2, 2024
61a99fc
Add validator_list_threshold
Bronek Sep 3, 2024
3564ef8
Use validator_list_threshold
Bronek Aug 27, 2024
fc8e62d
Add unit test for calculation of quorum
Bronek Aug 30, 2024
57b451c
Disable quorum also when threshold is very large
Bronek Sep 2, 2024
cd9631d
More test cases
Bronek Sep 4, 2024
2079600
Merge branch 'develop' into feature/validator_list_threshold
Bronek Sep 17, 2024
afda4ca
Merge branch 'develop' into feature/validator_list_threshold
Bronek Sep 25, 2024
544d0ab
Add unit tests for 2 publishers, threshold=2
Bronek Sep 26, 2024
893072c
Update clang-format settings
thejohnfreeman Mar 1, 2024
9eca277
Reformat code with clang-format-18
Bronek Oct 17, 2024
7307864
Merge branch 'develop' into feature/validator_list_threshold
Bronek Oct 17, 2024
87faf97
Merge branch 'develop' into feature/validator_list_threshold
Bronek Nov 4, 2024
fbcb52a
Add validator_list_threshold to validators-example.txt
Bronek Nov 4, 2024
460cc96
Merge branch 'develop' into feature/validator_list_threshold
Bronek Nov 4, 2024
5974b27
Parsing of [validator_list_threshold] section, more tests
Bronek Nov 5, 2024
5ee6849
Merge branch 'develop' into feature/validator_list_threshold
Bronek Nov 5, 2024
88b2c40
Merge branch 'develop' into feature/validator_list_threshold
Bronek Nov 7, 2024
d227bb0
Review feedback
Bronek Nov 7, 2024
a4e0501
Merge branch 'develop' into feature/validator_list_threshold
Bronek Nov 19, 2024
3704de0
Document new field in API-CHANGELOG.md
Bronek Nov 22, 2024
1dc99fa
Update comment in calculateQuorum
Bronek Nov 22, 2024
e8ff3dd
Merge branch 'develop' into feature/validator_list_threshold
Bronek Jan 13, 2025
9f419e5
Fail test explicitly
Bronek Jan 14, 2025
7e2dbed
Logging improvement
Bronek Jan 14, 2025
20f19ed
Minor tests fixes
Bronek Jan 14, 2025
9f7f1fe
Use XRPL_ASSERT as appropriate
Bronek Jan 14, 2025
8619e37
Change to more strict assert
Bronek Jan 14, 2025
9160b33
Trust explicitly listed validators when threshold > 1
Bronek Jan 14, 2025
17d5d55
Update API-CHANGELOG.md
Bronek Jan 15, 2025
13096d9
Merge branch 'develop' into feature/validator_list_threshold
Bronek Jan 16, 2025
5c191e2
Add test cases for 1, 3, 4, 6, 7 publishers
Bronek Jan 16, 2025
cfdfc55
Merge branch 'develop' into feature/validator_list_threshold
Bronek Jan 17, 2025
c81520a
Merge branch 'develop' into feature/validator_list_threshold
ximinez Jan 23, 2025
2568af2
Merge branch 'develop' into feature/validator_list_threshold
ximinez Jan 23, 2025
3e651a3
Merge branch 'develop' into feature/validator_list_threshold
Bronek Jan 23, 2025
a5e70c0
Merge branch 'develop' into feature/validator_list_threshold
bthomee 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
3 changes: 2 additions & 1 deletion API-CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ The `network_id` field was added in the `server_info` response in version 1.5.0

As of 2025-01-23, version 2.4.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).

### Addition in 2.4
### Additions and bugfixes in 2.4.0

- `ledger_entry`: `state` is added an alias for `ripple_state`.
- `validators`: Added new field `validator_list_threshold` in response.

## XRP Ledger server version 2.3.0

Expand Down
18 changes: 18 additions & 0 deletions cfg/validators-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,21 @@ ED45D1840EE724BE327ABE9146503D5848EFD5F38B6D5FEDE71E80ACCE5E6E738B
#
# [validator_list_keys]
# ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860


# [validator_list_threshold]
#
# Minimum number of validator lists on which a validator must be listed in
# order to be used.
#
# This can be set explicitly to any positive integer number not greater than
# the size of [validator_list_keys]. If it is not set, or set to 0, the
# value will be calculated at startup from the size of [validator_list_keys],
# where the calculation is:
#
# threshold = size(validator_list_keys) < 3
# ? 1
# : floor(size(validator_list_keys) / 2) + 1

[validator_list_threshold]
0
43 changes: 22 additions & 21 deletions include/xrpl/protocol/jss.h
Original file line number Diff line number Diff line change
Expand Up @@ -664,27 +664,28 @@ JSS(validated); // out: NetworkOPs, RPCHelpers, AccountTx*
JSS(validator_list_expires); // out: NetworkOps, ValidatorList
JSS(validator_list); // out: NetworkOps, ValidatorList
JSS(validators);
JSS(validated_hash); // out: NetworkOPs
JSS(validated_ledger); // out: NetworkOPs
JSS(validated_ledger_index); // out: SubmitTransaction
JSS(validated_ledgers); // out: NetworkOPs
JSS(validation_key); // out: ValidationCreate, ValidationSeed
JSS(validation_private_key); // out: ValidationCreate
JSS(validation_public_key); // out: ValidationCreate, ValidationSeed
JSS(validation_quorum); // out: NetworkOPs
JSS(validation_seed); // out: ValidationCreate, ValidationSeed
JSS(validations); // out: AmendmentTableImpl
JSS(validator_sites); // out: ValidatorSites
JSS(value); // out: STAmount
JSS(version); // out: RPCVersion
JSS(vetoed); // out: AmendmentTableImpl
JSS(volume_a); // out: BookChanges
JSS(volume_b); // out: BookChanges
JSS(vote); // in: Feature
JSS(vote_slots); // out: amm_info
JSS(vote_weight); // out: amm_info
JSS(warning); // rpc:
JSS(warnings); // out: server_info, server_state
JSS(validated_hash); // out: NetworkOPs
JSS(validated_ledger); // out: NetworkOPs
JSS(validated_ledger_index); // out: SubmitTransaction
JSS(validated_ledgers); // out: NetworkOPs
JSS(validation_key); // out: ValidationCreate, ValidationSeed
JSS(validation_private_key); // out: ValidationCreate
JSS(validation_public_key); // out: ValidationCreate, ValidationSeed
JSS(validation_quorum); // out: NetworkOPs
JSS(validation_seed); // out: ValidationCreate, ValidationSeed
JSS(validations); // out: AmendmentTableImpl
JSS(validator_list_threshold); // out: ValidatorList
JSS(validator_sites); // out: ValidatorSites
JSS(value); // out: STAmount
JSS(version); // out: RPCVersion
JSS(vetoed); // out: AmendmentTableImpl
JSS(volume_a); // out: BookChanges
JSS(volume_b); // out: BookChanges
JSS(vote); // in: Feature
JSS(vote_slots); // out: amm_info
JSS(vote_weight); // out: amm_info
JSS(warning); // rpc:
JSS(warnings); // out: server_info, server_state
JSS(workers);
JSS(write_load); // out: GetCounts
// clang-format on
Expand Down
Loading
Loading