Skip to content
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 cmd/integration-test-server/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func checkMinedTsTooSmallError(logFile string) (int, error) {
}

func checkDiffNotMatchError(logFile string) (int, error) {
// Description: "Mining info retrieved" -> "Failed to submit mined result"; shard and block equal which difficulty is not the same
// Description: "Mining info retrieved" -> "Failed to submit mined result"; shard and block equal but difficulty is not the same
// Sample:
// lvl=info msg="Mining info retrieved" shard=1 block=6,906,682 difficulty=13,006,115 lastMineTime=1,729,375,716 proofsSubmitted=2
// lvl=eror msg="Failed to submit mined result" shard=1 block=6,906,682 difficulty=1,729,376,532 error="failed to estimate gas: execution reverted: ErrorData: 0x5b38d755: StorageContract_DifficultyNotMet()"
Expand Down
4 changes: 2 additions & 2 deletions ethstorage/data_shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func DecodeChunk(chunkSize uint64, bs []byte, encodeType uint64, encodeKey commo

func decodeChunk(chunkSize uint64, bs []byte, encodeType uint64, encodeKey common.Hash) []byte {
if len(bs) > int(chunkSize) {
panic("cannot encode chunk with size > CHUNK_SIZE")
panic("cannot decode chunk with size > CHUNK_SIZE")
}
if encodeType == ENCODE_KECCAK_256 {
output := make([]byte, len(bs))
Expand Down Expand Up @@ -380,7 +380,7 @@ func (ds *DataShard) WriteWith(kvIdx uint64, b []byte, commit common.Hash, encod
return ds.WriteMeta(kvIdx, commit[:])
}

// Write a value of the KV to the store. The value will be encoded with kvIdx and SP address.
// Write a value of the KV to the store. The value will be encoded with kvIdx and SP address.
func (ds *DataShard) Write(kvIdx uint64, b []byte, commit common.Hash) error {
return ds.WriteWith(kvIdx, b, commit, func(cdata []byte, chunkIdx uint64) []byte {
encodeKey := calcEncodeKey(commit, chunkIdx, ds.Miner())
Expand Down
2 changes: 1 addition & 1 deletion ethstorage/miner/l1_mining_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (m *l1MiningAPI) GetMiningInfo(ctx context.Context, contract common.Address
func (m *l1MiningAPI) GetDataHashes(ctx context.Context, contract common.Address, kvIdxes []uint64) ([]common.Hash, error) {
metas, err := m.GetKvMetas(kvIdxes, rpc.LatestBlockNumber.Int64())
if err != nil {
m.lg.Error("Failed to get versioned hashs", "error", err)
m.lg.Error("Failed to get versioned hashes", "error", err)
return nil, err
}
var hashes []common.Hash
Expand Down
2 changes: 1 addition & 1 deletion ethstorage/p2p/protocol/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Peer struct {
lg log.Logger // Contextual lg with the peer id injected
}

// NewPeer create a wrapper for a network connection and negotiated protocol version.
// NewPeer create a wrapper for a network connection and negotiated protocol version.
func NewPeer(version uint, chainId *big.Int, peerId peer.ID, newStream newStreamFn, direction network.Direction,
initRequestSize, minRequestSize uint64, shards map[common.Address][]uint64) *Peer {
ctx, cancel := context.WithCancel(context.Background())
Expand Down
2 changes: 1 addition & 1 deletion ethstorage/pora/ethash/mmap_help_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// does not actually occupy the full declared size on disk.
func ensureSize(f *os.File, size int64) error {
// On systems which do not support fallocate, we merely truncate it.
// More robust alternatives would be to
// More robust alternatives would be to
// - Use posix_fallocate, or
// - explicitly fill the file with zeroes.
return f.Truncate(size)
Expand Down