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

docs(backlog): Document source mapper include_block_cbor argument #132

Closed
mark-stopka opened this issue Feb 7, 2022 · 0 comments · Fixed by #137
Closed

docs(backlog): Document source mapper include_block_cbor argument #132

mark-stopka opened this issue Feb 7, 2022 · 0 comments · Fixed by #137
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@mark-stopka
Copy link
Collaborator

mark-stopka commented Feb 7, 2022

Documentation was not updated with the #127

PR #127 implements an optional flag that will include the raw cbor payload for each block as a extra field of the Block event. To enable the feature, the include_block_cbor flag of the mapper config needs to be enabled. The following is an example of a daemon mode config that includes the payload and outputs to the stdout sink:

[source]
type = "N2N"
address = ["Tcp", "relays-new.cardano-mainnet.iohk.io:3001"]
magic = "mainnet"
since = [19284008, "c91204d1ea48281023147416851008c192dbf7e4dba9c89597c715fa0af68939"]

[source.mapper]
include_block_cbor = true

[[filters]]
type = "Selection"

[filters.check]
predicate = "variant_in"
argument = ["Block"]

[sink]
type = "Stdout"
format = "JSONL"

This is an example of the output:

{
    "block": {
        "body_size": 1094,
        "cbor_hex": "820384828f1a004fa3be1a012640625820c04e0a42caf9947b8edcb208e41f6ee130b7446... [REDACTED]",
        "hash": "586f3c5dff0a9a026b04b183b1923da6d5181270d1362d073725f044aa5460d7",
        "issuer_vkey": "61261a95b7613ee6bf2067dad77b70349729b0c50d57bc1cf30de0db4a1e73a8",
        "number": 5219262,
        "previous_hash": "c04e0a42caf9947b8edcb208e41f6ee130b7446c76872fe9af5ed33067092590",
        "slot": 19284066,
        "tx_count": 3
    },
    "context": {
        "block_hash": "586f3c5dff0a9a026b04b183b1923da6d5181270d1362d073725f044aa5460d7",
        "block_number": 5219262,
        "certificate_idx": null,
        "input_idx": null,
        "output_address": null,
        "output_idx": null,
        "slot": 19284066,
        "timestamp": 1610850357,
        "tx_hash": null,
        "tx_idx": null
    },
    "fingerprint": "19284066.blck.310275953652163912797886047039773707901"
}
@mark-stopka mark-stopka added the documentation Improvements or additions to documentation label Feb 7, 2022
@mark-stopka mark-stopka moved this to Refinement in Oura Development Feb 7, 2022
@mark-stopka mark-stopka added this to the v1.2 milestone Feb 7, 2022
@rvcas rvcas closed this as completed in #137 Feb 7, 2022
Repository owner moved this from Refinement to Done in Oura Development Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant