oura icon indicating copy to clipboard operation
oura copied to clipboard

Invalid CBOR structure overflows target type

Open pedromtcosta opened this issue 2 years ago • 8 comments

We recently started getting this error when running Oura on the preview network:

Invalid CBOR structure: 9223372036854775809 overflows target type at position 1065: when converting u64 to i64

We can simulate this by running the following command:

oura daemon --config preview.toml --cursor 23003774,7105cb0f1936464a3e2cc7dfea06b2a34b16c2bf866d6214d98eacf2e7834ca5

and this is our config:

[source]
type = "N2C"
address = ["Unix", "node.socket"]
magic = "preview"

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

[source.mapper]
include_block_end_events = true
include_transaction_details = true
include_transaction_end_events = false
include_block_cbor = true
include_byron_ebb = false

The weird thing is that if we change the source to the one below, then it works fine:

[source]
type = "N2N"
address = ["Tcp", "preview-node.world.dev.cardano.org:30002"]
magic = "preview"

Our initial guess was that maybe our local copy of the blockchain on our local node got corrupted somehow, so we tried resyncing from scratch, but the error remains.

Could this be a bug on Oura only when dealing with N2C connections?

pedromtcosta avatar Jul 31 '23 14:07 pedromtcosta

+1 we need help with this!

crypto-titan avatar Aug 22 '23 18:08 crypto-titan

@pedromtcosta @crypto-titan we've just released v1.8.2 which contains a fix for this issue:

https://github.com/txpipe/oura/releases/tag/v1.8.2

Thanks for reporting and apologies for the delay.

scarmuega avatar Aug 23 '23 07:08 scarmuega

@scarmuega

after using oura 1.8.2 error still persists. please check.

[2023-08-23T11:24:02Z ERROR oura::sources::n2c::run] N2C error: Invalid CBOR structure: 9223372036854775809 overflows target type at position 1065: when converting u64 to i64

/home/cardano/app/src/oura/index.ts:478 throw new Error(data.toString()); ^ Error: [2023-08-23T11:24:02Z ERROR oura::sources::n2c::run] N2C error: Invalid CBOR structure: 9223372036854775809 overflows target type at position 1065: when converting u64 to i64

at Socket.<anonymous> (/home/cardano/app/src/oura/index.ts:478:13)
at Socket.emit (node:events:526:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

NanuIjaz avatar Aug 23 '23 11:08 NanuIjaz

@NanuIjaz can you please share your config?

scarmuega avatar Aug 23 '23 11:08 scarmuega

this is what we have for preview

[source] type = "N2C" address = ["Unix", "/ipc/node.socket"] magic = "preview"

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

[source.mapper] include_block_end_events = true include_transaction_details = true include_transaction_end_events = false include_block_cbor = true include_byron_ebb = false

NanuIjaz avatar Aug 23 '23 14:08 NanuIjaz

@scarmuega

NanuIjaz avatar Aug 23 '23 14:08 NanuIjaz

@NanuIjaz you're right, please try again with v1.8.3: https://github.com/txpipe/oura/releases/tag/v1.8.3

scarmuega avatar Aug 24 '23 01:08 scarmuega

@scarmuega thank you. This fixed the issue. Appreciate your help.

NanuIjaz avatar Aug 24 '23 03:08 NanuIjaz