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

docs: Fix example using the prove-block.sh #268

Closed
wants to merge 1 commit into from

Conversation

mavroudisv
Copy link

The example uses a `native' proof type which is not the same as the curl call above and does not return a proof or quote.

The curl example uses: "prove": true which is passed as a parameter when using "$proof" == "sgx".

curl:

 curl --location 'http://localhost:8080' \
--header 'Content-Type: application/json' \
--data '{
    "proof_type": "sgx",
    "block_number": 99999,
    "prover": "0x7b399987d24fc5951f3e94a4cb16e87414bf2229",
    "graffiti": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "sgx": {
        **"setup": false,
        "bootstrap": false,
        "prove": true**
    }
}'

prove-block.sh:

if [ "$proof" == "native" ]; then
	proofParam='
    "proof_type": "native"
  '

...

elif [ "$proof" == "sgx" ]; then
	proofParam='
    "proof_type": "sgx",
    "sgx" : {
        "instance_id": 123,
        **"setup": false,
        "bootstrap": false,
        "prove": true,**
        "input_path": null
    }
    '

The example uses a `native' proof type which is not the same as the curl call above and does not return a proof or quote.
@mavroudisv mavroudisv changed the title Fix example using the prove-block.sh docs: Fix example using the prove-block.sh May 27, 2024
@@ -437,7 +437,7 @@ Once your Raiko instance is running, you can verify if it was started properly a
}'
```

Or use `./script/prove-block` like `./script/prove-block.sh taiko_a7 native 99999` to check readiness.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running the native to "check for readiness" means to make sure the host & block builder without any proof, so it should not be sgx

Copy link
Author

@mavroudisv mavroudisv Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I wrong to assume that in this case the response shouldn't include a proof?

This is the example response the docs provide.

The response should look like this:

{
    "data": {
        "output": null,
        "proof": "0x00000206c3694ecb5c....6e0e7a36546bf98caa7bb4ac2cd4f917c2102116167e42c54849f15044c032e1c",
        "quote": "03000200000000000a000f00939a72....0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a00"
    },
    "status": "ok"
}

If so, I can edit the PR to match the expected (no proof) output.

@RogerLamTd RogerLamTd closed this Nov 19, 2024
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

Successfully merging this pull request may close these issues.

3 participants