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

fix: (discovery) logged configuration #1818

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

iurii-ssv
Copy link
Contributor

@iurii-ssv iurii-ssv commented Oct 25, 2024

Noticed the following log:

{
  "level": "\u001b[35mDEBUG\u001b[0m",
  "time": "2024-10-25T17:19:55.282860Z",
  "name": "P2PNetwork",
  "msg": "configuring discv5 discovery",
  "selfPeer": "16Uiu2HAm5z6GYQaV4ddzic9zSugMFzgjtsUteCLWshkRXiKnodiy",
  "subnets": "00000000000000000000000000000000",
  "discOptsError": "json: unsupported type: basichost.AddrsFactory"
}

it seems zap.Any can't digest arbitrary structs and that results into this: "discOptsError": "json: unsupported type: basichost.AddrsFactory", so in this PR I'm logging only most relevant options(hand-picked).

Copy link
Contributor

@moshe-blox moshe-blox left a comment

Choose a reason for hiding this comment

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

looks good, have we tested this on stage to confirm it prints successfully?

@iurii-ssv
Copy link
Contributor Author

have we tested this on stage to confirm it prints successfully?

You are right, we want to test it out, I just dropped this in here working on something else.

The output on stage is:

{
  "level": "\u001b[35mDEBUG\u001b[0m",
  "time": "2024-10-31T12:55:30.882551Z",
  "name": "P2PNetwork",
  "msg": "configuring discv5 discovery",
  "selfPeer": "16Uiu2HAmGG1QXPzApg4cNgELAHyBQs6CnorZigdvMfgUrERkJ7si",
  "subnets": "00000000000000000000000000000000",
  "discV5Opts": {
    "StoragePath": "",
    "IP": "10.42.13.193",
    "BindIP": "0.0.0.0",
    "Port": 30319,
    "TCPPort": 30319,
    "NetworkKey": {
      "Curve": {
        "P": 1.157920892373162e+77,
        "N": 1.157920892373162e+77,
        "B": 7,
        "Gx": 5.5066263022277344e+76,
        "Gy": 3.2670510020758816e+76,
        "BitSize": 256
      },
      "X": 2.4219202552954124e+76,
      "Y": 2.4037717681676615e+76,
      "D": 4.0350956684652424e+76
    },
    "Bootnodes": [
      "enr:-Ja4QDRUBjWOvVfGxpxvv3FqaCy3psm7IsKu5ETb1GXiexGYDFppD33t7AHRfmQddoAkBiyb7pt4t7ZN0sNB9CsW4I-GAZGOmChMgmlkgnY0gmlwhAorXxuJc2VjcDI1NmsxoQP_bBE-ZYvaXKBR3dRYMN5K_lZP-q-YsBzDZEtxH_4T_YNzc3YBg3RjcIITioN1ZHCCD6I"
    ],
    "Subnets": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
    "EnableLogging": false
  },
  "hostAddress": "74.220.30.155",
  "hostDNS": ""
}

hostDNS is empty though, I haven't looked into whether it's a mandatory thing or not - just calling it out in case you know already.

@moshe-blox
Copy link
Contributor

@iurii-ssv that looks good, thanks 👌

@moshe-blox moshe-blox changed the title discovery: fix logged configuration fix: (discovery) logged configuration Oct 31, 2024
@moshe-blox moshe-blox merged commit cd92d66 into stage Oct 31, 2024
6 checks passed
@moshe-blox moshe-blox deleted the discovery-fix-logged-configuration branch October 31, 2024 13:28
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.

3 participants