Files
Julien Marchand a001342170 chore: Initial commit
Co-authored-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Co-authored-by: Alexandre Belling <alexandrebelling8@gmail.com>
Co-authored-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com>
Co-authored-by: Bradley Bown <bradbown@googlemail.com>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: Nikolai Golub <nikolai.golub@consensys.net>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com>
Co-authored-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Co-authored-by: Azam Soleimanian <49027816+Soleimani193@users.noreply.github.com>
Co-authored-by: Andrei A <andrei.alexandru@consensys.net>
Co-authored-by: Arijit Dutta <37040536+arijitdutta67@users.noreply.github.com>
Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com>
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>
Co-authored-by: gusiri <dreamerty@postech.ac.kr>
Co-authored-by: FlorianHuc <florian.huc@gmail.com>
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Julink <julien.fontanel@consensys.net>
Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com>
Co-authored-by: Jakub Trąd <jakubtrad@gmail.com>
Co-authored-by: Alessandro Sforzin <alessandro.sforzin@consensys.net>
Co-authored-by: Olivier Bégassat <olivier.begassat.cours@gmail.com>
Co-authored-by: Steve Huang <97596526+stevehuangc7s@users.noreply.github.com>
Co-authored-by: bkolad <blazejkolad@gmail.com>
Co-authored-by: fadyabuhatoum1 <139905934+fadyabuhatoum1@users.noreply.github.com>
Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com>
Co-authored-by: Eduardo Andrade <eduardofandrade@gmail.com>
Co-authored-by: Ivo Kubjas <tsimmm@gmail.com>
Co-authored-by: Ludcour <ludovic.courcelas@consensys.net>
Co-authored-by: m4sterbunny <harrie.bickle@consensys.net>
Co-authored-by: Alex Panayi <145478258+alexandrospanayi@users.noreply.github.com>
Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net>
Co-authored-by: ThomasPiellard <thomas.piellard@gmail.com>
2024-07-31 18:17:20 +02:00

76 lines
2.9 KiB
Go

package blobsubmission
// Output of the compression prover
type Request struct {
// If true, eip4844. If false or not defined, legacy calldata
Eip4844Enabled bool `json:"eip4844Enabled"`
// The compressed data in base64 string
CompressedData string `json:"compressedData"`
// Parent data hash: the hash of the compressed data that were last
// submitted and following which we are submitted CompressedData.
DataParentHash string `json:"dataParentHash"`
// Conflation order
ConflationOrder ConflationOrder `json:"conflationOrder"`
// The parent zkRootHash for the sucession of blocks. In hexstring.
ParentStateRootHash string `json:"parentStateRootHash"`
// The new state root hash
FinalStateRootHash string `json:"finalStateRootHash"`
// The previous shnarf
PrevShnarf string `json:"prevShnarf"`
}
type Response struct {
// If true, eip4844. If false or not defined, legacy calldata
Eip4844Enabled bool `json:"eip4844Enabled"`
// BlobHash (VersionedHash): Hash of the compressed data
DataHash string `json:"dataHash"`
// Blob: compressed data in base64 string
CompressedData string `json:"compressedData"` // kzg4844.Blob [131072]byte
// The KZG commitment of the blob-data
Commitment string `json:"commitment"` // kzg4844.Commitment [48]byte
// The KZG proof for the blob data consistency check
KzgProofContract string `json:"kzgProofContract"` // kzg4844.Proof [48]byte
// The KZG proof for the blob sidecar in the blob tx
KzgProofSidecar string `json:"kzgProofSidecar"` // kzg4844.Proof [48]byte
// The expected value of X and Y from the prover's perspective. In hexstring
// as a field element on the BLS12 field.
ExpectedX string `json:"expectedX"` //ExpectedX kzg4844.Point [32]byte
ExpectedY string `json:"expectedY"` //ExpectedY kzg4844.Claim [32]byte
// The Snark friendly hash of the inputs
SnarkHash string `json:"snarkHash"`
// Conflation order
ConflationOrder ConflationOrder `json:"conflationOrder"`
// (parentZkRootHash) The parent zkRootHash for the sucession of blocks. In hexstring.
ParentStateRootHash string `json:"parentStateRootHash"`
// (newStateRootHash) The last root hash after executing all the blocks in the blob.
FinalStateRootHash string `json:"finalStateRootHash"`
// Parent data hash. Namely, the hash of the blob of compressed data that
// were last submitted.
DataParentHash string `json:"parentDataHash"`
// The expected value of the shnarf (or super-hash) that we expect the
// contract to recover. In hexstring.
ExpectedShnarf string `json:"expectedShnarf"`
// The shnarf upon which we are towering the current blob.
PrevShnarf string `json:"prevShnarf"`
}
type ConflationOrder struct {
StartingBlockNumber int `json:"startingBlockNumber"`
UpperBoundaries []int `json:"upperBoundaries"`
}
func (order *ConflationOrder) Range() (start, end int) {
return order.StartingBlockNumber, order.UpperBoundaries[len(order.UpperBoundaries)-1]
}