algorand / indexer

searchable history and current state

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid JSON written when using conduit file_writer

barnjamin opened this issue · comments

Subject of the issue

Using the conduit file_writer, JSON is produced with the integer value 0 as a key. This causes some programs to complain or fail altogether.

Conduit config:

hide-banner: true

log-level: "DEBUG"
log-file: "/tmp/conduit.log"

importer:
    name: algod
    config:
        netaddr: "http://localhost:4001"
        token: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

processors:
  - name: block_evaluator
    config:
        algod-addr: "http://localhost:4001"
        algod-token: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

exporter:
    name: file_writer 
    config: 
        block-dir: "/tmp/blocks"
        drop-certificate: true

image

Fixing this should (hopefully) be a matter of switching to EncodeStrict, which is added here: https://github.com/algorand/go-algorand-sdk/pull/467