Skip to content

Commit 5a6be0e

Browse files
authored
feat: Conway genesis config (#723)
Fixes #718
1 parent 1af0a2f commit 5a6be0e

File tree

2 files changed

+459
-0
lines changed

2 files changed

+459
-0
lines changed

ledger/conway/genesis.go

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2024 Blink Labs Software
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package conway
16+
17+
type ConwayGenesis struct {
18+
PoolVotingThresholds ConwayGenesisPoolVotingThresholds
19+
DRepVotingThresholds ConwayGenesisDRepVotingThresholds
20+
MinCommitteeSize uint `json:"committeeMinSize"`
21+
CommitteeTermLimit uint64 `json:"committeeMaxTermLength"`
22+
GovActionValidityPeriod uint64 `json:"govActionLifetime"`
23+
GovActionDeposit uint64
24+
DRepDeposit uint64 `json:"dRepDeposit"`
25+
DRepInactivityPeriod uint64 `json:"dRepActivity"`
26+
MinFeeRefScriptCostPerByte float32
27+
PlutusV3CostModel []int `json:"plutusV3CostModel"`
28+
Constitution ConwayGenesisConstitution
29+
Committee ConwayGenesisCommittee
30+
}
31+
32+
type ConwayGenesisPoolVotingThresholds struct {
33+
CommitteeNormal float32
34+
CommitteeNoConfidence float32
35+
HardForkInitiation float32
36+
MotionNoConfidence float32
37+
PpSecurityGroup float32
38+
}
39+
40+
type ConwayGenesisDRepVotingThresholds struct {
41+
MotionNoConfidence float32
42+
CommitteeNormal float32
43+
CommitteeNoConfidence float32
44+
UpdateToConstitution float32
45+
HardForkInitiation float32
46+
PpNetworkGroup float32
47+
PpEconomicGroup float32
48+
PpTechnicalGroup float32
49+
PpGovGroup float32
50+
TreasuryWithdrawal float32
51+
}
52+
53+
type ConwayGenesisConstitution struct {
54+
Anchor ConwayGenesisConstitutionAnchor
55+
Script string
56+
}
57+
58+
type ConwayGenesisConstitutionAnchor struct {
59+
DataHash string
60+
Url string
61+
}
62+
63+
type ConwayGenesisCommittee struct {
64+
Members map[string]int
65+
Threshold map[string]int
66+
}

0 commit comments

Comments
 (0)