Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 3b843f6

Browse files
committed
Merge branch 'develop' into test-scenario
2 parents a29a425 + 6d2857a commit 3b843f6

File tree

38 files changed

+198
-171
lines changed

38 files changed

+198
-171
lines changed

.github/workflows/feature-network-deploy.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
branches:
55
- develop
66
workflow_dispatch:
7-
inputs:
8-
snapshotUrl:
9-
description: 'Custom snapshot URL:'
10-
required: false
11-
default: ""
127

138
concurrency:
149
group: feature-network-deploy-group
@@ -62,13 +57,6 @@ jobs:
6257
working-directory: tools/genesis-snapshot
6358
run: go run -tags=rocksdb . --config feature --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih --filename genesis-snapshot.bin
6459

65-
- name: Upload snapshot
66-
id: upload-snapshot
67-
run: |
68-
SNAPSHOT_URL=$(curl -T ./tools/genesis-snapshot/genesis-snapshot.bin https://transfer.sh)
69-
echo "Snapshot URL: $SNAPSHOT_URL"
70-
echo "snapshot_url=$SNAPSHOT_URL" >> $GITHUB_OUTPUT
71-
7260
- # Temp fix
7361
# https://github.com/docker/build-push-action/issues/252
7462
# https://github.com/moby/buildkit/issues/1896
@@ -92,8 +80,6 @@ jobs:
9280
9381
- name: Ansible deploy
9482
env:
95-
CUSTOM_SNAPSHOT_URL: '${{ github.event.inputs.snapshotUrl }}'
96-
DEFAULT_SNAPSHOT_URL: '${{ steps.upload-snapshot.outputs.snapshot_url }}'
9783
NETWORK_ENVIRONMENT: '${{ secrets.NETWORK_ENVIRONMENT }}'
9884
IOTA_CORE_DOCKER_IMAGE_REPO: 'iotaledger/iota-core'
9985
IOTA_CORE_DOCKER_IMAGE_TAG: 'feature'

components/app/app.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
dashboardmetrics "github.com/iotaledger/iota-core/components/dashboard_metrics"
1212
"github.com/iotaledger/iota-core/components/debugapi"
1313
"github.com/iotaledger/iota-core/components/inx"
14-
"github.com/iotaledger/iota-core/components/metrics"
1514
"github.com/iotaledger/iota-core/components/metricstracker"
1615
"github.com/iotaledger/iota-core/components/p2p"
16+
"github.com/iotaledger/iota-core/components/prometheus"
1717
"github.com/iotaledger/iota-core/components/protocol"
1818
"github.com/iotaledger/iota-core/components/restapi"
1919
coreapi "github.com/iotaledger/iota-core/components/restapi/core"
@@ -25,7 +25,7 @@ var (
2525
Name = "iota-core"
2626

2727
// Version of the app.
28-
Version = "1.0.0-alpha.1"
28+
Version = "1.0.0-alpha.2"
2929
)
3030

3131
func App() *app.App {
@@ -49,7 +49,7 @@ Command line flags:
4949
protocol.Component,
5050
dashboardmetrics.Component,
5151
dashboard.Component,
52-
metrics.Component,
52+
prometheus.Component,
5353
inx.Component,
5454
),
5555
)

components/debugapi/component.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ func configure() error {
7979
blocksPerSlot = shrinkingmap.New[iotago.SlotIndex, []*blocks.Block]()
8080
blocksPrunableStorage = prunable.NewBucketManager(database.Config{
8181
Engine: hivedb.EngineRocksDB,
82-
Directory: ParamsDebugAPI.Path,
82+
Directory: ParamsDebugAPI.Database.Path,
8383

8484
Version: 1,
8585
PrefixHealth: []byte{debugPrefixHealth},
8686
}, func(err error) {
8787
Component.LogWarnf(">> DebugAPI Error: %s\n", err)
88-
}, prunable.WithMaxOpenDBs(ParamsDebugAPI.MaxOpenDBs),
88+
}, prunable.WithMaxOpenDBs(ParamsDebugAPI.Database.MaxOpenDBs),
8989
)
9090

9191
routeGroup := deps.RestRouteManager.AddRoute("debug/v2")
@@ -98,7 +98,7 @@ func configure() error {
9898

9999
deps.Protocol.Events.Engine.SlotGadget.SlotFinalized.Hook(func(index iotago.SlotIndex) {
100100
epoch := deps.Protocol.APIForSlot(index).TimeProvider().EpochFromSlot(index)
101-
if epoch < iotago.EpochIndex(ParamsDebugAPI.PruningThreshold) {
101+
if epoch < iotago.EpochIndex(ParamsDebugAPI.Database.Pruning.Threshold) {
102102
return
103103
}
104104

@@ -107,7 +107,7 @@ func configure() error {
107107
lastPruned++
108108
}
109109

110-
for i := lastPruned; i < epoch-iotago.EpochIndex(ParamsDebugAPI.PruningThreshold); i++ {
110+
for i := lastPruned; i < epoch-iotago.EpochIndex(ParamsDebugAPI.Database.Pruning.Threshold); i++ {
111111
if err := blocksPrunableStorage.Prune(i); err != nil {
112112
Component.LogWarnf(">> DebugAPI Error: %s\n", err)
113113
}

components/debugapi/params.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ type ParametersDebugAPI struct {
99
// Enabled whether the DebugAPI component is enabled.
1010
Enabled bool `default:"true" usage:"whether the DebugAPI component is enabled"`
1111

12-
Path string `default:"testnet/debug" usage:"the path to the database folder"`
13-
MaxOpenDBs int `default:"2" usage:"maximum number of open database instances"`
14-
PruningThreshold uint64 `default:"1" usage:"how many epochs should be retained"`
15-
DBGranularity int64 `default:"100" usage:"how many slots should be contained in a single DB instance"`
12+
Database struct {
13+
Path string `default:"testnet/debug" usage:"the path to the database folder"`
14+
MaxOpenDBs int `default:"2" usage:"maximum number of open database instances"`
15+
Granularity int64 `default:"100" usage:"how many slots should be contained in a single DB instance"`
16+
Pruning struct {
17+
Threshold uint64 `default:"1" usage:"how many epochs should be retained"`
18+
}
19+
} `name:"db"`
1620
}
1721

1822
// ParamsDebugAPI is the default configuration parameters for the DebugAPI component.

components/p2p/params.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const (
1313
// ParametersP2P contains the definition of configuration parameters used by the p2p plugin.
1414
type ParametersP2P struct {
1515
// BindAddress defines on which multi addresses the p2p service should listen on.
16-
BindMultiAddresses []string `default:"/ip4/0.0.0.0/tcp/14666,/ip6/::/tcp/14666" usage:"the bind multi addresses for p2p connections"`
16+
BindMultiAddresses []string `default:"/ip4/0.0.0.0/tcp/15600,/ip6/::/tcp/15600" usage:"the bind multi addresses for p2p connections"`
1717

1818
ConnectionManager struct {
1919
// Defines the high watermark to use within the connection manager.

components/metrics/component.go renamed to components/prometheus/component.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package metrics
1+
package prometheus
22

3-
// metrics is the plugin instance responsible for collection of prometheus metrics.
3+
// prometheus is the plugin instance responsible for collection of prometheus metrics.
44
// All metrics should be defined in metrics_namespace.go files with different namespace for each new collection.
55
// Metrics naming should follow the guidelines from: https://prometheus.io/docs/practices/naming/
66
// In short:
@@ -22,14 +22,14 @@ import (
2222

2323
"github.com/iotaledger/hive.go/app"
2424
"github.com/iotaledger/hive.go/ierrors"
25-
"github.com/iotaledger/iota-core/components/metrics/collector"
25+
"github.com/iotaledger/iota-core/components/prometheus/collector"
2626
"github.com/iotaledger/iota-core/pkg/daemon"
2727
"github.com/iotaledger/iota-core/pkg/protocol"
2828
)
2929

3030
func init() {
3131
Component = &app.Component{
32-
Name: "Metrics",
32+
Name: "Prometheus",
3333
DepsFunc: func(cDeps dependencies) { deps = cDeps },
3434
Params: params,
3535
Run: run,

components/metrics/metrics_accounts.go renamed to components/prometheus/metrics_accounts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package metrics
1+
package prometheus
22

33
import (
44
"time"
55

66
"github.com/iotaledger/hive.go/runtime/event"
7-
"github.com/iotaledger/iota-core/components/metrics/collector"
7+
"github.com/iotaledger/iota-core/components/prometheus/collector"
88
"github.com/iotaledger/iota-core/pkg/protocol/engine/blocks"
99
)
1010

0 commit comments

Comments
 (0)