Open fabiooshiro opened 1 month ago
I got an error running the js template:
=> => writing image sha256:7baaec9b4e3bb2201249805325c286c9031a8256188294a0193fac671a3f7caa 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/rrw2tm1uvrv3cy3mkz3esfz1r
2 warnings found (use docker --debug to expand):
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 9)
- FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/riscv64" (line 20)
What's next:
View a summary of image vulnerabilities and recommendations → docker scout quickview
Error: Unsupported sdk version: 0.6.0 (used) < 0.9.0 (minimum).
Update your application Dockerfile using one of the templates at https://github.com/cartesi/application-templates/tree/sdk-0.9
Probably the error on javascript example is somehow related to:
lambada-coprocessor-operator1 | {"level":"error","ts":1723144340.8908122,"caller":"operator/operator.go:336","msg":"failed to request echo from lambada service -invalid cid: cid too short, faking result - bafybeif5liyov4oltxvc34qh3uyyxy5znisbmarsorxrp4nr3o7ywjuo5u, \ufffd\ufffd\ufffdD\ufffd\\\ufffd\ufffd{\ufffd\ufffd","stacktrace":"github.com/zippiehq/cartesi-lambada-coprocessor/operator.(*Operator).processTaskBatch\n\t/usr/src/app/operator/operator.go:336\ngithub.com/zippiehq/cartesi-lambada-coprocessor/operator.(*Operator).Start\n\t/usr/src/app/operator/operator.go:307\nmain.operatorMain\n\t/usr/src/app/operator/cmd/main.go:80\ngithub.com/urfave/cli.HandleAction\n\t/go/pkg/mod/github.com/urfave/cli@v1.22.14/app.go:524\ngithub.com/urfave/cli.(*App).Run\n\t/go/pkg/mod/github.com/urfave/cli@v1.22.14/app.go:286\nmain.main\n\t/usr/src/app/operator/cmd/main.go:48\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267"}
Carsten updated the JavaScript example, and now it's working like a charm.
javascript git:(lambada) PROGRAM_CID=`cat .cartesi/image/sample.car.cid` PROGRAM_INPUT="hello world" node ~/coprocessor-demo/coprocessor/demo/demo.mjs
taskInputHash: 0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad
Next Batch Index: 0
TaskBatchRegistered: 0 19 0x9c04c6f09fda572a5b4d93c15dc18827ad129a3fedf36702db30c5dc2e5b98e7
[
'0x0170122049fbff13510d5f8f8daae8b5bda6db83d9366131b3d4d4209f1dda5133642f96',
'0xb94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9',
resultCID: '0x0170122049fbff13510d5f8f8daae8b5bda6db83d9366131b3d4d4209f1dda5133642f96',
outputHash: '0xb94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9'
]
Task Responded: {
batchIndex: 0,
outputHash: '0xb94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9',
resultCID: '0x0170122049fbff13510d5f8f8daae8b5bda6db83d9366131b3d4d4209f1dda5133642f96'
}
Ethereum Block Number: 19
Ethereum Block Hash: 0x9c04c6f09fda572a5b4d93c15dc18827ad129a3fedf36702db30c5dc2e5b98e7
{
metadata: {
'ja62BU8gb23hXMVivcJog65z9/7tTcS2YxLgtQy5TTo=': 'pFjb5KvjYDW0RbBGsMwOAnhz1G7fEiD675bd0AOVDa8=',
'8WDSbTPNI+IOj4tkz9WNQt7Ya4l1EIwIIIeGFEMoXj4=': 'AAAAAAAAABM=',
'nA22OtVjDhZqtMnr7KwhbIiOXh14fhCBkCm8p6bxPyA=': 'nATG8J/aVypbTZPBXcGIJ60Smj/t82cC2zDF3C5bmOc='
},
payload: 'aGVsbG8gd29ybGQ='
}
{ cid: 'bafybeicj7p7rguinl6hy3kxiww62nw4d3e3gcmnt2tkcbhy53jitgzbpsy' }
Local compute job matches output of co-processor, result CID bafybeicj7p7rguinl6hy3kxiww62nw4d3e3gcmnt2tkcbhy53jitgzbpsy output file hash: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
output file contents: hello world
https://github.com/stskeeps/cartesi-application-templates/tree/lambada
Record a video using OBS
https://github.com/Calindra/cartesi-concepts/blob/main/lambada-co-processors.md
I got this error:
After updating the cartesi cli to:
it worked
My result: