Skip to content

Conversation

@jonatack
Copy link
Member

@jonatack jonatack commented Sep 30, 2020

The following signet startup messages are printed to the debug log immediately on node startup for all chains. This behavior occurs on master as a side effect after the merge of #20014. This PR removes the first message and moves the signet derived magic logging to init.cpp.

$ ./src/bitcoind
2020-09-30T14:25:15Z Using default signet network
2020-09-30T14:25:15Z Signet derived magic (message start): 0a03cf40
2020-09-30T14:25:15Z Bitcoin Core version v0.20.99.0 ...

@maflcko
Copy link
Member

maflcko commented Sep 30, 2020

Seems odd for a constructor to log anyway. I'd say to remove them or move them elsewhere

@jonatack
Copy link
Member Author

Makes sense, but I didn't move them because they are related to the values being set, and because the first message interrelates with the other -signetchallenge messages and value settings. Pinging @kallewoof for thoughts.

@practicalswift
Copy link
Contributor

Concept ACK

Agree with MarcoFalke regarding removing them from the ctor.

@hebasto
Copy link
Member

hebasto commented Sep 30, 2020

Concept ACK.

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

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

Concept and utACK

@kallewoof
Copy link
Contributor

Removing is fine, but they're useful esp for custom signets since you need the magic for external software.

@maflcko
Copy link
Member

maflcko commented Oct 1, 2020

The magic is logged unconditionally in the constructor. If needed, it can be logged unconditionally in the startup-sequence, e.g. init.cpp

and move signet network magic logging from chainparams.cpp to init.cpp
@jonatack jonatack force-pushed the signet-startup-logging-bugfix branch from 8fdcadb to 6fccad7 Compare October 1, 2020 09:27
@jonatack
Copy link
Member Author

jonatack commented Oct 1, 2020

Updated proposal: removed the first message and moved the signet network magic message to init.cpp.

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

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

utACK 6fccad7

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK 6fccad7

Maybe also add testing for not appearing signet messages in the log if not on signet?

@maflcko
Copy link
Member

maflcko commented Oct 1, 2020

ACK 6fccad7

@maflcko maflcko merged commit 9fc2f01 into bitcoin:master Oct 1, 2020
@jonatack jonatack deleted the signet-startup-logging-bugfix branch October 1, 2020 11:34
@jonatack
Copy link
Member Author

jonatack commented Oct 1, 2020

Maybe also add testing for not appearing signet messages in the log if not on signet?

TBH was tempted but thought even the one added test might be overkill.

@maflcko
Copy link
Member

maflcko commented Oct 1, 2020

Maybe also add testing for not appearing signet messages in the log if not on signet?

I just tested this manually, and it seems unlikely and low-risk to regress

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants