@blinklabs/dingo 0.7.0 → 0.8.1
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/README.md +2 -1
- package/{bin/dingo → dingo} +0 -0
- package/dingo.yaml.example +53 -0
- package/package.json +2 -2
- package/.github/CODEOWNERS +0 -5
- package/.github/assets/dingo-ate-my-blockchain.png +0 -0
- package/.github/assets/dingo-illustration.png +0 -0
- package/.github/assets/dingo-logo-with-text-horizontal.png +0 -0
- package/.github/assets/dingo-logo-with-text.png +0 -0
- package/.github/dependabot.yml +0 -19
- package/.github/dingo-20241210.png +0 -0
- package/.github/dingo.md +0 -56
- package/.github/workflows/ci-docker.yml +0 -36
- package/.github/workflows/conventional-commits.yml +0 -17
- package/.github/workflows/go-test.yml +0 -29
- package/.github/workflows/golangci-lint.yml +0 -23
- package/.github/workflows/publish.yml +0 -207
- 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
package/README.md
CHANGED
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
|
|
20
20
|
## Running
|
|
21
21
|
|
|
22
|
-
Dingo
|
|
22
|
+
Dingo supports configuration via both a YAML config file (`dingo.yaml`) and uses environment
|
|
23
23
|
variables to modify its own behavior.
|
|
24
24
|
|
|
25
|
+
A sample configuration file is provided at `dingo.yaml.example`.You can copy and edit this file to configure Dingo for your local or production environment:
|
|
25
26
|
This behavior can be changed via the following environment variables:
|
|
26
27
|
|
|
27
28
|
- `CARDANO_BIND_ADDR`
|
package/{bin/dingo → dingo}
RENAMED
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Example config file for dingo
|
|
2
|
+
# The values shown below correspond to the in-code defaults
|
|
3
|
+
|
|
4
|
+
# Public bind address for the Dingo server
|
|
5
|
+
bindAddr: "0.0.0.0"
|
|
6
|
+
|
|
7
|
+
# Path to the Cardano node configuration file
|
|
8
|
+
#
|
|
9
|
+
# Can be overridden with the config environment variable
|
|
10
|
+
cardanoConfig: "./config/cardano/preview/config.json"
|
|
11
|
+
|
|
12
|
+
# A directory which contains the ledger database files
|
|
13
|
+
databasePath: ".dingo"
|
|
14
|
+
|
|
15
|
+
# Path to the UNIX domain socket file used by the server
|
|
16
|
+
socketPath: "dingo.socket"
|
|
17
|
+
|
|
18
|
+
# Name of the Cardano network
|
|
19
|
+
network: "preview"
|
|
20
|
+
|
|
21
|
+
# TLS certificate file path (for HTTPS)
|
|
22
|
+
#
|
|
23
|
+
# Can be overridden with the TLS_CERT_FILE_PATH environment variable
|
|
24
|
+
tlsCertFilePath: ""
|
|
25
|
+
|
|
26
|
+
# TLS key file path (for HTTPS)
|
|
27
|
+
#
|
|
28
|
+
# Can be overridden with the TLS_KEY_FILE_PATH environment variable
|
|
29
|
+
tlsKeyFilePath: ""
|
|
30
|
+
|
|
31
|
+
# Path to the topology configuration file for Cardano node
|
|
32
|
+
topology: ""
|
|
33
|
+
|
|
34
|
+
# TCP port to bind for Prometheus metrics endpoint
|
|
35
|
+
metricsPort: 12798
|
|
36
|
+
|
|
37
|
+
# Internal/private address to bind for listening for Ouroboros NtC
|
|
38
|
+
privateBindAddr: "127.0.0.1"
|
|
39
|
+
|
|
40
|
+
# TCP port to bind for listening for Ouroboros NtC
|
|
41
|
+
privatePort: 3002
|
|
42
|
+
|
|
43
|
+
# TCP port to bind for listening for Ouroboros NtN
|
|
44
|
+
#
|
|
45
|
+
# Can be overridden with the port environment variable
|
|
46
|
+
relayPort: 3001
|
|
47
|
+
|
|
48
|
+
# TCP port to bind for listening for UTxO RPC
|
|
49
|
+
utxorpcPort: 9090
|
|
50
|
+
|
|
51
|
+
# Ignore prior chain history and start from current tip (default: false)
|
|
52
|
+
# This is experimental and may break — use with caution
|
|
53
|
+
intersectTip: false
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blinklabs/dingo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Dingo is a Cardano blockchain data node",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"bin": "dingo",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"postinstall": "golang-npm install",
|
|
8
9
|
"preuninstall": "golang-npm uninstall"
|
|
@@ -22,7 +23,6 @@
|
|
|
22
23
|
},
|
|
23
24
|
"homepage": "https://github.com/blinklabs-io/dingo#readme",
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"dingo": "^0.0.18",
|
|
26
26
|
"golang-npm": "^0.0.6"
|
|
27
27
|
},
|
|
28
28
|
"goBinary": {
|
package/.github/CODEOWNERS
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.github/dependabot.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "docker"
|
|
9
|
-
directory: "/"
|
|
10
|
-
schedule:
|
|
11
|
-
interval: "weekly"
|
|
12
|
-
- package-ecosystem: "github-actions"
|
|
13
|
-
directory: "/"
|
|
14
|
-
schedule:
|
|
15
|
-
interval: "weekly"
|
|
16
|
-
- package-ecosystem: "gomod"
|
|
17
|
-
directory: "/"
|
|
18
|
-
schedule:
|
|
19
|
-
interval: "weekly"
|
|
Binary file
|
package/.github/dingo.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
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
|
-
@*-**--%%%%%%%%%%%#--%@ ==+*******== =+#*------#--%%%%%%%%%+-=%%%%%%#--+%@@@@@@@@%+= @%--*%%%@@@
|
|
43
|
-
%---+%%%%%%%%%%%=-=% ==+******+=+*******+== =+***####+=+*-=%%%%%%%%%--%%%%#=-=#@@@%@@@@@@%+=
|
|
44
|
-
@#------=++*%%%=-#@=+%@@@@@%#*********==: ==== ==*******+== %---=+#%%%%%+-%%#--=%%==++****++===
|
|
45
|
-
@@@%##*=-----# =+@@@@@@@@@%******=====*#*****+=*******== @%#*=----+*#--=-=%@ ===
|
|
46
|
-
@@@@ =#@@@@@@@@@@#**+== =+%@@@@@@%********+== @@%*+----=#@
|
|
47
|
-
=+#@@%@@@@%#+=== ==%@@@@@@@@%*****+== @@%%@
|
|
48
|
-
========== =#@@@@@@@@@@%**+==
|
|
49
|
-
==+##%%%###+===
|
|
50
|
-
=====
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Created using https://itoa.hex.dance/
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
name: Docker CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: ['main']
|
|
6
|
-
paths: ['Dockerfile','cmd/**','docs/**','internal/**','go.*','.github/workflows/ci-docker.yml']
|
|
7
|
-
|
|
8
|
-
env:
|
|
9
|
-
GHCR_IMAGE_NAME: ghcr.io/blinklabs-io/dingo
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
docker:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
with:
|
|
20
|
-
fetch-depth: '0'
|
|
21
|
-
- name: qemu
|
|
22
|
-
uses: docker/setup-qemu-action@v3
|
|
23
|
-
- uses: docker/setup-buildx-action@v3
|
|
24
|
-
- id: meta
|
|
25
|
-
uses: docker/metadata-action@v5
|
|
26
|
-
with:
|
|
27
|
-
images: ${{ env.GHCR_IMAGE_NAME }}
|
|
28
|
-
- name: build
|
|
29
|
-
uses: docker/build-push-action@v6
|
|
30
|
-
with:
|
|
31
|
-
context: .
|
|
32
|
-
push: false
|
|
33
|
-
### TODO: test multiple platforms
|
|
34
|
-
# platforms: linux/amd64,linux/arm64
|
|
35
|
-
tags: ${{ steps.meta.outputs.tags }}
|
|
36
|
-
labels: ${{ steps.meta.outputs.labels }}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# The below is pulled from upstream and slightly modified
|
|
2
|
-
# https://github.com/webiny/action-conventional-commits/blob/master/README.md#usage
|
|
3
|
-
|
|
4
|
-
name: Conventional Commits
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
pull_request:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
name: Conventional Commits
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
- uses: webiny/action-conventional-commits@v1.3.0
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: go-test
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- v*
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
pull_request:
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
go-test:
|
|
16
|
-
name: go-test
|
|
17
|
-
strategy:
|
|
18
|
-
matrix:
|
|
19
|
-
go-version: [1.23.x, 1.24.x]
|
|
20
|
-
# We want to make sure that this builds on Linux and Darwin
|
|
21
|
-
platform: [ubuntu-latest, macos-latest]
|
|
22
|
-
runs-on: ${{ matrix.platform }}
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
25
|
-
- uses: actions/setup-go@v5
|
|
26
|
-
with:
|
|
27
|
-
go-version: ${{ matrix.go-version }}
|
|
28
|
-
- name: go-test
|
|
29
|
-
run: go test ./...
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: golangci-lint
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
tags:
|
|
5
|
-
- v*
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
pull_request:
|
|
9
|
-
|
|
10
|
-
permissions:
|
|
11
|
-
contents: read
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
golangci:
|
|
15
|
-
name: lint
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: actions/setup-go@v5
|
|
20
|
-
with:
|
|
21
|
-
go-version: 1.23.x
|
|
22
|
-
- name: golangci-lint
|
|
23
|
-
uses: golangci/golangci-lint-action@v7
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
name: publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ['main']
|
|
6
|
-
tags:
|
|
7
|
-
- 'v*.*.*'
|
|
8
|
-
|
|
9
|
-
concurrency: ${{ github.ref }}
|
|
10
|
-
|
|
11
|
-
env:
|
|
12
|
-
APPLICATION_NAME: 'dingo'
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
create-draft-release:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
permissions:
|
|
18
|
-
contents: write
|
|
19
|
-
outputs:
|
|
20
|
-
RELEASE_ID: ${{ steps.create-release.outputs.result }}
|
|
21
|
-
steps:
|
|
22
|
-
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
|
|
23
|
-
- uses: actions/github-script@v7
|
|
24
|
-
id: create-release
|
|
25
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
26
|
-
with:
|
|
27
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
-
result-encoding: string
|
|
29
|
-
script: |
|
|
30
|
-
try {
|
|
31
|
-
const response = await github.rest.repos.createRelease({
|
|
32
|
-
draft: true,
|
|
33
|
-
generate_release_notes: true,
|
|
34
|
-
name: process.env.RELEASE_TAG,
|
|
35
|
-
owner: context.repo.owner,
|
|
36
|
-
prerelease: false,
|
|
37
|
-
repo: context.repo.repo,
|
|
38
|
-
tag_name: process.env.RELEASE_TAG,
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
return response.data.id;
|
|
42
|
-
} catch (error) {
|
|
43
|
-
core.setFailed(error.message);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
build-binaries:
|
|
47
|
-
strategy:
|
|
48
|
-
matrix:
|
|
49
|
-
include:
|
|
50
|
-
- runner: macos-latest
|
|
51
|
-
os: darwin
|
|
52
|
-
arch: arm64
|
|
53
|
-
- runner: ubuntu-latest
|
|
54
|
-
os: freebsd
|
|
55
|
-
arch: amd64
|
|
56
|
-
- runner: ubuntu-latest
|
|
57
|
-
os: freebsd
|
|
58
|
-
arch: arm64
|
|
59
|
-
- runner: ubuntu-latest
|
|
60
|
-
os: linux
|
|
61
|
-
arch: amd64
|
|
62
|
-
- runner: ubuntu-latest
|
|
63
|
-
os: linux
|
|
64
|
-
arch: arm64
|
|
65
|
-
runs-on: ${{ matrix.runner }}
|
|
66
|
-
needs: [create-draft-release]
|
|
67
|
-
permissions:
|
|
68
|
-
actions: write
|
|
69
|
-
attestations: write
|
|
70
|
-
checks: write
|
|
71
|
-
contents: write
|
|
72
|
-
id-token: write
|
|
73
|
-
packages: write
|
|
74
|
-
statuses: write
|
|
75
|
-
steps:
|
|
76
|
-
- name: Set RELEASE_TAG
|
|
77
|
-
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
|
|
78
|
-
- uses: actions/checkout@v4
|
|
79
|
-
with:
|
|
80
|
-
fetch-depth: '0'
|
|
81
|
-
- uses: actions/setup-go@v5
|
|
82
|
-
with:
|
|
83
|
-
go-version: 1.23.x
|
|
84
|
-
- name: Build binary
|
|
85
|
-
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build
|
|
86
|
-
- name: Upload release asset
|
|
87
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
88
|
-
run: |
|
|
89
|
-
_filename=${{ env.APPLICATION_NAME }}-${{ env.RELEASE_TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
|
|
90
|
-
if [[ "${{ matrix.os }}" != "darwin" ]]; then
|
|
91
|
-
tar czf ${_filename} ${{ env.APPLICATION_NAME }}
|
|
92
|
-
fi
|
|
93
|
-
if [[ "${{ matrix.os }}" == "darwin" ]]; then
|
|
94
|
-
_filename=${{ env.APPLICATION_NAME }}-${{ env.RELEASE_TAG }}-${{ matrix.os }}-${{ matrix.arch }}.zip
|
|
95
|
-
zip -r ${_filename} ${{ env.APPLICATION_NAME }}
|
|
96
|
-
fi
|
|
97
|
-
curl \
|
|
98
|
-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
|
99
|
-
-H "Content-Type: application/octet-stream" \
|
|
100
|
-
--data-binary @${_filename} \
|
|
101
|
-
https://uploads.github.com/repos/${{ github.repository_owner }}/${{ env.APPLICATION_NAME }}/releases/${{ needs.create-draft-release.outputs.RELEASE_ID }}/assets?name=${_filename}
|
|
102
|
-
- name: Attest binary
|
|
103
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
104
|
-
uses: actions/attest-build-provenance@v2
|
|
105
|
-
with:
|
|
106
|
-
subject-path: '${{ env.APPLICATION_NAME }}'
|
|
107
|
-
|
|
108
|
-
build-images:
|
|
109
|
-
runs-on: ubuntu-latest
|
|
110
|
-
needs: [create-draft-release]
|
|
111
|
-
permissions:
|
|
112
|
-
actions: write
|
|
113
|
-
attestations: write
|
|
114
|
-
checks: write
|
|
115
|
-
contents: write
|
|
116
|
-
id-token: write
|
|
117
|
-
packages: write
|
|
118
|
-
statuses: write
|
|
119
|
-
steps:
|
|
120
|
-
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
|
|
121
|
-
- uses: actions/checkout@v4
|
|
122
|
-
with:
|
|
123
|
-
fetch-depth: '0'
|
|
124
|
-
- name: Set up QEMU
|
|
125
|
-
uses: docker/setup-qemu-action@v3
|
|
126
|
-
- name: Set up Docker Buildx
|
|
127
|
-
uses: docker/setup-buildx-action@v3
|
|
128
|
-
- name: Login to Docker Hub
|
|
129
|
-
uses: docker/login-action@v3
|
|
130
|
-
with:
|
|
131
|
-
username: blinklabs
|
|
132
|
-
password: ${{ secrets.DOCKER_PASSWORD }} # uses token
|
|
133
|
-
- name: Login to GHCR
|
|
134
|
-
uses: docker/login-action@v3
|
|
135
|
-
with:
|
|
136
|
-
username: ${{ github.repository_owner }}
|
|
137
|
-
password: ${{ secrets.GITHUB_TOKEN }}
|
|
138
|
-
registry: ghcr.io
|
|
139
|
-
- id: meta
|
|
140
|
-
uses: docker/metadata-action@v5
|
|
141
|
-
with:
|
|
142
|
-
images: |
|
|
143
|
-
blinklabs/dingo
|
|
144
|
-
ghcr.io/${{ github.repository }}
|
|
145
|
-
tags: |
|
|
146
|
-
# Only version, no revision
|
|
147
|
-
type=match,pattern=v(.*)-(.*),group=1
|
|
148
|
-
# branch
|
|
149
|
-
type=ref,event=branch
|
|
150
|
-
# semver
|
|
151
|
-
type=semver,pattern={{version}}
|
|
152
|
-
- name: Build images
|
|
153
|
-
id: push
|
|
154
|
-
uses: docker/build-push-action@v6
|
|
155
|
-
with:
|
|
156
|
-
outputs: "type=registry,push=true"
|
|
157
|
-
platforms: linux/amd64,linux/arm64
|
|
158
|
-
tags: ${{ steps.meta.outputs.tags }}
|
|
159
|
-
labels: ${{ steps.meta.outputs.labels }}
|
|
160
|
-
- name: Attest Docker Hub image
|
|
161
|
-
uses: actions/attest-build-provenance@v2
|
|
162
|
-
with:
|
|
163
|
-
subject-name: index.docker.io/blinklabs/dingo
|
|
164
|
-
subject-digest: ${{ steps.push.outputs.digest }}
|
|
165
|
-
push-to-registry: true
|
|
166
|
-
- name: Attest GHCR image
|
|
167
|
-
uses: actions/attest-build-provenance@v2
|
|
168
|
-
with:
|
|
169
|
-
subject-name: ghcr.io/${{ github.repository }}
|
|
170
|
-
subject-digest: ${{ steps.push.outputs.digest }}
|
|
171
|
-
push-to-registry: true
|
|
172
|
-
# Update Docker Hub from README
|
|
173
|
-
- name: Docker Hub Description
|
|
174
|
-
uses: peter-evans/dockerhub-description@v4
|
|
175
|
-
with:
|
|
176
|
-
username: blinklabs
|
|
177
|
-
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
178
|
-
repository: blinklabs/${{ env.APPLICATION_NAME }}
|
|
179
|
-
readme-filepath: ./README.md
|
|
180
|
-
short-description: "Dingo is a Cardano blockchain data node"
|
|
181
|
-
|
|
182
|
-
finalize-release:
|
|
183
|
-
runs-on: ubuntu-latest
|
|
184
|
-
permissions:
|
|
185
|
-
contents: write
|
|
186
|
-
needs: [create-draft-release, build-binaries, build-images]
|
|
187
|
-
steps:
|
|
188
|
-
- uses: actions/github-script@v7
|
|
189
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
190
|
-
with:
|
|
191
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
192
|
-
script: |
|
|
193
|
-
try {
|
|
194
|
-
await github.rest.repos.updateRelease({
|
|
195
|
-
owner: context.repo.owner,
|
|
196
|
-
repo: context.repo.repo,
|
|
197
|
-
release_id: ${{ needs.create-draft-release.outputs.RELEASE_ID }},
|
|
198
|
-
draft: false,
|
|
199
|
-
});
|
|
200
|
-
} catch (error) {
|
|
201
|
-
core.setFailed(error.message);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
# This updates the documentation on pkg.go.dev and the latest version available via the Go module proxy
|
|
205
|
-
- name: Pull new module version
|
|
206
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
207
|
-
uses: andrewslotin/go-proxy-pull-action@v1.3.0
|
package/Dockerfile
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
FROM ghcr.io/blinklabs-io/go:1.24.2-1 AS build
|
|
2
|
-
|
|
3
|
-
WORKDIR /code
|
|
4
|
-
COPY go.* .
|
|
5
|
-
RUN go mod download
|
|
6
|
-
COPY . .
|
|
7
|
-
RUN make build
|
|
8
|
-
|
|
9
|
-
FROM ghcr.io/blinklabs-io/cardano-configs:20250213-1 AS cardano-configs
|
|
10
|
-
FROM ghcr.io/blinklabs-io/txtop:0.12.3 AS txtop
|
|
11
|
-
|
|
12
|
-
FROM debian:bookworm-slim AS dingo
|
|
13
|
-
COPY --from=build /code/dingo /bin/
|
|
14
|
-
COPY --from=cardano-configs /config/ /opt/cardano/config/
|
|
15
|
-
COPY --from=txtop /bin/txtop /usr/local/bin/
|
|
16
|
-
ENV CARDANO_CONFIG=/opt/cardano/config/preview/config.json
|
|
17
|
-
ENV CARDANO_NETWORK=preview
|
|
18
|
-
# Create database dir owned by container user
|
|
19
|
-
VOLUME /data/db
|
|
20
|
-
ENV CARDANO_DATABASE_PATH=/data/db
|
|
21
|
-
# Create socket dir owned by container user
|
|
22
|
-
VOLUME /ipc
|
|
23
|
-
ENV CARDANO_NODE_SOCKET_PATH=/ipc/dingo.socket
|
|
24
|
-
ENV CARDANO_SOCKET_PATH=/ipc/dingo.socket
|
|
25
|
-
ENTRYPOINT ["dingo"]
|
package/Makefile
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Determine root directory
|
|
2
|
-
ROOT_DIR=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
|
3
|
-
|
|
4
|
-
# Gather all .go files for use in dependencies below
|
|
5
|
-
GO_FILES=$(shell find $(ROOT_DIR) -name '*.go')
|
|
6
|
-
|
|
7
|
-
# Gather list of expected binaries
|
|
8
|
-
BINARIES=$(shell cd $(ROOT_DIR)/cmd && ls -1 | grep -v ^common)
|
|
9
|
-
|
|
10
|
-
# Extract Go module name from go.mod
|
|
11
|
-
GOMODULE=$(shell grep ^module $(ROOT_DIR)/go.mod | awk '{ print $$2 }')
|
|
12
|
-
|
|
13
|
-
# Set version strings based on git tag and current ref
|
|
14
|
-
GO_LDFLAGS=-ldflags "-s -w -X '$(GOMODULE)/internal/version.Version=$(shell git describe --tags --exact-match 2>/dev/null)' -X '$(GOMODULE)/internal/version.CommitHash=$(shell git rev-parse --short HEAD)'"
|
|
15
|
-
|
|
16
|
-
.PHONY: build mod-tidy clean format golines test
|
|
17
|
-
|
|
18
|
-
# Alias for building program binary
|
|
19
|
-
build: $(BINARIES)
|
|
20
|
-
|
|
21
|
-
# Builds and installs binary in ~/.local/bin
|
|
22
|
-
install: build
|
|
23
|
-
mkdir -p $(HOME)/.local/bin
|
|
24
|
-
mv $(BINARIES) $(HOME)/.local/bin
|
|
25
|
-
|
|
26
|
-
uninstall:
|
|
27
|
-
rm -f $(HOME)/.local/bin/$(BINARIES)
|
|
28
|
-
|
|
29
|
-
mod-tidy:
|
|
30
|
-
# Needed to fetch new dependencies and add them to go.mod
|
|
31
|
-
go mod tidy
|
|
32
|
-
|
|
33
|
-
clean:
|
|
34
|
-
rm -f $(BINARIES)
|
|
35
|
-
|
|
36
|
-
format:
|
|
37
|
-
go fmt ./...
|
|
38
|
-
gofmt -s -w $(GO_FILES)
|
|
39
|
-
|
|
40
|
-
golines:
|
|
41
|
-
golines -w --ignore-generated --chain-split-dots --max-len=80 --reformat-tags .
|
|
42
|
-
|
|
43
|
-
test: mod-tidy
|
|
44
|
-
go test -v -race ./...
|
|
45
|
-
|
|
46
|
-
# Build our program binaries
|
|
47
|
-
# Depends on GO_FILES to determine when rebuild is needed
|
|
48
|
-
$(BINARIES): mod-tidy $(GO_FILES)
|
|
49
|
-
CGO_ENABLED=0 \
|
|
50
|
-
go build \
|
|
51
|
-
$(GO_LDFLAGS) \
|
|
52
|
-
-o $(@) \
|
|
53
|
-
./cmd/$(@)
|