@blinklabs/dingo 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dingo/blob/000001.sst +0 -0
- package/.dingo/blob/000001.vlog +0 -0
- package/.dingo/blob/DISCARD +0 -0
- package/.dingo/blob/KEYREGISTRY +2 -0
- package/.dingo/blob/MANIFEST +0 -0
- package/.dingo/metadata.sqlite +0 -0
- package/.github/workflows/golangci-lint.yml +1 -1
- package/.github/workflows/publish.yml +1 -7
- package/README.md +2 -1
- package/{bin/dingo → dingo} +0 -0
- package/dingo.yaml.example +53 -0
- package/package.json +2 -2
- package/Dockerfile +0 -25
- package/Makefile +0 -53
- package/blockfetch.go +0 -144
- package/chain/chain.go +0 -504
- package/chain/chain_test.go +0 -468
- package/chain/errors.go +0 -80
- package/chain/event.go +0 -33
- package/chain/iter.go +0 -64
- package/chainsync/chainsync.go +0 -97
- package/chainsync.go +0 -223
- package/cmd/dingo/load.go +0 -52
- package/cmd/dingo/main.go +0 -118
- package/cmd/dingo/serve.go +0 -49
- package/config/cardano/node.go +0 -192
- package/config/cardano/node_test.go +0 -85
- package/config/cardano/preview/README.md +0 -4
- package/config/cardano/preview/alonzo-genesis.json +0 -196
- package/config/cardano/preview/byron-genesis.json +0 -117
- package/config/cardano/preview/config.json +0 -114
- package/config/cardano/preview/conway-genesis.json +0 -297
- package/config/cardano/preview/shelley-genesis.json +0 -68
- package/config.go +0 -245
- package/connmanager/connection_manager.go +0 -105
- package/connmanager/connection_manager_test.go +0 -185
- package/connmanager/event.go +0 -37
- package/connmanager/listener.go +0 -140
- package/connmanager/outbound.go +0 -93
- package/connmanager/socket.go +0 -55
- package/connmanager/unix.go +0 -78
- package/custom-p2p-topology.json +0 -24
- package/custom-p2p-topology.json.backup +0 -24
- package/custom-p2p-topology.json.mainnet +0 -37
- package/database/account.go +0 -180
- package/database/block.go +0 -362
- package/database/certs.go +0 -53
- package/database/commit_timestamp.go +0 -77
- package/database/database.go +0 -118
- package/database/database_test.go +0 -62
- package/database/drep.go +0 -47
- package/database/epoch.go +0 -121
- package/database/immutable/chunk.go +0 -182
- package/database/immutable/immutable.go +0 -350
- package/database/immutable/immutable_test.go +0 -59
- package/database/immutable/primary.go +0 -106
- package/database/immutable/secondary.go +0 -103
- package/database/immutable/testdata/08893.chunk +0 -0
- package/database/immutable/testdata/08893.primary +0 -0
- package/database/immutable/testdata/08893.secondary +0 -0
- package/database/immutable/testdata/08894.chunk +0 -0
- package/database/immutable/testdata/08894.primary +0 -0
- package/database/immutable/testdata/08894.secondary +0 -0
- package/database/immutable/testdata/README.md +0 -4
- package/database/plugin/blob/badger/commit_timestamp.go +0 -50
- package/database/plugin/blob/badger/database.go +0 -152
- package/database/plugin/blob/badger/logger.go +0 -63
- package/database/plugin/blob/badger/metrics.go +0 -98
- package/database/plugin/blob/blob.go +0 -19
- package/database/plugin/blob/store.go +0 -40
- package/database/plugin/log.go +0 -27
- package/database/plugin/metadata/metadata.go +0 -19
- package/database/plugin/metadata/sqlite/account.go +0 -313
- package/database/plugin/metadata/sqlite/certs.go +0 -58
- package/database/plugin/metadata/sqlite/commit_timestamp.go +0 -68
- package/database/plugin/metadata/sqlite/database.go +0 -218
- package/database/plugin/metadata/sqlite/drep.go +0 -140
- package/database/plugin/metadata/sqlite/epoch.go +0 -120
- package/database/plugin/metadata/sqlite/models/account.go +0 -118
- package/database/plugin/metadata/sqlite/models/auth_committee_hot.go +0 -26
- package/database/plugin/metadata/sqlite/models/drep.go +0 -52
- package/database/plugin/metadata/sqlite/models/epoch.go +0 -31
- package/database/plugin/metadata/sqlite/models/models.go +0 -46
- package/database/plugin/metadata/sqlite/models/pool.go +0 -97
- package/database/plugin/metadata/sqlite/models/pparam_update.go +0 -27
- package/database/plugin/metadata/sqlite/models/pparams.go +0 -27
- package/database/plugin/metadata/sqlite/models/resign_committee_cold.go +0 -27
- package/database/plugin/metadata/sqlite/models/stake_vote_delegation.go +0 -27
- package/database/plugin/metadata/sqlite/models/tip.go +0 -26
- package/database/plugin/metadata/sqlite/models/update_drep.go +0 -27
- package/database/plugin/metadata/sqlite/models/utxo.go +0 -30
- package/database/plugin/metadata/sqlite/models/vote_delegation.go +0 -26
- package/database/plugin/metadata/sqlite/models/vote_registration_delegation.go +0 -15
- package/database/plugin/metadata/sqlite/pool.go +0 -240
- package/database/plugin/metadata/sqlite/pparams.go +0 -110
- package/database/plugin/metadata/sqlite/tip.go +0 -83
- package/database/plugin/metadata/sqlite/utxo.go +0 -292
- package/database/plugin/metadata/store.go +0 -198
- package/database/plugin/option.go +0 -190
- package/database/plugin/plugin.go +0 -20
- package/database/plugin/register.go +0 -118
- package/database/pparams.go +0 -145
- package/database/tip.go +0 -45
- package/database/txn.go +0 -147
- package/database/types/types.go +0 -74
- package/database/types/types_test.go +0 -83
- package/database/utxo.go +0 -263
- package/dist/artifacts.json +0 -1
- package/dist/checksums.txt +0 -22
- package/dist/config.yaml +0 -253
- package/dist/dingo-0.5.0-SNAPSHOT-d9431e4.tar.gz +0 -0
- package/dist/dingo-0.5.0-SNAPSHOT-d9431e4.tar.gz.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_arm64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_arm64.tar.gz.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_x86_64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_x86_64.tar.gz.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.apk +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.apk.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.deb +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.deb.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.rpm +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.rpm.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.apk +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.apk.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.deb +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.deb.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.rpm +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.rpm.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.tar.gz.sbom.json +0 -1
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_x86_64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_x86_64.tar.gz.sbom.json +0 -1
- package/dist/dingo_darwin_amd64_v1/dingo +0 -0
- package/dist/dingo_darwin_arm64_v8.0/dingo +0 -0
- package/dist/dingo_linux_amd64_v1/dingo +0 -0
- package/dist/dingo_linux_arm64_v8.0/dingo +0 -0
- package/dist/homebrew/dingo.rb +0 -51
- package/dist/metadata.json +0 -1
- package/event/event.go +0 -141
- package/event/event_test.go +0 -115
- package/event/metrics.go +0 -44
- package/go.mod +0 -98
- package/go.sum +0 -358
- package/internal/config/config.go +0 -145
- package/internal/config/config_test.go +0 -118
- package/internal/node/load.go +0 -149
- package/internal/node/node.go +0 -176
- package/internal/version/version.go +0 -33
- package/ledger/certs.go +0 -164
- package/ledger/chainsync.go +0 -504
- package/ledger/delta.go +0 -99
- package/ledger/eras/allegra.go +0 -154
- package/ledger/eras/alonzo.go +0 -156
- package/ledger/eras/babbage.go +0 -154
- package/ledger/eras/byron.go +0 -42
- package/ledger/eras/conway.go +0 -166
- package/ledger/eras/eras.go +0 -44
- package/ledger/eras/mary.go +0 -154
- package/ledger/eras/shelley.go +0 -164
- package/ledger/error.go +0 -19
- package/ledger/event.go +0 -50
- package/ledger/metrics.go +0 -53
- package/ledger/queries.go +0 -258
- package/ledger/slot.go +0 -127
- package/ledger/slot_test.go +0 -147
- package/ledger/state.go +0 -821
- package/ledger/view.go +0 -73
- package/localstatequery.go +0 -50
- package/localtxmonitor.go +0 -44
- package/localtxsubmission.go +0 -52
- package/mempool/consumer.go +0 -98
- package/mempool/mempool.go +0 -322
- package/node.go +0 -320
- package/peergov/event.go +0 -27
- package/peergov/peer.go +0 -67
- package/peergov/peergov.go +0 -290
- package/peersharing.go +0 -70
- package/preview-local-topology.json +0 -23
- package/topology/topology.go +0 -69
- package/topology/topology_test.go +0 -179
- package/tracing.go +0 -65
- package/txsubmission.go +0 -233
- package/utxorpc/query.go +0 -311
- package/utxorpc/submit.go +0 -395
- package/utxorpc/sync.go +0 -276
- package/utxorpc/utxorpc.go +0 -166
- package/utxorpc/watch.go +0 -310
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"AlonzoGenesisFile": "alonzo-genesis.json",
|
|
3
|
-
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
|
|
4
|
-
"ByronGenesisFile": "byron-genesis.json",
|
|
5
|
-
"ByronGenesisHash": "83de1d7302569ad56cf9139a41e2e11346d4cb4a31c00142557b6ab3fa550761",
|
|
6
|
-
"ConwayGenesisFile": "conway-genesis.json",
|
|
7
|
-
"ConwayGenesisHash": "9cc5084f02e27210eacba47af0872e3dba8946ad9460b6072d793e1d2f3987ef",
|
|
8
|
-
"EnableP2P": true,
|
|
9
|
-
"ExperimentalHardForksEnabled": false,
|
|
10
|
-
"ExperimentalProtocolsEnabled": false,
|
|
11
|
-
"LastKnownBlockVersion-Alt": 0,
|
|
12
|
-
"LastKnownBlockVersion-Major": 3,
|
|
13
|
-
"LastKnownBlockVersion-Minor": 1,
|
|
14
|
-
"MinNodeVersion": "8.12.0",
|
|
15
|
-
"PeerSharing": true,
|
|
16
|
-
"Protocol": "Cardano",
|
|
17
|
-
"RequiresNetworkMagic": "RequiresMagic",
|
|
18
|
-
"ShelleyGenesisFile": "shelley-genesis.json",
|
|
19
|
-
"ShelleyGenesisHash": "363498d1024f84bb39d3fa9593ce391483cb40d479b87233f868d6e57c3a400d",
|
|
20
|
-
"TargetNumberOfActivePeers": 20,
|
|
21
|
-
"TargetNumberOfEstablishedPeers": 50,
|
|
22
|
-
"TargetNumberOfKnownPeers": 150,
|
|
23
|
-
"TargetNumberOfRootPeers": 60,
|
|
24
|
-
"TestAllegraHardForkAtEpoch": 0,
|
|
25
|
-
"TestAlonzoHardForkAtEpoch": 0,
|
|
26
|
-
"TestMaryHardForkAtEpoch": 0,
|
|
27
|
-
"TestShelleyHardForkAtEpoch": 0,
|
|
28
|
-
"TraceAcceptPolicy": true,
|
|
29
|
-
"TraceBlockFetchClient": false,
|
|
30
|
-
"TraceBlockFetchDecisions": false,
|
|
31
|
-
"TraceBlockFetchProtocol": false,
|
|
32
|
-
"TraceBlockFetchProtocolSerialised": false,
|
|
33
|
-
"TraceBlockFetchServer": false,
|
|
34
|
-
"TraceChainDb": true,
|
|
35
|
-
"TraceChainSyncBlockServer": false,
|
|
36
|
-
"TraceChainSyncClient": false,
|
|
37
|
-
"TraceChainSyncHeaderServer": false,
|
|
38
|
-
"TraceChainSyncProtocol": false,
|
|
39
|
-
"TraceConnectionManager": true,
|
|
40
|
-
"TraceDNSResolver": true,
|
|
41
|
-
"TraceDNSSubscription": true,
|
|
42
|
-
"TraceDiffusionInitialization": true,
|
|
43
|
-
"TraceErrorPolicy": true,
|
|
44
|
-
"TraceForge": true,
|
|
45
|
-
"TraceHandshake": true,
|
|
46
|
-
"TraceInboundGovernor": true,
|
|
47
|
-
"TraceIpSubscription": true,
|
|
48
|
-
"TraceLedgerPeers": true,
|
|
49
|
-
"TraceLocalChainSyncProtocol": false,
|
|
50
|
-
"TraceLocalConnectionManager": true,
|
|
51
|
-
"TraceLocalErrorPolicy": true,
|
|
52
|
-
"TraceLocalHandshake": true,
|
|
53
|
-
"TraceLocalRootPeers": true,
|
|
54
|
-
"TraceLocalTxSubmissionProtocol": false,
|
|
55
|
-
"TraceLocalTxSubmissionServer": false,
|
|
56
|
-
"TraceMempool": true,
|
|
57
|
-
"TraceMux": false,
|
|
58
|
-
"TracePeerSelection": true,
|
|
59
|
-
"TracePeerSelectionActions": true,
|
|
60
|
-
"TracePublicRootPeers": true,
|
|
61
|
-
"TraceServer": true,
|
|
62
|
-
"TraceTxInbound": false,
|
|
63
|
-
"TraceTxOutbound": false,
|
|
64
|
-
"TraceTxSubmissionProtocol": false,
|
|
65
|
-
"TracingVerbosity": "NormalVerbosity",
|
|
66
|
-
"TurnOnLogMetrics": true,
|
|
67
|
-
"TurnOnLogging": true,
|
|
68
|
-
"defaultBackends": [
|
|
69
|
-
"KatipBK"
|
|
70
|
-
],
|
|
71
|
-
"defaultScribes": [
|
|
72
|
-
[
|
|
73
|
-
"StdoutSK",
|
|
74
|
-
"stdout"
|
|
75
|
-
]
|
|
76
|
-
],
|
|
77
|
-
"hasEKG": 12788,
|
|
78
|
-
"hasPrometheus": [
|
|
79
|
-
"127.0.0.1",
|
|
80
|
-
12798
|
|
81
|
-
],
|
|
82
|
-
"minSeverity": "Info",
|
|
83
|
-
"options": {
|
|
84
|
-
"mapBackends": {
|
|
85
|
-
"cardano.node.metrics": [
|
|
86
|
-
"EKGViewBK"
|
|
87
|
-
],
|
|
88
|
-
"cardano.node.resources": [
|
|
89
|
-
"EKGViewBK"
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"mapSubtrace": {
|
|
93
|
-
"cardano.node.metrics": {
|
|
94
|
-
"subtrace": "Neutral"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"rotation": {
|
|
99
|
-
"rpKeepFilesNum": 10,
|
|
100
|
-
"rpLogLimitBytes": 5000000,
|
|
101
|
-
"rpMaxAgeHours": 24
|
|
102
|
-
},
|
|
103
|
-
"setupBackends": [
|
|
104
|
-
"KatipBK"
|
|
105
|
-
],
|
|
106
|
-
"setupScribes": [
|
|
107
|
-
{
|
|
108
|
-
"scFormat": "ScText",
|
|
109
|
-
"scKind": "StdoutSK",
|
|
110
|
-
"scName": "stdout",
|
|
111
|
-
"scRotation": null
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"poolVotingThresholds": {
|
|
3
|
-
"committeeNormal": 0.51,
|
|
4
|
-
"committeeNoConfidence": 0.51,
|
|
5
|
-
"hardForkInitiation": 0.51,
|
|
6
|
-
"motionNoConfidence": 0.51,
|
|
7
|
-
"ppSecurityGroup": 0.51
|
|
8
|
-
},
|
|
9
|
-
"dRepVotingThresholds": {
|
|
10
|
-
"motionNoConfidence": 0.67,
|
|
11
|
-
"committeeNormal": 0.67,
|
|
12
|
-
"committeeNoConfidence": 0.6,
|
|
13
|
-
"updateToConstitution": 0.75,
|
|
14
|
-
"hardForkInitiation": 0.6,
|
|
15
|
-
"ppNetworkGroup": 0.67,
|
|
16
|
-
"ppEconomicGroup": 0.67,
|
|
17
|
-
"ppTechnicalGroup": 0.67,
|
|
18
|
-
"ppGovGroup": 0.75,
|
|
19
|
-
"treasuryWithdrawal": 0.67
|
|
20
|
-
},
|
|
21
|
-
"committeeMinSize": 0,
|
|
22
|
-
"committeeMaxTermLength": 365,
|
|
23
|
-
"govActionLifetime": 30,
|
|
24
|
-
"govActionDeposit": 100000000000,
|
|
25
|
-
"dRepDeposit": 500000000,
|
|
26
|
-
"dRepActivity": 20,
|
|
27
|
-
"minFeeRefScriptCostPerByte": 15,
|
|
28
|
-
"plutusV3CostModel": [
|
|
29
|
-
100788,
|
|
30
|
-
420,
|
|
31
|
-
1,
|
|
32
|
-
1,
|
|
33
|
-
1000,
|
|
34
|
-
173,
|
|
35
|
-
0,
|
|
36
|
-
1,
|
|
37
|
-
1000,
|
|
38
|
-
59957,
|
|
39
|
-
4,
|
|
40
|
-
1,
|
|
41
|
-
11183,
|
|
42
|
-
32,
|
|
43
|
-
201305,
|
|
44
|
-
8356,
|
|
45
|
-
4,
|
|
46
|
-
16000,
|
|
47
|
-
100,
|
|
48
|
-
16000,
|
|
49
|
-
100,
|
|
50
|
-
16000,
|
|
51
|
-
100,
|
|
52
|
-
16000,
|
|
53
|
-
100,
|
|
54
|
-
16000,
|
|
55
|
-
100,
|
|
56
|
-
16000,
|
|
57
|
-
100,
|
|
58
|
-
100,
|
|
59
|
-
100,
|
|
60
|
-
16000,
|
|
61
|
-
100,
|
|
62
|
-
94375,
|
|
63
|
-
32,
|
|
64
|
-
132994,
|
|
65
|
-
32,
|
|
66
|
-
61462,
|
|
67
|
-
4,
|
|
68
|
-
72010,
|
|
69
|
-
178,
|
|
70
|
-
0,
|
|
71
|
-
1,
|
|
72
|
-
22151,
|
|
73
|
-
32,
|
|
74
|
-
91189,
|
|
75
|
-
769,
|
|
76
|
-
4,
|
|
77
|
-
2,
|
|
78
|
-
85848,
|
|
79
|
-
123203,
|
|
80
|
-
7305,
|
|
81
|
-
-900,
|
|
82
|
-
1716,
|
|
83
|
-
549,
|
|
84
|
-
57,
|
|
85
|
-
85848,
|
|
86
|
-
0,
|
|
87
|
-
1,
|
|
88
|
-
1,
|
|
89
|
-
1000,
|
|
90
|
-
42921,
|
|
91
|
-
4,
|
|
92
|
-
2,
|
|
93
|
-
24548,
|
|
94
|
-
29498,
|
|
95
|
-
38,
|
|
96
|
-
1,
|
|
97
|
-
898148,
|
|
98
|
-
27279,
|
|
99
|
-
1,
|
|
100
|
-
51775,
|
|
101
|
-
558,
|
|
102
|
-
1,
|
|
103
|
-
39184,
|
|
104
|
-
1000,
|
|
105
|
-
60594,
|
|
106
|
-
1,
|
|
107
|
-
141895,
|
|
108
|
-
32,
|
|
109
|
-
83150,
|
|
110
|
-
32,
|
|
111
|
-
15299,
|
|
112
|
-
32,
|
|
113
|
-
76049,
|
|
114
|
-
1,
|
|
115
|
-
13169,
|
|
116
|
-
4,
|
|
117
|
-
22100,
|
|
118
|
-
10,
|
|
119
|
-
28999,
|
|
120
|
-
74,
|
|
121
|
-
1,
|
|
122
|
-
28999,
|
|
123
|
-
74,
|
|
124
|
-
1,
|
|
125
|
-
43285,
|
|
126
|
-
552,
|
|
127
|
-
1,
|
|
128
|
-
44749,
|
|
129
|
-
541,
|
|
130
|
-
1,
|
|
131
|
-
33852,
|
|
132
|
-
32,
|
|
133
|
-
68246,
|
|
134
|
-
32,
|
|
135
|
-
72362,
|
|
136
|
-
32,
|
|
137
|
-
7243,
|
|
138
|
-
32,
|
|
139
|
-
7391,
|
|
140
|
-
32,
|
|
141
|
-
11546,
|
|
142
|
-
32,
|
|
143
|
-
85848,
|
|
144
|
-
123203,
|
|
145
|
-
7305,
|
|
146
|
-
-900,
|
|
147
|
-
1716,
|
|
148
|
-
549,
|
|
149
|
-
57,
|
|
150
|
-
85848,
|
|
151
|
-
0,
|
|
152
|
-
1,
|
|
153
|
-
90434,
|
|
154
|
-
519,
|
|
155
|
-
0,
|
|
156
|
-
1,
|
|
157
|
-
74433,
|
|
158
|
-
32,
|
|
159
|
-
85848,
|
|
160
|
-
123203,
|
|
161
|
-
7305,
|
|
162
|
-
-900,
|
|
163
|
-
1716,
|
|
164
|
-
549,
|
|
165
|
-
57,
|
|
166
|
-
85848,
|
|
167
|
-
0,
|
|
168
|
-
1,
|
|
169
|
-
1,
|
|
170
|
-
85848,
|
|
171
|
-
123203,
|
|
172
|
-
7305,
|
|
173
|
-
-900,
|
|
174
|
-
1716,
|
|
175
|
-
549,
|
|
176
|
-
57,
|
|
177
|
-
85848,
|
|
178
|
-
0,
|
|
179
|
-
1,
|
|
180
|
-
955506,
|
|
181
|
-
213312,
|
|
182
|
-
0,
|
|
183
|
-
2,
|
|
184
|
-
270652,
|
|
185
|
-
22588,
|
|
186
|
-
4,
|
|
187
|
-
1457325,
|
|
188
|
-
64566,
|
|
189
|
-
4,
|
|
190
|
-
20467,
|
|
191
|
-
1,
|
|
192
|
-
4,
|
|
193
|
-
0,
|
|
194
|
-
141992,
|
|
195
|
-
32,
|
|
196
|
-
100788,
|
|
197
|
-
420,
|
|
198
|
-
1,
|
|
199
|
-
1,
|
|
200
|
-
81663,
|
|
201
|
-
32,
|
|
202
|
-
59498,
|
|
203
|
-
32,
|
|
204
|
-
20142,
|
|
205
|
-
32,
|
|
206
|
-
24588,
|
|
207
|
-
32,
|
|
208
|
-
20744,
|
|
209
|
-
32,
|
|
210
|
-
25933,
|
|
211
|
-
32,
|
|
212
|
-
24623,
|
|
213
|
-
32,
|
|
214
|
-
43053543,
|
|
215
|
-
10,
|
|
216
|
-
53384111,
|
|
217
|
-
14333,
|
|
218
|
-
10,
|
|
219
|
-
43574283,
|
|
220
|
-
26308,
|
|
221
|
-
10,
|
|
222
|
-
16000,
|
|
223
|
-
100,
|
|
224
|
-
16000,
|
|
225
|
-
100,
|
|
226
|
-
962335,
|
|
227
|
-
18,
|
|
228
|
-
2780678,
|
|
229
|
-
6,
|
|
230
|
-
442008,
|
|
231
|
-
1,
|
|
232
|
-
52538055,
|
|
233
|
-
3756,
|
|
234
|
-
18,
|
|
235
|
-
267929,
|
|
236
|
-
18,
|
|
237
|
-
76433006,
|
|
238
|
-
8868,
|
|
239
|
-
18,
|
|
240
|
-
52948122,
|
|
241
|
-
18,
|
|
242
|
-
1995836,
|
|
243
|
-
36,
|
|
244
|
-
3227919,
|
|
245
|
-
12,
|
|
246
|
-
901022,
|
|
247
|
-
1,
|
|
248
|
-
166917843,
|
|
249
|
-
4307,
|
|
250
|
-
36,
|
|
251
|
-
284546,
|
|
252
|
-
36,
|
|
253
|
-
158221314,
|
|
254
|
-
26549,
|
|
255
|
-
36,
|
|
256
|
-
74698472,
|
|
257
|
-
36,
|
|
258
|
-
333849714,
|
|
259
|
-
1,
|
|
260
|
-
254006273,
|
|
261
|
-
72,
|
|
262
|
-
2174038,
|
|
263
|
-
72,
|
|
264
|
-
2261318,
|
|
265
|
-
64571,
|
|
266
|
-
4,
|
|
267
|
-
207616,
|
|
268
|
-
8310,
|
|
269
|
-
4,
|
|
270
|
-
1293828,
|
|
271
|
-
28716,
|
|
272
|
-
63,
|
|
273
|
-
0,
|
|
274
|
-
1,
|
|
275
|
-
1006041,
|
|
276
|
-
43623,
|
|
277
|
-
251,
|
|
278
|
-
0,
|
|
279
|
-
1
|
|
280
|
-
],
|
|
281
|
-
"constitution": {
|
|
282
|
-
"anchor": {
|
|
283
|
-
"dataHash": "ca41a91f399259bcefe57f9858e91f6d00e1a38d6d9c63d4052914ea7bd70cb2",
|
|
284
|
-
"url": "ipfs://bafkreifnwj6zpu3ixa4siz2lndqybyc5wnnt3jkwyutci4e2tmbnj3xrdm"
|
|
285
|
-
},
|
|
286
|
-
"script": "fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64"
|
|
287
|
-
},
|
|
288
|
-
"committee": {
|
|
289
|
-
"members": {
|
|
290
|
-
"scriptHash-ff9babf23fef3f54ec29132c07a8e23807d7b395b143ecd8ff79f4c7": 1000
|
|
291
|
-
},
|
|
292
|
-
"threshold": {
|
|
293
|
-
"numerator": 2,
|
|
294
|
-
"denominator": 3
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"activeSlotsCoeff": 0.05,
|
|
3
|
-
"epochLength": 86400,
|
|
4
|
-
"genDelegs": {
|
|
5
|
-
"12b0f443d02861948a0fce9541916b014e8402984c7b83ad70a834ce": {
|
|
6
|
-
"delegate": "7c54a168c731f2f44ced620f3cca7c2bd90731cab223d5167aa994e6",
|
|
7
|
-
"vrf": "62d546a35e1be66a2b06e29558ef33f4222f1c466adbb59b52d800964d4e60ec"
|
|
8
|
-
},
|
|
9
|
-
"3df542796a64e399b60c74acfbdb5afa1e114532fa36b46d6368ef3a": {
|
|
10
|
-
"delegate": "c44bc2f3cc7e98c0f227aa399e4035c33c0d775a0985875fff488e20",
|
|
11
|
-
"vrf": "4f9d334decadff6eba258b2df8ae1f02580a2628bce47ae7d957e1acd3f42a3c"
|
|
12
|
-
},
|
|
13
|
-
"93fd5083ff20e7ab5570948831730073143bea5a5d5539852ed45889": {
|
|
14
|
-
"delegate": "82a02922f10105566b70366b07c758c8134fa91b3d8ae697dfa5e8e0",
|
|
15
|
-
"vrf": "8a57e94a9b4c65ec575f35d41edb1df399fa30fdf10775389f5d1ef670ca3f9f"
|
|
16
|
-
},
|
|
17
|
-
"a86cab3ea72eabb2e8aafbbf4abbd2ba5bdfd04eea26a39b126a78e4": {
|
|
18
|
-
"delegate": "10257f6d3bae913514bdc96c9170b3166bf6838cca95736b0e418426",
|
|
19
|
-
"vrf": "1b54aad6b013145a0fc74bb5c2aa368ebaf3999e88637d78e09706d0cc29874a"
|
|
20
|
-
},
|
|
21
|
-
"b799804a28885bd49c0e1b99d8b3b26de0fac17a5cf651ecf0c872f0": {
|
|
22
|
-
"delegate": "ebe606e22d932d51be2c1ce87e7d7e4c9a7d1f7df4a5535c29e23d22",
|
|
23
|
-
"vrf": "b3fc06a1f8ee69ff23185d9af453503be8b15b2652e1f9fb7c3ded6797a2d6f9"
|
|
24
|
-
},
|
|
25
|
-
"d125812d6ab973a2c152a0525b7fd32d36ff13555a427966a9cac9b1": {
|
|
26
|
-
"delegate": "e302198135fb5b00bfe0b9b5623426f7cf03179ab7ba75f945d5b79b",
|
|
27
|
-
"vrf": "b45ca2ed95f92248fa0322ce1fc9f815a5a5aa2f21f1adc2c42c4dccfc7ba631"
|
|
28
|
-
},
|
|
29
|
-
"ef27651990a26449a40767d5e06cdef1670a3f3ff4b951d385b51787": {
|
|
30
|
-
"delegate": "0e0b11e80d958732e587585d30978d683a061831d1b753878f549d05",
|
|
31
|
-
"vrf": "b860ec844f6cd476c4fabb4aa1ca72d5c74d82f3835aed3c9515a35b6e048719"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"initialFunds": {},
|
|
35
|
-
"maxKESEvolutions": 62,
|
|
36
|
-
"maxLovelaceSupply": 45000000000000000,
|
|
37
|
-
"networkId": "Testnet",
|
|
38
|
-
"networkMagic": 2,
|
|
39
|
-
"protocolParams": {
|
|
40
|
-
"protocolVersion": {
|
|
41
|
-
"minor": 0,
|
|
42
|
-
"major": 6
|
|
43
|
-
},
|
|
44
|
-
"decentralisationParam": 1,
|
|
45
|
-
"eMax": 18,
|
|
46
|
-
"extraEntropy": {
|
|
47
|
-
"tag": "NeutralNonce"
|
|
48
|
-
},
|
|
49
|
-
"maxTxSize": 16384,
|
|
50
|
-
"maxBlockBodySize": 65536,
|
|
51
|
-
"maxBlockHeaderSize": 1100,
|
|
52
|
-
"minFeeA": 44,
|
|
53
|
-
"minFeeB": 155381,
|
|
54
|
-
"minUTxOValue": 1000000,
|
|
55
|
-
"poolDeposit": 500000000,
|
|
56
|
-
"minPoolCost": 340000000,
|
|
57
|
-
"keyDeposit": 2000000,
|
|
58
|
-
"nOpt": 150,
|
|
59
|
-
"rho": 0.003,
|
|
60
|
-
"tau": 0.20,
|
|
61
|
-
"a0": 0.3
|
|
62
|
-
},
|
|
63
|
-
"securityParam": 432,
|
|
64
|
-
"slotLength": 1,
|
|
65
|
-
"slotsPerKESPeriod": 129600,
|
|
66
|
-
"systemStart": "2022-10-25T00:00:00Z",
|
|
67
|
-
"updateQuorum": 5
|
|
68
|
-
}
|
package/config.go
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 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 dingo
|
|
16
|
-
|
|
17
|
-
import (
|
|
18
|
-
"errors"
|
|
19
|
-
"fmt"
|
|
20
|
-
"io"
|
|
21
|
-
"log/slog"
|
|
22
|
-
|
|
23
|
-
"github.com/blinklabs-io/dingo/config/cardano"
|
|
24
|
-
"github.com/blinklabs-io/dingo/connmanager"
|
|
25
|
-
"github.com/blinklabs-io/dingo/topology"
|
|
26
|
-
ouroboros "github.com/blinklabs-io/gouroboros"
|
|
27
|
-
ocommon "github.com/blinklabs-io/gouroboros/protocol/common"
|
|
28
|
-
"github.com/prometheus/client_golang/prometheus"
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
type ListenerConfig = connmanager.ListenerConfig
|
|
32
|
-
|
|
33
|
-
type Config struct {
|
|
34
|
-
cardanoNodeConfig *cardano.CardanoNodeConfig
|
|
35
|
-
dataDir string
|
|
36
|
-
intersectPoints []ocommon.Point
|
|
37
|
-
intersectTip bool
|
|
38
|
-
logger *slog.Logger
|
|
39
|
-
listeners []ListenerConfig
|
|
40
|
-
network string
|
|
41
|
-
networkMagic uint32
|
|
42
|
-
outboundSourcePort uint
|
|
43
|
-
utxorpcPort uint
|
|
44
|
-
tlsCertFilePath string
|
|
45
|
-
tlsKeyFilePath string
|
|
46
|
-
peerSharing bool
|
|
47
|
-
promRegistry prometheus.Registerer
|
|
48
|
-
topologyConfig *topology.TopologyConfig
|
|
49
|
-
tracing bool
|
|
50
|
-
tracingStdout bool
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// configPopulateNetworkMagic uses the named network (if specified) to determine the network magic value (if not specified)
|
|
54
|
-
func (n *Node) configPopulateNetworkMagic() error {
|
|
55
|
-
if n.config.networkMagic == 0 && n.config.network != "" {
|
|
56
|
-
tmpCfg := n.config
|
|
57
|
-
tmpNetwork, ok := ouroboros.NetworkByName(n.config.network)
|
|
58
|
-
if !ok {
|
|
59
|
-
return fmt.Errorf("unknown network name: %s", n.config.network)
|
|
60
|
-
}
|
|
61
|
-
tmpCfg.networkMagic = tmpNetwork.NetworkMagic
|
|
62
|
-
n.config = tmpCfg
|
|
63
|
-
}
|
|
64
|
-
return nil
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
func (n *Node) configValidate() error {
|
|
68
|
-
if n.config.networkMagic == 0 {
|
|
69
|
-
return fmt.Errorf(
|
|
70
|
-
"invalid network magic value: %d",
|
|
71
|
-
n.config.networkMagic,
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
if len(n.config.listeners) == 0 {
|
|
75
|
-
return errors.New("no listeners defined")
|
|
76
|
-
}
|
|
77
|
-
for _, listener := range n.config.listeners {
|
|
78
|
-
if listener.Listener != nil {
|
|
79
|
-
continue
|
|
80
|
-
}
|
|
81
|
-
if listener.ListenNetwork != "" && listener.ListenAddress != "" {
|
|
82
|
-
continue
|
|
83
|
-
}
|
|
84
|
-
return errors.New(
|
|
85
|
-
"listener must provide net.Listener or listen network/address values",
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
if n.config.cardanoNodeConfig != nil {
|
|
89
|
-
shelleyGenesis := n.config.cardanoNodeConfig.ShelleyGenesis()
|
|
90
|
-
if shelleyGenesis == nil {
|
|
91
|
-
return errors.New("unable to get Shelley genesis information")
|
|
92
|
-
}
|
|
93
|
-
if n.config.networkMagic != shelleyGenesis.NetworkMagic {
|
|
94
|
-
return fmt.Errorf(
|
|
95
|
-
"network magic (%d) doesn't match value from Shelley genesis (%d)",
|
|
96
|
-
n.config.networkMagic,
|
|
97
|
-
shelleyGenesis.NetworkMagic,
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return nil
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// ConfigOptionFunc is a type that represents functions that modify the Connection config
|
|
105
|
-
type ConfigOptionFunc func(*Config)
|
|
106
|
-
|
|
107
|
-
// NewConfig creates a new dingo config with the specified options
|
|
108
|
-
func NewConfig(opts ...ConfigOptionFunc) Config {
|
|
109
|
-
c := Config{
|
|
110
|
-
// Default logger will throw away logs
|
|
111
|
-
// We do this so we don't have to add guards around every log operation
|
|
112
|
-
logger: slog.New(slog.NewJSONHandler(io.Discard, nil)),
|
|
113
|
-
}
|
|
114
|
-
// Apply options
|
|
115
|
-
for _, opt := range opts {
|
|
116
|
-
opt(&c)
|
|
117
|
-
}
|
|
118
|
-
return c
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// WithCardanoNodeConfig specifies the CardanoNodeConfig object to use. This is mostly used for loading genesis config files
|
|
122
|
-
// referenced by the dingo config
|
|
123
|
-
func WithCardanoNodeConfig(
|
|
124
|
-
cardanoNodeConfig *cardano.CardanoNodeConfig,
|
|
125
|
-
) ConfigOptionFunc {
|
|
126
|
-
return func(c *Config) {
|
|
127
|
-
c.cardanoNodeConfig = cardanoNodeConfig
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// WithDatabasePath specifies the persistent data directory to use. The default is to store everything in memory
|
|
132
|
-
func WithDatabasePath(dataDir string) ConfigOptionFunc {
|
|
133
|
-
return func(c *Config) {
|
|
134
|
-
c.dataDir = dataDir
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// WithIntersectPoints specifies intersect point(s) for the initial chainsync. The default is to start at chain genesis
|
|
139
|
-
func WithIntersectPoints(points []ocommon.Point) ConfigOptionFunc {
|
|
140
|
-
return func(c *Config) {
|
|
141
|
-
c.intersectPoints = points
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// WithIntersectTip specifies whether to start the initial chainsync at the current tip. The default is to start at chain genesis
|
|
146
|
-
func WithIntersectTip(intersectTip bool) ConfigOptionFunc {
|
|
147
|
-
return func(c *Config) {
|
|
148
|
-
c.intersectTip = intersectTip
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// WithLogger specifies the logger to use. This defaults to discarding log output
|
|
153
|
-
func WithLogger(logger *slog.Logger) ConfigOptionFunc {
|
|
154
|
-
return func(c *Config) {
|
|
155
|
-
c.logger = logger
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// WithListeners specifies the listener config(s) to use
|
|
160
|
-
func WithListeners(listeners ...ListenerConfig) ConfigOptionFunc {
|
|
161
|
-
return func(c *Config) {
|
|
162
|
-
c.listeners = append(c.listeners, listeners...)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// WithNetwork specifies the named network to operate on. This will automatically set the appropriate network magic value
|
|
167
|
-
func WithNetwork(network string) ConfigOptionFunc {
|
|
168
|
-
return func(c *Config) {
|
|
169
|
-
c.network = network
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// WithNetworkMagic specifies the network magic value to use. This will override any named network specified
|
|
174
|
-
func WithNetworkMagic(networkMagic uint32) ConfigOptionFunc {
|
|
175
|
-
return func(c *Config) {
|
|
176
|
-
c.networkMagic = networkMagic
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// WithOutboundSourcePort specifies the source port to use for outbound connections. This defaults to dynamic source ports
|
|
181
|
-
func WithOutboundSourcePort(port uint) ConfigOptionFunc {
|
|
182
|
-
return func(c *Config) {
|
|
183
|
-
c.outboundSourcePort = port
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// WithUtxorpcTlsCertFilePath specifies the path to the TLS certificate for the gRPC API listener. This defaults to empty
|
|
188
|
-
func WithUtxorpcTlsCertFilePath(path string) ConfigOptionFunc {
|
|
189
|
-
return func(c *Config) {
|
|
190
|
-
c.tlsCertFilePath = path
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// WithUtxorpcTlsKeyFilePath specifies the path to the TLS key for the gRPC API listener. This defaults to empty
|
|
195
|
-
func WithUtxorpcTlsKeyFilePath(path string) ConfigOptionFunc {
|
|
196
|
-
return func(c *Config) {
|
|
197
|
-
c.tlsKeyFilePath = path
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// WithUtxorpcPort specifies the port to use for the gRPC API listener. This defaults to port 9090
|
|
202
|
-
func WithUtxorpcPort(port uint) ConfigOptionFunc {
|
|
203
|
-
return func(c *Config) {
|
|
204
|
-
c.utxorpcPort = port
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// WithPeerSharing specifies whether to enable peer sharing. This is disabled by default
|
|
209
|
-
func WithPeerSharing(peerSharing bool) ConfigOptionFunc {
|
|
210
|
-
return func(c *Config) {
|
|
211
|
-
c.peerSharing = peerSharing
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// WithPrometheusRegistry specifies a prometheus.Registerer instance to add metrics to. In most cases, prometheus.DefaultRegistry would be
|
|
216
|
-
// a good choice to get metrics working
|
|
217
|
-
func WithPrometheusRegistry(registry prometheus.Registerer) ConfigOptionFunc {
|
|
218
|
-
return func(c *Config) {
|
|
219
|
-
c.promRegistry = registry
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// WithTopologyConfig specifies a topology.TopologyConfig to use for outbound peers
|
|
224
|
-
func WithTopologyConfig(
|
|
225
|
-
topologyConfig *topology.TopologyConfig,
|
|
226
|
-
) ConfigOptionFunc {
|
|
227
|
-
return func(c *Config) {
|
|
228
|
-
c.topologyConfig = topologyConfig
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// WithTracing enables tracing. By default, spans are submitted to a HTTP(s) endpoint using OTLP. This can be configured
|
|
233
|
-
// using the OTEL_EXPORTER_OTLP_* env vars documented in the README for [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp]
|
|
234
|
-
func WithTracing(tracing bool) ConfigOptionFunc {
|
|
235
|
-
return func(c *Config) {
|
|
236
|
-
c.tracing = tracing
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// WithTracingStdout enables tracing output to stdout. This also requires tracing to enabled separately. This is mostly useful for debugging
|
|
241
|
-
func WithTracingStdout(stdout bool) ConfigOptionFunc {
|
|
242
|
-
return func(c *Config) {
|
|
243
|
-
c.tracingStdout = stdout
|
|
244
|
-
}
|
|
245
|
-
}
|