Layr-Labs / eigenda

Secure, high-throughput, and decentralized Data Availability
https://www.eigenlayer.xyz/
Other
220 stars 170 forks source link

[Documentation]: Improve gRPC Command Examples for Clarity #762

Open log2cn opened 2 months ago

log2cn commented 2 months ago

Documentation.

I would like to propose some improvements to the documentation found in the eigenda/inabox README regarding the gRPC commands for sending and retrieving blob status.

Suggested Changes:

  1. Update the command for dispersing a blob: Current command:

    grpcurl -plaintext -d '{"data": "'$(tools/kzgpad/bin/kzgpad -e hello)'"}' \
    localhost:32003 disperser.Disperser/DisperseBlob

    Suggested command:

    REQUEST_ID=$(grpcurl -plaintext -d '{"data": "'$(../tools/kzgpad/bin/kzgpad -e hello)'"}' \
    localhost:32003 disperser.Disperser/DisperseBlob | jq -r .requestId)

    Reason: This change captures the REQUEST_ID directly in the command, making it easier for users to reference this ID in subsequent commands without needing to manually extract it.

  2. Update the command for checking blob status: Current command:

    grpcurl -plaintext -d '{"request_id": "$REQUEST_ID"}' \
    localhost:32003 disperser.Disperser/GetBlobStatus

    Suggested command:

    grpcurl -plaintext -d "{\"request_id\": \"$REQUEST_ID\"}" \
    localhost:32003 disperser.Disperser/GetBlobStatus

    Reason: Using double quotes for the JSON string allows for proper variable interpolation, ensuring that the value of REQUEST_ID is correctly passed in the request.

Additional information.

Thank you for considering these changes!

samlaf commented 2 weeks ago

@l0g2 very much agree with you here, I had the same hiccups when first playing with these. May I suggest you put a quick PR up for this, I'll gladly accept it.