Skip to content

Test Zebra reject message handling #4633

Closed as not planned
Closed as not planned
@teor2345

Description

Scheduling

Zebra doesn't send reject messages, and it ignores reject messages that are sent to it, so these tests are optional.

Motivation

We want to test for two things:

Reject Message Loops

We want to avoid reject message loops, where two peers reject each others' reject messages.
(We also want to avoid these kind of useless message loops in general, but that's trickier to solve.)

zcashd does this here:
https://github.com/zcash/zcash/blob/1b5ab4a06e52c23aca48afb1ebb72a25ef5dd3ca/src/main.cpp#L7347-L7350

Zebra currently ignores reject messages in handle_message_as_request, but we want to test that it stays that way.

Reject Command and Reason Length Limits

Check the limits added in PR #4687 are enforced correctly.
Check they return valid UTF-8 (or ascii?)

Specifications

Bitcoin doesn't say much about this:
https://en.bitcoin.it/wiki/Protocol_documentation#reject

Designs

Start a zebra-network stack, and send it random reject messages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-networkArea: Network protocol updates or fixesC-bugCategory: This is a bugC-securityCategory: Security issuesC-testingCategory: These are testsI-heavyProblems with excessive memory, disk, or CPU usageI-remote-node-overloadZebra can overload other nodes on the network

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions