Skip to content

Conversation

the-headless-ghost
Copy link
Contributor

@the-headless-ghost the-headless-ghost commented Aug 15, 2025

Description

resolves #6304

Checklist

  • Manual tests

@the-headless-ghost the-headless-ghost self-assigned this Aug 15, 2025
@the-headless-ghost the-headless-ghost marked this pull request as ready for review August 20, 2025 10:14
@the-headless-ghost the-headless-ghost requested a review from a team as a code owner August 20, 2025 10:14
@crocodile-dentist crocodile-dentist force-pushed the edgr/ux-topology-config-file branch from ef49c64 to c4ada02 Compare August 27, 2025 21:19
@the-headless-ghost the-headless-ghost force-pushed the edgr/ux-topology-config-file branch from c4ada02 to d0da45e Compare August 28, 2025 08:53
@carbolymer
Copy link
Contributor

carbolymer commented Sep 3, 2025

@the-headless-ghost could you squash relevant commits together?

Comment on lines +269 to +272
when (inGenesisMode && not (useLedgerPeers ntUseLedgerPeers) && not isBlockProducer) $
liftIO $ CT.traceWith tracer
$ NetworkConfigUpdateWarning
$ createMsg "It is recommended to use ledger peers and peer snapshot file for relay operations in Genesis mode"
Copy link
Contributor

Choose a reason for hiding this comment

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

When in genesis mode and there, and ledger peers are disabled, the node should error (this message needs to be an error, and the node needs to exit - am I right that the node used to exit in this case?).

Ping @amesgen.

Copy link
Contributor

@crocodile-dentist crocodile-dentist Sep 3, 2025

Choose a reason for hiding this comment

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

I think it can still progress if association mode is localrootsonly, and it might be useful to not have it crash for testing environments.

[edit] I think the node used to crash only when the peerSnapshotFile was given but was missing.

Copy link
Member

Choose a reason for hiding this comment

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

Also, private relays might use LocalRootsOnly. Generally, there isn't really any benefit to using Genesis when LocalRootsOnly, but it also isn't problematic either.

We indeed should error if there is no chance that we will ever leave the PreSyncing state, ie when Network can't ever signal TrustedStateWithExternalPeers.

Copy link
Contributor

Choose a reason for hiding this comment

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

My main concern was a misconfiguration Daedalus node: people will notice node not starting, but won't notice a warning so they'll need to wait for node not making progress with syncing. But maybe indeed that's too conservative.

Comment on lines +274 to +279
when (inGenesisMode && isNothing ntPeerSnapshotPath && useLedgerPeers ntUseLedgerPeers && not isBlockProducer) $
liftIO $ CT.traceWith tracer
$ NetworkConfigUpdateWarning
$ createMsg
$ "It is recommended to specify an up-to-date ledger peer snapshot file for relay operations in Genesis mode "
<> "when the use of ledger peers is enabled."
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are in genesis mode and there is no peer snapshot file, we might need to exit as well. @amesgen what do you think?

Copy link
Contributor

@crocodile-dentist crocodile-dentist Sep 3, 2025

Choose a reason for hiding this comment

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

If the node is syncing up not from a blank state, but maybe somewhat stale, it can use the peers it gets from the ledger it has. Also, this file is not necessary when the node is synced up and so I didn't think crashing the node at startup was warranted.

[edit] We can add to the warning that the node might appear stuck as it may not be able to find any peers to connect to and start syncing.


let trace = traceWith startupTracer
traceL = liftIO . trace
nothing' = MaybeT $ pure Nothing
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use empty from Alternative instead of defining my own nothing'.

@the-headless-ghost the-headless-ghost force-pushed the edgr/ux-topology-config-file branch from 5518526 to 255f1c7 Compare September 9, 2025 14:42
@the-headless-ghost the-headless-ghost requested a review from a team as a code owner September 9, 2025 14:42
@the-headless-ghost the-headless-ghost force-pushed the edgr/ux-topology-config-file branch from 255f1c7 to 7c69071 Compare September 9, 2025 15:05
@johnalotoski johnalotoski added this pull request to the merge queue Sep 10, 2025
Merged via the queue into master with commit 23485cf Sep 10, 2025
23 checks passed
@johnalotoski johnalotoski deleted the edgr/ux-topology-config-file branch September 10, 2025 02:45
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.

improve UX of topology file parsing corner cases
6 participants