Add Validator Manifests (RIPD-772):

A Validator Manifest allows validators to use a generated ed25519
secret key as a master key for generating new validator public/secret
key pairs. Using this mechanism, rippled instances trust the master
ed25519 public key instead of the now-ephemeral validator public key.

Through a new message and propagation scheme, this lets a validator
change its ephemeral public key without requiring that all rippled
instances on the network restart after maintaining the configuration
file.
This commit is contained in:
Josh Juran
2015-04-10 14:41:16 -07:00
committed by seelabs
parent 41a840e776
commit 0dd6b95ac2
17 changed files with 844 additions and 15 deletions

View File

@@ -653,6 +653,22 @@ void
PeerImp::doProtocolStart()
{
onReadMessage(error_code(), 0);
protocol::TMManifests tm;
overlay_.manifestCache().for_each_manifest(
[&](Manifest const& manifest)
{
auto const& s = manifest.serialized;
auto& tm_e = *tm.add_list();
tm_e.set_stobject(s.data(), s.size());
});
if (tm.list_size() > 0)
{
auto m = std::make_shared<Message>(tm, protocol::mtMANIFESTS);
send (m);
}
}
// Called repeatedly with protocol message data
@@ -778,6 +794,15 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMHello> const& m)
fail("Deprecated TMHello");
}
void
PeerImp::onMessage (std::shared_ptr<protocol::TMManifests> const& m)
{
// VFALCO What's the right job type?
getApp().getJobQueue().addJob (jtVALIDATION_ut,
"receiveManifests", std::bind(&OverlayImpl::onManifests,
&overlay_, std::placeholders::_1, m, shared_from_this()));
}
void
PeerImp::onMessage (std::shared_ptr <protocol::TMPing> const& m)
{