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

Improve manifest relaying: #3722

Closed
wants to merge 3 commits into from
Closed

Improve manifest relaying: #3722

wants to merge 3 commits into from

Conversation

nbougalis
Copy link
Contributor

The manifest relay code would only ever relay manifests from validators on a server's UNL which means that the manifests of validators that are not broadly trusted can fail to propagate across the network, which can make it difficult to detect and track such validators.

This commit, if merged, propagates all manifests on a best-effort basis resulting in broader availability of manifests on the network and avoid the need to introduce on-ledger manifest storage or to establish one or more manifest repositories.


for (std::size_t i = 0; i < n; ++i)
{
auto& s = m->list().Get(i).stobject();

if (auto mo = deserializeManifest(s))
{
uint256 const hash = mo->hash();
if (!hashRouter.addSuppressionPeer(hash, from->id()))
Copy link
Contributor

Choose a reason for hiding this comment

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

With the deletion of this check, we will be blindly forwarding the manifests even if its duplicates. Consider using addSuppressionPeerWithStatus with a timeout for dupes so that at least we don't spam the network?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will not: manifests are only forwarded if they are successfully applied—that is, if we haven't seen them before.


for (std::size_t i = 0; i < n; ++i)
{
auto& s = m->list().Get(i).stobject();

if (auto mo = deserializeManifest(s))
{
uint256 const hash = mo->hash();
if (!hashRouter.addSuppressionPeer(hash, from->id()))
Copy link
Contributor

Choose a reason for hiding this comment

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

OverlayImpl.cpp:661:11: warning: unused variable 'hashRouter' [-Wunused-variable]

    auto& hashRouter = app_.getHashRouter();
          ^

@XRPLF XRPLF deleted a comment from carlhua Jan 13, 2021
Copy link
Collaborator

@gregtatcam gregtatcam left a comment

Choose a reason for hiding this comment

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

Looks good assuming the hashRouter warning pointed out by @HowardHinnant is fixed.

@manojsdoshi manojsdoshi mentioned this pull request Jan 15, 2021
@codecov-io
Copy link

Codecov Report

Merging #3722 (04d08ea) into develop (55dc7a2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@       Coverage Diff       @@
##   develop   #3722   +/-   ##
===============================
===============================

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 55dc7a2...9215f2f. Read the comment docs.

@manojsdoshi manojsdoshi mentioned this pull request Jan 18, 2021
The manifest relay code would only ever relay manifests from validators
on a server's UNL which means that the manifests of validators that are
not broadly trusted can fail to propagate across the network, which can
make it difficult to detect and track such validators.

This commit, if merged, propagates all manifests on a best-effort basis
resulting in broader availability of manifests on the network and avoid
the need to introduce on-ledger manifest storage or to establish one or
more manifest repositories.
The existing code attempts to validate the provided node public key
using a function that assumes that the encoded public key is for an
account. This causes the parsing to fail.

This commit fixes #3317 by letting the caller specify the type of
the public key being checked.
@manojsdoshi manojsdoshi mentioned this pull request Jan 20, 2021
- The changes to manifest relaying introduced with commit 940ea1b
  will cause newly accepted manifests to be sent back to the peer from
  which they were received. This no longer happens: a newly accepted
  manifest is never sent back to the peer we received it from.
- When encountering a manifest without a domain set, the `manifest` and
  `validator_info` commands would include an empty string as the domain
  associated with the manifest. This no longer happens: if a domain is
  not present, the `domain` field will not be.
This was referenced Jan 20, 2021
@nbougalis nbougalis deleted the manifest-relay branch January 23, 2021 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

manifest command CLI format: publicMalformed error (Version: 1.5.0-rc1)
6 participants