Open bernardoaraujor opened 4 years ago
the error 1156 and 1095 are reported by CClient means something wrong from the IRI.
you can use error_2_string
to show a readable text in your code.
https://github.com/bernardoaraujor/c-iota-workshop/blob/master/examples/e02_send_hello.c#L100
@thibault-martinez @tsvisabo
The error message is ERR: cIRI HTTP API currently does not support parsing such large requests.
from cIRI's http server.
What is the limitation of requests on cIRI?
This seems to be a limitation of libmicrohttpd
. A more complex architecture has to be set up to allow bigger payloads. I never like this library 😅
@thibault-martinez Are you able to do this before October 31.? We need a running cIRI in combination with CClient for the Yocto Summit. ^^
I'm not working on cIRI at all at the moment so I can't tell. I'll investigate to understand how long this task could be and I will see if it's doable any time soon.
@thibault-martinez Thanks. I will talk to Lewis about the result then. Would be nice to have a working solution for the Yocto summit. :)
Is there a way to reduce payload size from e02_send_hello.c
?
Sorry I don't know, I didn't write it. @Citrullin did ?
@thibault-martinez I don't think you can reduce the size. Just a simple zero value tx with some text. But @oopsmonk is probably better in answering this.
it's just one transaction in the bundle if cIRI cannot handle it that means it cannot process any transaction requests.
@oopsmonk what's the effort estimation to enable support for transaction requests?
@bernardoaraujor the problem is caused by http implementation in cIRI, not related to libmicrohttpd. the error message does not describe the issue correctly. I think @thibault-martinez or @tsvisabo can help to solve it.
Describe the bug The first example of c-iota-workshop (hello_world), which just prints out info about the server, runs fine with cIRI:
However the second example (send_hello) doesn't work.
Here's the source code. I forked from iota-community to add CLI parameters instead of hardcoded hostname and port: https://github.com/bernardoaraujor/c-iota-workshop/blob/master/examples/e02_send_hello.c
Here's the behaviour when I execute it:
And here's the error message on cIRI logs (from error 1156... error 1095 didn't show anything):
To Reproduce Steps to reproduce the behavior:
$ bazel build ...
$ ./bazel-bin/examples/send_hello -h 51.158.64.80 -p 14265
Expected behavior When I point to an IRI full node, I get this response:
Which is confirmed at: https://thetangle.org/address/TOKLOARHKXQCVPPVVIPIJGLUTLTKFHYGMBBLOXJFYGSARLOTYFFSDZNYCOBOCNPGRMJWZCQBNOROUCE9G
Additional context Philipp Blum (@citrullin) and I will make a presentation of IOTA on the upcoming Yocto Project Summit 2019. We want to do a live demo based on cIRI and the examples from c-iota-workshop. The presentation is scheduled for November 1st. It would be great to have all 6 examples working with cIRI until then.