@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.
Files changed (192) hide show
  1. package/README.md +2 -1
  2. package/{bin/dingo → dingo} +0 -0
  3. package/dingo.yaml.example +53 -0
  4. package/package.json +2 -2
  5. package/.github/CODEOWNERS +0 -5
  6. package/.github/assets/dingo-ate-my-blockchain.png +0 -0
  7. package/.github/assets/dingo-illustration.png +0 -0
  8. package/.github/assets/dingo-logo-with-text-horizontal.png +0 -0
  9. package/.github/assets/dingo-logo-with-text.png +0 -0
  10. package/.github/dependabot.yml +0 -19
  11. package/.github/dingo-20241210.png +0 -0
  12. package/.github/dingo.md +0 -56
  13. package/.github/workflows/ci-docker.yml +0 -36
  14. package/.github/workflows/conventional-commits.yml +0 -17
  15. package/.github/workflows/go-test.yml +0 -29
  16. package/.github/workflows/golangci-lint.yml +0 -23
  17. package/.github/workflows/publish.yml +0 -207
  18. package/Dockerfile +0 -25
  19. package/Makefile +0 -53
  20. package/blockfetch.go +0 -144
  21. package/chain/chain.go +0 -504
  22. package/chain/chain_test.go +0 -468
  23. package/chain/errors.go +0 -80
  24. package/chain/event.go +0 -33
  25. package/chain/iter.go +0 -64
  26. package/chainsync/chainsync.go +0 -97
  27. package/chainsync.go +0 -223
  28. package/cmd/dingo/load.go +0 -52
  29. package/cmd/dingo/main.go +0 -118
  30. package/cmd/dingo/serve.go +0 -49
  31. package/config/cardano/node.go +0 -192
  32. package/config/cardano/node_test.go +0 -85
  33. package/config/cardano/preview/README.md +0 -4
  34. package/config/cardano/preview/alonzo-genesis.json +0 -196
  35. package/config/cardano/preview/byron-genesis.json +0 -117
  36. package/config/cardano/preview/config.json +0 -114
  37. package/config/cardano/preview/conway-genesis.json +0 -297
  38. package/config/cardano/preview/shelley-genesis.json +0 -68
  39. package/config.go +0 -245
  40. package/connmanager/connection_manager.go +0 -105
  41. package/connmanager/connection_manager_test.go +0 -185
  42. package/connmanager/event.go +0 -37
  43. package/connmanager/listener.go +0 -140
  44. package/connmanager/outbound.go +0 -93
  45. package/connmanager/socket.go +0 -55
  46. package/connmanager/unix.go +0 -78
  47. package/custom-p2p-topology.json +0 -24
  48. package/custom-p2p-topology.json.backup +0 -24
  49. package/custom-p2p-topology.json.mainnet +0 -37
  50. package/database/account.go +0 -180
  51. package/database/block.go +0 -362
  52. package/database/certs.go +0 -53
  53. package/database/commit_timestamp.go +0 -77
  54. package/database/database.go +0 -118
  55. package/database/database_test.go +0 -62
  56. package/database/drep.go +0 -47
  57. package/database/epoch.go +0 -121
  58. package/database/immutable/chunk.go +0 -182
  59. package/database/immutable/immutable.go +0 -350
  60. package/database/immutable/immutable_test.go +0 -59
  61. package/database/immutable/primary.go +0 -106
  62. package/database/immutable/secondary.go +0 -103
  63. package/database/immutable/testdata/08893.chunk +0 -0
  64. package/database/immutable/testdata/08893.primary +0 -0
  65. package/database/immutable/testdata/08893.secondary +0 -0
  66. package/database/immutable/testdata/08894.chunk +0 -0
  67. package/database/immutable/testdata/08894.primary +0 -0
  68. package/database/immutable/testdata/08894.secondary +0 -0
  69. package/database/immutable/testdata/README.md +0 -4
  70. package/database/plugin/blob/badger/commit_timestamp.go +0 -50
  71. package/database/plugin/blob/badger/database.go +0 -152
  72. package/database/plugin/blob/badger/logger.go +0 -63
  73. package/database/plugin/blob/badger/metrics.go +0 -98
  74. package/database/plugin/blob/blob.go +0 -19
  75. package/database/plugin/blob/store.go +0 -40
  76. package/database/plugin/log.go +0 -27
  77. package/database/plugin/metadata/metadata.go +0 -19
  78. package/database/plugin/metadata/sqlite/account.go +0 -313
  79. package/database/plugin/metadata/sqlite/certs.go +0 -58
  80. package/database/plugin/metadata/sqlite/commit_timestamp.go +0 -68
  81. package/database/plugin/metadata/sqlite/database.go +0 -218
  82. package/database/plugin/metadata/sqlite/drep.go +0 -140
  83. package/database/plugin/metadata/sqlite/epoch.go +0 -120
  84. package/database/plugin/metadata/sqlite/models/account.go +0 -118
  85. package/database/plugin/metadata/sqlite/models/auth_committee_hot.go +0 -26
  86. package/database/plugin/metadata/sqlite/models/drep.go +0 -52
  87. package/database/plugin/metadata/sqlite/models/epoch.go +0 -31
  88. package/database/plugin/metadata/sqlite/models/models.go +0 -46
  89. package/database/plugin/metadata/sqlite/models/pool.go +0 -97
  90. package/database/plugin/metadata/sqlite/models/pparam_update.go +0 -27
  91. package/database/plugin/metadata/sqlite/models/pparams.go +0 -27
  92. package/database/plugin/metadata/sqlite/models/resign_committee_cold.go +0 -27
  93. package/database/plugin/metadata/sqlite/models/stake_vote_delegation.go +0 -27
  94. package/database/plugin/metadata/sqlite/models/tip.go +0 -26
  95. package/database/plugin/metadata/sqlite/models/update_drep.go +0 -27
  96. package/database/plugin/metadata/sqlite/models/utxo.go +0 -30
  97. package/database/plugin/metadata/sqlite/models/vote_delegation.go +0 -26
  98. package/database/plugin/metadata/sqlite/models/vote_registration_delegation.go +0 -15
  99. package/database/plugin/metadata/sqlite/pool.go +0 -240
  100. package/database/plugin/metadata/sqlite/pparams.go +0 -110
  101. package/database/plugin/metadata/sqlite/tip.go +0 -83
  102. package/database/plugin/metadata/sqlite/utxo.go +0 -292
  103. package/database/plugin/metadata/store.go +0 -198
  104. package/database/plugin/option.go +0 -190
  105. package/database/plugin/plugin.go +0 -20
  106. package/database/plugin/register.go +0 -118
  107. package/database/pparams.go +0 -145
  108. package/database/tip.go +0 -45
  109. package/database/txn.go +0 -147
  110. package/database/types/types.go +0 -74
  111. package/database/types/types_test.go +0 -83
  112. package/database/utxo.go +0 -263
  113. package/dist/artifacts.json +0 -1
  114. package/dist/checksums.txt +0 -22
  115. package/dist/config.yaml +0 -253
  116. package/dist/dingo-0.5.0-SNAPSHOT-d9431e4.tar.gz +0 -0
  117. package/dist/dingo-0.5.0-SNAPSHOT-d9431e4.tar.gz.sbom.json +0 -1
  118. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_arm64.tar.gz +0 -0
  119. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_arm64.tar.gz.sbom.json +0 -1
  120. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_x86_64.tar.gz +0 -0
  121. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_x86_64.tar.gz.sbom.json +0 -1
  122. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.apk +0 -0
  123. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.apk.sbom.json +0 -1
  124. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.deb +0 -0
  125. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.deb.sbom.json +0 -1
  126. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.rpm +0 -0
  127. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.rpm.sbom.json +0 -1
  128. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.apk +0 -0
  129. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.apk.sbom.json +0 -1
  130. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.deb +0 -0
  131. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.deb.sbom.json +0 -1
  132. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.rpm +0 -0
  133. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.rpm.sbom.json +0 -1
  134. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.tar.gz +0 -0
  135. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.tar.gz.sbom.json +0 -1
  136. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_x86_64.tar.gz +0 -0
  137. package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_x86_64.tar.gz.sbom.json +0 -1
  138. package/dist/dingo_darwin_amd64_v1/dingo +0 -0
  139. package/dist/dingo_darwin_arm64_v8.0/dingo +0 -0
  140. package/dist/dingo_linux_amd64_v1/dingo +0 -0
  141. package/dist/dingo_linux_arm64_v8.0/dingo +0 -0
  142. package/dist/homebrew/dingo.rb +0 -51
  143. package/dist/metadata.json +0 -1
  144. package/event/event.go +0 -141
  145. package/event/event_test.go +0 -115
  146. package/event/metrics.go +0 -44
  147. package/go.mod +0 -98
  148. package/go.sum +0 -358
  149. package/internal/config/config.go +0 -145
  150. package/internal/config/config_test.go +0 -118
  151. package/internal/node/load.go +0 -149
  152. package/internal/node/node.go +0 -176
  153. package/internal/version/version.go +0 -33
  154. package/ledger/certs.go +0 -164
  155. package/ledger/chainsync.go +0 -504
  156. package/ledger/delta.go +0 -99
  157. package/ledger/eras/allegra.go +0 -154
  158. package/ledger/eras/alonzo.go +0 -156
  159. package/ledger/eras/babbage.go +0 -154
  160. package/ledger/eras/byron.go +0 -42
  161. package/ledger/eras/conway.go +0 -166
  162. package/ledger/eras/eras.go +0 -44
  163. package/ledger/eras/mary.go +0 -154
  164. package/ledger/eras/shelley.go +0 -164
  165. package/ledger/error.go +0 -19
  166. package/ledger/event.go +0 -50
  167. package/ledger/metrics.go +0 -53
  168. package/ledger/queries.go +0 -258
  169. package/ledger/slot.go +0 -127
  170. package/ledger/slot_test.go +0 -147
  171. package/ledger/state.go +0 -821
  172. package/ledger/view.go +0 -73
  173. package/localstatequery.go +0 -50
  174. package/localtxmonitor.go +0 -44
  175. package/localtxsubmission.go +0 -52
  176. package/mempool/consumer.go +0 -98
  177. package/mempool/mempool.go +0 -322
  178. package/node.go +0 -320
  179. package/peergov/event.go +0 -27
  180. package/peergov/peer.go +0 -67
  181. package/peergov/peergov.go +0 -290
  182. package/peersharing.go +0 -70
  183. package/preview-local-topology.json +0 -23
  184. package/topology/topology.go +0 -69
  185. package/topology/topology_test.go +0 -179
  186. package/tracing.go +0 -65
  187. package/txsubmission.go +0 -233
  188. package/utxorpc/query.go +0 -311
  189. package/utxorpc/submit.go +0 -395
  190. package/utxorpc/sync.go +0 -276
  191. package/utxorpc/utxorpc.go +0 -166
  192. package/utxorpc/watch.go +0 -310
package/README.md CHANGED
@@ -19,9 +19,10 @@
19
19
 
20
20
  ## Running
21
21
 
22
- Dingo does not support a configuration file of its own and uses environment
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`
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.7.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": {
@@ -1,5 +0,0 @@
1
- # Blink Labs
2
- #
3
- * @blinklabs-io/core
4
- *.md @blinklabs-io/core @blinklabs-io/docs @blinklabs-io/pms
5
- LICENSE @blinklabs-io/core @blinklabs-io/pms
@@ -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/$(@)