-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Chia-Network/farmer-harvester-types
Farmer & Harvester types
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package types | ||
|
||
// EventFarmerSubmittedPartial is the event data for `submitted_partial` from the farmer | ||
type EventFarmerSubmittedPartial struct { | ||
LauncherID string `json:"launcher_id"` | ||
PoolURL string `json:"pool_url"` | ||
CurrentDifficulty uint64 `json:"current_difficulty"` | ||
PointsAcknowledgedSinceStart uint64 `json:"points_acknowledged_since_start"` | ||
} | ||
|
||
// EventFarmerProof is the farmer event `proof` | ||
type EventFarmerProof struct { | ||
Proof DeclareProofOfSpace `json:"proof"` | ||
PassedFilter bool `json:"passed_filter"` | ||
} | ||
|
||
// DeclareProofOfSpace matches to the farmer protocol type | ||
type DeclareProofOfSpace struct { | ||
ChallengeHash string `json:"challenge_hash"` | ||
ChallengeChainSP string `json:"challenge_chain_sp"` | ||
SignagePointIndex uint8 `json:"signage_point_index"` | ||
RewardChainSP string `json:"reward_chain_sp"` | ||
ProofOfSpace ProofOfSpace `json:"proof_of_space"` | ||
ChallengeChainSPSignature G2Element `json:"challenge_chain_sp_signature"` | ||
RewardChainSPSignature G2Element `json:"reward_chain_sp_signature"` | ||
FarmerPuzzleHash string `json:"farmer_puzzle_hash"` | ||
PoolTarget *PoolTarget `json:"pool_target,omitempty"` | ||
PoolSignature *G2Element `json:"pool_signature,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package types | ||
|
||
// EventHarvesterFarmingInfo is the event data for `farming_info` from the harvester | ||
type EventHarvesterFarmingInfo struct { | ||
ChallengeHash string `json:"challenge_hash"` | ||
TotalPlots uint64 `json:"total_plots"` | ||
FoundProofs uint64 `json:"found_proofs"` | ||
EligiblePlots uint64 `json:"eligible_plots"` | ||
Time float64 `json:"time"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters