-
Notifications
You must be signed in to change notification settings - Fork 8
/
slot.go
42 lines (35 loc) · 2.25 KB
/
slot.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package types
import "github.com/samber/mo"
// hhttps://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/slots.rs
// ChallengeBlockInfo is a type of challenge_block_info
type ChallengeBlockInfo struct {
ProofOfSpace ProofOfSpace `json:"proof_of_space" streamable:""`
ChallengeChainSPVDF mo.Option[VDFInfo] `json:"challenge_chain_sp_vdf" streamable:""`
ChallengeChainSPSignature G2Element `json:"challenge_chain_sp_signature" streamable:""`
ChallengeChainIPVDF VDFInfo `json:"challenge_chain_ip_vdf" streamable:""`
}
// ChallengeChainSubSlot is a type of challenge_chain_sub_slot
type ChallengeChainSubSlot struct {
ChallengeChainEndOfSlotVDF VDFInfo `json:"challenge_chain_end_of_slot_vdf" streamable:""`
InfusedChallengeChainSubSlotHash mo.Option[Bytes32] `json:"infused_challenge_chain_sub_slot_hash" streamable:""`
SubepochSummaryHash mo.Option[Bytes32] `json:"subepoch_summary_hash" streamable:""`
NewSubSlotIters mo.Option[uint64] `json:"new_sub_slot_iters" streamable:""`
NewDifficulty mo.Option[uint64] `json:"new_difficulty" streamable:""`
}
// InfusedChallengeChainSubSlot is a type of infused_challenge_chain_sub_slot
type InfusedChallengeChainSubSlot struct {
InfusedChallengeChainEndOfSlotVDF VDFInfo `json:"infused_challenge_chain_end_of_slot_vdf" streamable:""`
}
// RewardChainSubSlot is a type of reward_chain_sub_slot
type RewardChainSubSlot struct {
EndOfSlotVDF VDFInfo `json:"end_of_slot_vdf" streamable:""`
ChallengeChainSubSlotHash Bytes32 `json:"challenge_chain_sub_slot_hash" streamable:""`
InfusedChallengeChainSubSlotHash mo.Option[Bytes32] `json:"infused_challenge_chain_sub_slot_hash" streamable:""`
Deficit uint8 `json:"deficit" streamable:""`
}
// SubSlotProofs is a type of sub_slot_proofs
type SubSlotProofs struct {
ChallengeChainSlotProof VDFProof `json:"challenge_chain_slot_proof" streamable:""`
InfusedChallengeChainSlotProof mo.Option[VDFProof] `json:"infused_challenge_chain_slot_proof" streamable:""`
RewardChainSlotProof VDFProof `json:"reward_chain_slot_proof" streamable:""`
}