Skip to content

Create Test Vectors #9

Description

@mixmix

Problem: the spec alone is good, but how do we know if we've built our implementations the same

Solution: provide well formed and documented test data.

Example

e.g once such "test vector" could be

  • description: this is the first 3 packets of feed containing only type 0 packets. decoding them you should get 3 messages which say "hello", "world", "tiny-ssb"
  • prefix_dmx: test-vector-1
  • feed_id: d2hhdCB1cCBteSBkYXNkZmFzO2RsZmtqYXM7bGRrZmphbDtzZGtmYXNkZg==
  • packets: asdasdkajsd;lkajsdasd, asfdasdlkas;dklajsd;lk, jkyapwiouy32kjw3er
  • packet_payload: hello, world, tiny-ssb

Stepping Stones

If we wanted we could make more atomic test vectors which help you build up to this:

  • calculate the message_id of this message
  • calculate the dmx of the next message given the latest message

Coverage

Should probably cover all basics in current spec:

  • side chunks / reconstruct a blob?
  • decoding "command" packets?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions