Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dcde8c2
Lower the log level of some manifest warnings on startup
ximinez Oct 25, 2023
269b855
Remove outdated log message when NOT saving untrusted manifests
ximinez May 15, 2025
c2fa848
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 12, 2025
ed64002
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 13, 2025
1778a1e
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 15, 2025
8705292
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 19, 2025
31bf9b1
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 21, 2025
f0c3db8
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 25, 2025
98871f7
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Nov 28, 2025
24f1168
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Dec 1, 2025
af42384
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Dec 3, 2025
df63773
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Dec 6, 2025
f4689a1
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Dec 13, 2025
4a7d23f
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Dec 19, 2025
0b57875
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Dec 22, 2025
d8d3d33
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 6, 2026
c55e313
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 8, 2026
1519146
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 8, 2026
1d27cba
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 11, 2026
7d17766
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 12, 2026
92af24f
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 13, 2026
3656fe7
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 15, 2026
63ca517
Merge commit '92046785d1fea5f9efe5a770d636792ea6cab78b' into x-startu…
ximinez Jan 28, 2026
a11e367
Merge commit '5f638f55536def0d88b970d1018a465a238e55f4' into x-startu…
ximinez Jan 28, 2026
9fd0993
Merge branch 'develop' into x-startup-manifest-warnings
ximinez Jan 28, 2026
f8a5bef
Fix formatting
ximinez Jan 29, 2026
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
6 changes: 5 additions & 1 deletion src/xrpld/app/misc/Manifest.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ class ManifestCache

@param m Manifest to add

@param loading Indicate whether the manifest is being loaded from the
local database (at startup). Lowers the severity of some log
messages.

@return `ManifestDisposition::accepted` if successful, or
`stale` or `invalid` otherwise

Expand All @@ -320,7 +324,7 @@ class ManifestCache
May be called concurrently
*/
ManifestDisposition
applyManifest(Manifest m);
applyManifest(Manifest m, bool loading = false);

/** Populate manifest cache with manifests in database and config.

Expand Down
19 changes: 11 additions & 8 deletions src/xrpld/app/misc/detail/Manifest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ ManifestCache::revoked(PublicKey const& pk) const
}

ManifestDisposition
ManifestCache::applyManifest(Manifest m)
ManifestCache::applyManifest(Manifest m, bool loading)
{
// Check the manifest against the conditions that do not require a
// `unique_lock` (write lock) on the `mutex_`. Since the signature can be
Expand All @@ -350,7 +350,8 @@ ManifestCache::applyManifest(Manifest m)
// comment below), `checkSignature` only needs to be set to true on the
// first run.
auto prewriteCheck =
[this, &m](auto const& iter, bool checkSignature, auto const& lock) -> std::optional<ManifestDisposition> {
[this, &m, &loading](
auto const& iter, bool checkSignature, auto const& lock) -> std::optional<ManifestDisposition> {
XRPL_ASSERT(lock.owns_lock(), "xrpl::ManifestCache::applyManifest::prewriteCheck : locked");
(void)lock; // not used. parameter is present to ensure the mutex is
// locked when the lambda is called.
Expand Down Expand Up @@ -381,15 +382,15 @@ ManifestCache::applyManifest(Manifest m)
// one.
bool const revoked = m.revoked();

if (auto stream = j_.warn(); stream && revoked)
if (auto stream = loading ? j_.info() : j_.warn(); stream && revoked)
logMftAct(stream, "Revoked", m.masterKey, m.sequence);

// Sanity check: the master key of this manifest should not be used as
// the ephemeral key of another manifest:
if (auto const x = signingToMasterKeys_.find(m.masterKey); x != signingToMasterKeys_.end())
{
JLOG(j_.warn()) << to_string(m) << ": Master key already used as ephemeral key for "
<< toBase58(TokenType::NodePublic, x->second);
JLOG((loading ? j_.info() : j_.warn())) << to_string(m) << ": Master key already used as ephemeral key for "
<< toBase58(TokenType::NodePublic, x->second);

return ManifestDisposition::badMasterKey;
}
Expand All @@ -409,15 +410,17 @@ ManifestCache::applyManifest(Manifest m)
// used as the master or ephemeral key of another manifest:
if (auto const x = signingToMasterKeys_.find(*m.signingKey); x != signingToMasterKeys_.end())
{
JLOG(j_.warn()) << to_string(m) << ": Ephemeral key already used as ephemeral key for "
<< toBase58(TokenType::NodePublic, x->second);
JLOG((loading ? j_.info() : j_.warn()))
<< to_string(m) << ": Ephemeral key already used as ephemeral key for "
<< toBase58(TokenType::NodePublic, x->second);

return ManifestDisposition::badEphemeralKey;
}

if (auto const x = map_.find(*m.signingKey); x != map_.end())
{
JLOG(j_.warn()) << to_string(m) << ": Ephemeral key used as master key for " << to_string(x->second);
JLOG((loading ? j_.info() : j_.warn()))
<< to_string(m) << ": Ephemeral key used as master key for " << to_string(x->second);

return ManifestDisposition::badEphemeralKey;
}
Expand Down
3 changes: 1 addition & 2 deletions src/xrpld/app/rdb/detail/Wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ getManifests(soci::session& session, std::string const& dbTable, ManifestCache&
continue;
}

mCache.applyManifest(std::move(*mo));
mCache.applyManifest(std::move(*mo), true);
}
else
{
Expand Down Expand Up @@ -74,7 +74,6 @@ saveManifests(
// but only save trusted non-revocation manifests.
if (!v.second.revoked() && !isTrusted(v.second.masterKey))
{
JLOG(j.info()) << "Untrusted manifest in cache not saved to db";
continue;
}

Expand Down