-
Notifications
You must be signed in to change notification settings - Fork 221
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
Silence validator vats #2658
Silence validator vats #2658
Conversation
@warner I've started on |
Sorry. When I added myself as a reviewer I accidentally unlisted your other reviewers. Did I restore them correctly? |
Oh, or were they reviewers? Maybe I was only seeing GitHub's suggestions? In any case, please undo any damage I did but keep me as a reviewer. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK, at least w.r.t the SwingSet changes.
I'd suggest:
I'm guessing we still need a way to deliver the |
BTW we should remember this overlaps with #2519 , a "consensus mode" switch which will (perhaps among other things) make |
@michaelfig and I just talked and thought of a different (although overlapping) approach. The core problem was the "Temporary logging of marshalled error" that One of the issues that came up was that locally-managed vats are each using an instance of liveslots that's created from the same For now, since the goal is to have validators see less output, our plan is:
|
sounds like moving console from ambient authority to explicit authority. Always a good idea! |
35b4a09
to
87084b8
Compare
87084b8
to
6db6ec3
Compare
Well, kinda, except that 1: everybody expects a debug log function to be ambiently available, 2: if I'm debugging something and need to find out what's going on, I'm not going to be happy about modifying the entire call tree to pass in a debug log function. Certainly anything thats gets in my way when I'm stressed and under the gun to fix something is going to be a problem. As examined in #1318 , the difference between long-term "might be helpful to someone someday" log calls, and short-term exploratory "why the heck isn't my printf showing up, does that mean this code isn't even being called?" log calls, is pretty context-sensitive. I think I'm ok with the intent to emit a debug message being ambient, but the caller/creator/next-frame-out gets to decide what actually happens when your code invokes it. If your intention was to write to a specific file, then yeah that's a good candidate for an argument-passed explicit authority. But when the intent is to just let someone bigger know what you're doing, then an ambient |
@michaelfig I don't think this PR was supposed to change the |
Whoops! |
c97a856
to
b7a9e84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, seems good, thanks for making those changes.
I'm leery of the "restart with $DEBUG=" approach to debugging a problem (as opposed to something which records the data the first time around and lets you extract it after you notice a problem), and the general non-discoverability of the prefixes/facilities/loglevel strings that you need to put into $DEBUG, but it's a reasonable step to take for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to dig into our anylogger
sometime. I do not yet understand how it does or should relate to our SES console.
I am not happy to see us dig our process.env
hole deeper. But you're only doing it in places where we're already digging, and we haven't figured out what we want to do instead, so
LGTM
The default for this is the same "Temporary logging of sent error" console.log. However, this allows the caller to decide to do something different to save the errors.
This allows the SwingSet application to use the console tag in order to redirect errors in liveslots. `SwingSet:ls:vXX` and `SwingSet:vat:vXX` are now in use.
This helps quell the anxiety that validators get when bizarre application errors happen. They still appear when running locally or an ag-solo, but not on-chain. To reenable, use: `DEBUG=SwingSet:vat,SwingSet:ls ag-chain-cosmos start`
b7a9e84
to
204ba52
Compare
We don't want to scare away validators with error messages that are unrelated to the correct functioning of their node.
So, we disable vats' and liveslots'
console.*
when runningag-chain-cosmos start
unlessDEBUG=SwingSet:vat,SwingSet:ls
. The current vat logging doesn't change foragoric start
or forag-solo
.