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

Invalid CBOR structure overflows target type #660

Open
pedromtcosta opened this issue Jul 31, 2023 · 8 comments
Open

Invalid CBOR structure overflows target type #660

pedromtcosta opened this issue Jul 31, 2023 · 8 comments

Comments

@pedromtcosta
Copy link

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?

@crypto-titan
Copy link

+1 we need help with this!

@scarmuega
Copy link
Member

@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.

@NanuIjaz
Copy link

@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)

@scarmuega
Copy link
Member

@NanuIjaz can you please share your config?

@scarmuega scarmuega reopened this Aug 23, 2023
@NanuIjaz
Copy link

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
Copy link

@scarmuega

@scarmuega
Copy link
Member

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

@NanuIjaz
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants