redistribution

package
v2.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: BSD-3-Clause Imports: 13 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	BoostTipPercent = 50
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkInclusionProof

type ChunkInclusionProof struct {
	ProofSegments  []common.Hash `json:"proofSegments"`
	ProveSegment   common.Hash   `json:"proveSegment"`
	ProofSegments2 []common.Hash `json:"proofSegments2"`
	ProveSegment2  common.Hash   `json:"proveSegment2"`
	ChunkSpan      uint64        `json:"chunkSpan"`
	ProofSegments3 []common.Hash `json:"proofSegments3"`
	PostageProof   PostageProof  `json:"postageProof"`
	SocProof       []SOCProof    `json:"socProof"`
}

ChunkInclusionProof structure must exactly match corresponding structure (of the same name) in Redistribution.sol smart contract. github.com/ethersphere/storage-incentives/blob/ph_f2/src/Redistribution.sol github.com/ethersphere/storage-incentives/blob/master/src/Redistribution.sol (when merged to master)

func NewChunkInclusionProof

func NewChunkInclusionProof(proofp1, proofp2, proofp3 bmt.Proof, sampleItem storer.SampleItem) (ChunkInclusionProof, error)

NewChunkInclusionProof transforms arguments to ChunkInclusionProof object

type ChunkInclusionProofs

type ChunkInclusionProofs struct {
	A ChunkInclusionProof `json:"proof1"`
	B ChunkInclusionProof `json:"proof2"`
	C ChunkInclusionProof `json:"proofLast"`
}

type Contract

type Contract interface {
	ReserveSalt(context.Context) ([]byte, error)
	IsPlaying(context.Context, uint8) (bool, error)
	IsWinner(context.Context) (bool, error)
	Claim(context.Context, ChunkInclusionProofs) (common.Hash, error)
	Commit(context.Context, []byte, uint64) (common.Hash, error)
	Reveal(context.Context, uint8, []byte, []byte) (common.Hash, error)
}

func New

func New(
	overlay swarm.Address,
	owner common.Address,
	logger log.Logger,
	txService transaction.Service,
	incentivesContractAddress common.Address,
	incentivesContractABI abi.ABI,
	gasLimit uint64,
) Contract

type PostageProof

type PostageProof struct {
	Signature []byte      `json:"signature"`
	PostageId common.Hash `json:"postageId"`
	Index     uint64      `json:"index"`
	TimeStamp uint64      `json:"timeStamp"`
}

SOCProof structure must exactly match corresponding structure (of the same name) in Redistribution.sol smart contract.

type SOCProof

type SOCProof struct {
	Signer     common.Address `json:"signer"`
	Signature  []byte         `json:"signature"`
	Identifier common.Hash    `json:"identifier"`
	ChunkAddr  common.Hash    `json:"chunkAddr"`
}

SOCProof structure must exactly match corresponding structure (of the same name) in Redistribution.sol smart contract.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL