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 the log message in node #64

Merged
merged 3 commits into from
Nov 20, 2023
Merged

Conversation

jianoaix
Copy link
Contributor

Why are these changes needed?

Make it more clear what's happening in node based on feedback

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@@ -163,7 +163,6 @@ func (n *Node) Start(ctx context.Context) error {

// Build the socket based on the hostname/IP provided in the CLI
socket := string(core.MakeOperatorSocket(n.Config.Hostname, n.Config.DispersalPort, n.Config.RetrievalPort))
n.Logger.Info("Registering node with socket", "socket", socket)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is misleading: it will not register if RegisterNodeAtStart is false (which is the default).

@@ -358,6 +358,8 @@ func (n *Node) updateSocketAddress(ctx context.Context, newSocketAddr string) {
}

func (n *Node) checkRegisteredNodeIpOnChain(ctx context.Context) {
n.Logger.Info("Start checkRegisteredNodeIpOnChain goroutine in background to subscribe the operator socket change events onchain")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here and below: the start of an important routine

@@ -207,12 +207,12 @@ func (n *Node) expireLoop() {
// least have 1 second.
timeLimitSec := uint64(math.Max(float64(n.Config.ExpirationPollIntervalSec)*gcPercentageTime, 1.0))
numBatchesDeleted, err := n.Store.DeleteExpiredEntries(time.Now().Unix(), timeLimitSec)
n.Logger.Info("GC cycle deleted", "num batches", numBatchesDeleted)
n.Logger.Info("Complete an expiration cycle to remove expired batches", "num expired batches found and removed", numBatchesDeleted)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Expand what it's doing so it's clear for users reading the log.

node/node.go Outdated
@@ -193,8 +192,9 @@ func (n *Node) Start(ctx context.Context) error {
}

// The expireLoop is a loop that is run once per configured second(s) while the node
// is running. It scans for expirated batches and remove them from the local database.
// is running. It scans for expired batches and remove them from the local database.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "removes them"

@jianoaix jianoaix merged commit 3536eb8 into Layr-Labs:master Nov 20, 2023
4 checks passed
@wesfloyd
Copy link
Contributor

wesfloyd commented Nov 21, 2023

Hi @jianoaix - sharing two requests for our log message improvements:

  1. Can we enhance the log message to be more clear for when the Operator is ejected from the active operator set? Per these docs here the current log message is: "GC cycle deleted "
  2. Can we add a log message to indicate the user has not yet opted-in with EigenDA prior to running the service? We are seeing support tickets where this appears to be the case. Note: this is lower priority, only nice to have if convenient.

@jianoaix
Copy link
Contributor Author

Thanks for feedback, these are good points.
1: The ejection isn't happening at DA Node, so will need to address separately.
2: Noted, will add that log (but will not include in v0.1.1 since it's not as high priority)

hopeyen pushed a commit that referenced this pull request Sep 18, 2024
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.

4 participants