mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Harden validations:
This commit introduces the "HardenedValidations" amendment which, if enabled, allows validators to include additional information in their validations that can increase the robustness of consensus. Specifically, the commit introduces a new optional field that can be set in validation messages can be used to attest to the hash of the latest ledger that a validator considers to be fully validated. Additionally, the commit leverages the previously introduced "cookie" field to improve the robustness of the network by making it possible for servers to automatically detect accidental misconfiguration which results in two or more validators using the same validation key.
This commit is contained in:
@@ -54,7 +54,7 @@ class Validations_test : public beast::unit_test::suite
|
||||
clock_type const& c_;
|
||||
PeerID nodeID_;
|
||||
bool trusted_ = true;
|
||||
std::size_t signIdx_ = 1;
|
||||
std::size_t signIdx_{1};
|
||||
boost::optional<std::uint32_t> loadFee_;
|
||||
|
||||
public:
|
||||
@@ -394,7 +394,7 @@ class Validations_test : public beast::unit_test::suite
|
||||
|
||||
// If we advance far enough for AB to expire, we can fully
|
||||
// validate or partially validate that sequence number again
|
||||
BEAST_EXPECT(ValStatus::badSeq == process(ledgerAZ));
|
||||
BEAST_EXPECT(ValStatus::conflicting == process(ledgerAZ));
|
||||
harness.clock().advance(
|
||||
harness.parms().validationSET_EXPIRES + 1ms);
|
||||
BEAST_EXPECT(ValStatus::current == process(ledgerAZ));
|
||||
@@ -683,8 +683,10 @@ class Validations_test : public beast::unit_test::suite
|
||||
trustedValidations[val.ledgerID()].emplace_back(val);
|
||||
}
|
||||
// d now thinks ledger 1, but cannot re-issue a previously used seq
|
||||
// and attempting it should generate a conflict.
|
||||
{
|
||||
BEAST_EXPECT(ValStatus::badSeq == harness.add(d.partial(ledgerA)));
|
||||
BEAST_EXPECT(
|
||||
ValStatus::conflicting == harness.add(d.partial(ledgerA)));
|
||||
}
|
||||
// e only issues partials
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user