Skip to content

Bit numbering scheme in pubkey/service features #769

Open

Activity

  1. Atheros1 commented on Jan 21, 2015

    @Atheros1
    Contributor
    >>> from struct import *
    >>> pack('>q',1)
    '\x00\x00\x00\x00\x00\x00\x00\x01'
    

    It appears to me that shared.py#L149 is MSB 0.

  2. Kagami commented on Jan 21, 2015

    @Kagami
    Author

    Hm, you are right. I misread value 1 in

    Value Name Description
    1 NODE_NETWORK This is a normal network node.

    as a bit number.
    But it's still not very clear because pubkey bitfield uses bits and services bitfield uses BE values.

  3. Atheros1 commented on Jan 21, 2015

    @Atheros1
    Contributor

    You are right that that is strange. The services bitfield I copied from Bitcoin because it seemed like a good idea but we don't make use of it yet and it appears that neither does Bitcoin.

  4. Kagami commented on Jan 21, 2015

    @Kagami
    Author

    I know one very good use case for services bitfield: it will allow to find WebSocket gateway nodes for web clients because they can't create normal TCP connections. (Similar idea was proposed here.)
    Also you was proposed to take one bit for TLS-enabled nodes.

  5. added this to the v0.8.0 milestone on Nov 11, 2015
  6. self-assigned this
    on Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions