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

fix: multiple typos of different importance #9

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"go.gopath": "/go"
},

// Add the IDs of extensions you want installed when the container is created.
// Add the IDs of extensions you want to be installed when the container is created.
"extensions": [
"golang.Go",
"NomicFoundation.hardhat-solidity"
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
Something could be better?
Could something be better?
If your request is about a net new feature please use the Feature Request template.
Enhancements are tagged `enhancement`.
- type: textarea
Expand All @@ -26,7 +26,7 @@ body:
- type: textarea
attributes:
label: Solution proposal
description: Any idea on the how?
description: Any idea how?
validations:
required: false
- type: textarea
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/test-coverage/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ set -euo pipefail
#
# It's meant to be used manually or as a pre-commit hook.
#
# Place it some where in your code tree and execute it.
# Place it somewhere in your code tree and execute it.
# If your tests pass, next to the script you'll find
# the coverage.html report and coverage.svg badge.
#
Expand All @@ -54,7 +54,7 @@ SCRIPT_DIR="$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")"
OUT_DIR="${1-$SCRIPT_DIR}"

# OUT_FILE="$(mktemp)"
# # Get coverage for all packages in the current directory; store next to script.
# # Get coverage for all packages in the current directory; store them next to the script.
# go test -short ./... -coverprofile "$OUT_FILE"

OUT_FILE="coverage.out"
Expand Down Expand Up @@ -87,11 +87,11 @@ else
COLOR=red
fi

# Download the badge; store next to script.
# Download the badge; store it next to the script.
curl -s "https://img.shields.io/badge/coverage-$COVERAGE%25-$COLOR" > "$OUT_DIR/coverage.svg"

if [[ "${INPUT_CHART-false}" == "true" ]]; then
# Download the chart; store next to script.
# Download the chart; store it next to the script.
curl -s -H "Content-Type: text/plain" --data-binary "@$OUT_DIR/coverage.log" \
https://go-coverage-report.nunocruces.workers.dev/chart/ > \
"$OUT_DIR/coverage-chart.svg"
Expand Down
6 changes: 3 additions & 3 deletions api/clients/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ type EigenDAClientConfig struct {
// The amount of time to wait between status queries of a newly dispersed blob
StatusQueryRetryInterval time.Duration

// The total amount of time that the client will waiting for a response from the EigenDA disperser
// The total amount of time that the client will be waiting for a response from the EigenDA disperser
ResponseTimeout time.Duration

// The quorum IDs to write blobs to using this client. Should not include default quorums 0 or 1.
CustomQuorumIDs []uint

// Signer private key in hex encoded format. This key should not be associated with an Ethereum address holding any funds.
// Signer private key in hex-encoded format. This key should not be associated with an Ethereum address holding any funds.
SignerPrivateKeyHex string

// Whether to disable TLS for an insecure connection when connecting to a local EigenDA disperser instance.
DisableTLS bool

// The blob encoding version to use when writing blobs from the high level interface.
// The blob encoding version to use when writing blobs from the high-level interface.
PutBlobEncodingVersion codecs.BlobEncodingVersion

// Point verification mode does an IFFT on data before it is written, and does an FFT on data after it is read.
Expand Down
2 changes: 1 addition & 1 deletion api/clients/eigenda_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (m EigenDAClient) GetBlob(ctx context.Context, batchHeaderHash []byte, blob
}

// PutBlob encodes and writes a blob to EigenDA, waiting for it to be finalized
// before returning. This function is resiliant to transient failures and
// before returning. This function is resilient to transient failures and
// timeouts.
func (m EigenDAClient) PutBlob(ctx context.Context, data []byte) (*grpcdisperser.BlobInfo, error) {
resultChan, errorChan := m.PutBlobAsync(ctx, data)
Expand Down
2 changes: 1 addition & 1 deletion api/clients/eigenda_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func TestPutBlobTotalTimeout(t *testing.T) {
}
blobInfo, err := eigendaClient.PutBlob(context.Background(), []byte("hello"))

// should timeout even though it would have finalized eventually
// should timeout even though it would have been finalized eventually
require.Error(t, err)
require.Nil(t, blobInfo)
}
2 changes: 1 addition & 1 deletion api/clients/retrieval_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var (
}
batchHeaderHash [32]byte
batchRoot [32]byte
gettysburgAddressBytes = []byte("Fourscore and seven years ago our fathers brought forth, on this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived, and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting-place for those who here gave their lives, that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate, we cannot consecrate—we cannot hallow—this ground. The brave men, living and dead, who struggled here, have consecrated it far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us—that from these honored dead we take increased devotion to that cause for which they here gave the last full measure of devotion—that we here highly resolve that these dead shall not have died in vain—that this nation, under God, shall have a new birth of freedom, and that government of the people, by the people, for the people, shall not perish from the earth.")
gettysburgAddressBytes = []byte("Fourscore and seven years ago our fathers brought forth, on this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived, and so dedicated, can long endure. We are met on a great battlefield of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives, so that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate, we cannot consecrate—we cannot hallow—this ground. The brave men, living and dead, who struggled here, have consecrated it far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us—that from these honored dead we take increased devotion to that cause for which they here gave the last full measure of devotion—that we here highly resolve that these dead shall not have died in vain—that this nation, under God, shall have a new birth of freedom, and that government of the people, by the people, for the people, shall not perish from the earth.")
)

func setup(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions api/docs/disperser.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ AuthenticationData contains the signature of the BlobAuthHeader.
| ----- | ---- | ----- | ----------- |
| batch_root | [bytes](#bytes) | | The root of the merkle tree with the hashes of blob headers as leaves. |
| quorum_numbers | [bytes](#bytes) | | All quorums associated with blobs in this batch. Sorted in ascending order. Ex. [0, 2, 1] => 0x000102 |
| quorum_signed_percentages | [bytes](#bytes) | | The percentage of stake that has signed for this batch. The quorum_signed_percentages[i] is percentage for the quorum_numbers[i]. |
| quorum_signed_percentages | [bytes](#bytes) | | The percentage of stake that has been signed for this batch. The quorum_signed_percentages[i] is a percentage for the quorum_numbers[i]. |
| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch was created. The Disperser will encode and disperse the blobs based on the onchain info (e.g. operator stakes) at this block number. |


Expand Down Expand Up @@ -132,7 +132,7 @@ will verify and sign. Having the client verify the KZG commitment instead of cal
the need for the client to have the KZG structured reference string (SRS), which can be large.
The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes
than the one the client sent.
- In the meantime, the BlobAuthHeader contains a simple challenge parameter is used to prevent
- In the meantime, the BlobAuthHeader contains a simple challenge parameter that is used to prevent
replay attacks in the event that a signature is leaked.


Expand Down Expand Up @@ -270,7 +270,7 @@ BlobStatusRequest is used to query the status of a blob.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| data | [bytes](#bytes) | | The data to be dispersed. The size of data must be <= 2MiB. Every 32 bytes of data chunk is interpreted as an integer in big endian format where the lower address has more significant bits. The integer must stay in the valid range to be interpreted as a field element on the bn254 curve. The valid range is 0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 containing slightly less than 254 bits and more than 253 bits. If any one of the 32 bytes chunk is outside the range, the whole request is deemed as invalid, and rejected. |
| data | [bytes](#bytes) | | The data to be dispersed. The size of data must be <= 2MiB. Every 32 bytes of data chunk is interpreted as an integer in big endian format where the lower address has more significant bits. The integer must stay in the valid range to be interpreted as a field element on the bn254 curve. The valid range is 0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 containing slightly less than 254 bits and more than 253 bits. If any one of the 32-byte chunk is outside the range, the whole request is deemed invalid and rejected. |
| custom_quorum_numbers | [uint32](#uint32) | repeated | The quorums to which the blob will be sent, in addition to the required quorums which are configured on the EigenDA smart contract. If required quorums are included here, an error will be returned. The disperser will ensure that the encoded blobs for each quorum are all processed within the same batch. |
| account_id | [string](#string) | | The account ID of the client. This should be a hex-encoded string of the ECSDA public key corresponding to the key used by the client to sign the BlobAuthHeader. |

Expand Down Expand Up @@ -318,7 +318,7 @@ RetrieveBlobRequest contains parameters to retrieve the blob.
BlobStatus represents the status of a blob.
The status of a blob is updated as the blob is processed by the disperser.
The status of a blob can be queried by the client using the GetBlobStatus API.
Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state:
Intermediate states are states that the blob can be in while being processed, and it can be updated to a different state:
- PROCESSING
- DISPERSING
- CONFIRMED
Expand Down Expand Up @@ -351,7 +351,7 @@ Disperser defines the public APIs for dispersing blobs.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| DisperseBlob | [DisperseBlobRequest](#disperser-DisperseBlobRequest) | [DisperseBlobReply](#disperser-DisperseBlobReply) | This API accepts blob to disperse from clients. This executes the dispersal async, i.e. it returns once the request is accepted. The client could use GetBlobStatus() API to poll the the processing status of the blob. |
| DisperseBlobAuthenticated | [AuthenticatedRequest](#disperser-AuthenticatedRequest) stream | [AuthenticatedReply](#disperser-AuthenticatedReply) stream | DisperseBlobAuthenticated is similar to DisperseBlob, except that it requires the client to authenticate itself via the AuthenticationData message. The protoco is as follows: 1. The client sends a DisperseBlobAuthenticated request with the DisperseBlobRequest message 2. The Disperser sends back a BlobAuthHeader message containing information for the client to verify and sign. 3. The client verifies the BlobAuthHeader and sends back the signed BlobAuthHeader in an AuthenticationData message. 4. The Disperser verifies the signature and returns a DisperseBlobReply message. |
| DisperseBlobAuthenticated | [AuthenticatedRequest](#disperser-AuthenticatedRequest) stream | [AuthenticatedReply](#disperser-AuthenticatedReply) stream | DisperseBlobAuthenticated is similar to DisperseBlob, except that it requires the client to authenticate itself via the AuthenticationData message. The protocol is as follows: 1. The client sends a DisperseBlobAuthenticated request with the DisperseBlobRequest message 2. The Disperser sends back a BlobAuthHeader message containing information for the client to verify and sign. 3. The client verifies the BlobAuthHeader and sends back the signed BlobAuthHeader in an AuthenticationData message. 4. The Disperser verifies the signature and returns a DisperseBlobReply message. |
| GetBlobStatus | [BlobStatusRequest](#disperser-BlobStatusRequest) | [BlobStatusReply](#disperser-BlobStatusReply) | This API is meant to be polled for the blob status. |
| RetrieveBlob | [RetrieveBlobRequest](#disperser-RetrieveBlobRequest) | [RetrieveBlobReply](#disperser-RetrieveBlobReply) | This retrieves the requested blob from the Disperser's backend. This is a more efficient way to retrieve blobs than directly retrieving from the DA Nodes (see detail about this approach in api/proto/retriever/retriever.proto). The blob should have been initially dispersed via this Disperser service for this API to work. |

Expand Down