Documentation
¶
Index ¶
- Constants
- func BasicDATest(t *testing.T, da da.DA)
- func CheckErrors(t *testing.T, da da.DA)
- func ConcurrentReadWriteTest(t *testing.T, da da.DA)
- func GetIDsTest(t *testing.T, da da.DA)
- func RunDATestSuite(t *testing.T, d da.DA)
- type Blob
- type DummyDA
- func (d *DummyDA) Commit(blobs []da.Blob) ([]da.Commitment, error)
- func (d *DummyDA) Get(ids []da.ID) ([]da.Blob, error)
- func (d *DummyDA) GetIDs(height uint64) ([]da.ID, error)
- func (d *DummyDA) MaxBlobSize() (uint64, error)
- func (d *DummyDA) Submit(blobs []da.Blob, gasPrice float64) ([]da.ID, []da.Proof, error)
- func (d *DummyDA) Validate(ids []da.ID, proofs []da.Proof) ([]bool, error)
- type ID
Constants ¶
View Source
const DefaultMaxBlobSize = 64 * 64 * 482
DefaultMaxBlobSize is the default max blob size
Variables ¶
This section is empty.
Functions ¶
func BasicDATest ¶
BasicDATest tests round trip of messages to DA and back.
func CheckErrors ¶
CheckErrors ensures that errors are handled properly by DA.
func ConcurrentReadWriteTest ¶
ConcurrentReadWriteTest tests the use of mutex lock in DummyDA by calling separate methods that use `d.data` and making sure there's no race conditions
Types ¶
type DummyDA ¶
type DummyDA struct {
// contains filtered or unexported fields
}
DummyDA is a simple implementation of in-memory DA. Not production ready! Intended only for testing!
Data is stored in a map, where key is a serialized sequence number. This key is returned as ID. Commitments are simply hashes, and proofs are ED25519 signatures.
func NewDummyDA ¶
NewDummyDA create new instance of DummyDA
func (*DummyDA) MaxBlobSize ¶
MaxBlobSize returns the max blob size in bytes.
Click to show internal directories.
Click to hide internal directories.