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

Commit 5714ec3

Browse files
committed
Merge branch 'develop' into feat/validator-tipset
2 parents cddc16f + c91cb76 commit 5714ec3

File tree

95 files changed

+2673
-1009
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2673
-1009
lines changed

.github/workflows/build_docker.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
paths:
66
- "Dockerfile"
7+
push:
8+
branches:
9+
- develop
710

811
jobs:
912
build:

.github/workflows/docker-network-health.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- '!scripts/**'
1010
- '!tools/**'
1111
- 'tools/genesis-snapshot/**'
12+
push:
13+
branches:
14+
- develop
1215

1316
concurrency:
1417
group: run-and-check-group

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

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Feature network deploy
22
on:
3-
push:
4-
branches:
5-
- develop
63
workflow_dispatch:
74

85
concurrency:
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Unit tests nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 5 * * *' # Runs every day at 5 AM
6+
workflow_dispatch:
7+
8+
jobs:
9+
unit-tests-with-log:
10+
name: Unit tests with log nightly
11+
runs-on: self-hosted
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version-file: 'go.mod'
19+
cache: false
20+
21+
- name: Print Go version
22+
run: go version
23+
24+
- name: Run unit tests with logger (level trace)
25+
run: |
26+
CI_UNIT_TESTS_LOG_LEVEL=trace go test ./... -tags rocksdb -count=5 -race -short -timeout 120m
27+
28+
unit-tests-without-log:
29+
name: Unit tests without log nightly
30+
runs-on: self-hosted
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- uses: actions/setup-go@v5
36+
with:
37+
go-version-file: 'go.mod'
38+
cache: false
39+
40+
- name: Print Go version
41+
run: go version
42+
43+
- name: Run unit tests without logger
44+
run: |
45+
CI_UNIT_NO_LOG=1 go test ./... -tags rocksdb -count=5 -race -short -timeout 120m

.github/workflows/unit-test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
paths-ignore:
66
- 'documentation/**'
7+
push:
8+
branches:
9+
- develop
710

811
jobs:
912
unit-tests:

README.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@ IOTA-Core is the node software for the upcoming IOTA 2.0 protocol.
44

55
---
66
![GitHub Release (latest by date)](https://img.shields.io/github/v/release/iotaledger/iota-core)
7-
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/iotaledger/iota-core)
8-
![GitHub License](https://img.shields.io/github/license/iotaledger/iota-core)
9-
---
10-
[![build_docker](https://github.com/iotaledger/iota-core/actions/workflows/build_docker.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/build_docker.yml)
11-
[![build_tools](https://github.com/iotaledger/iota-core/actions/workflows/build_tools.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/build_tools.yml)
12-
[![docker-network-health](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-health.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-health.yml)
13-
[![docker-network-tests-nightly](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-tests-nightly.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-tests-nightly.yml)
14-
[![golangci-lint](https://github.com/iotaledger/iota-core/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/golangci-lint.yml)
15-
[![release](https://github.com/iotaledger/iota-core/actions/workflows/release.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/release.yml)
16-
[![unit-test](https://github.com/iotaledger/iota-core/actions/workflows/unit-test.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/unit-test.yml)
7+
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/iotaledger/iota-core?branch=develop)
8+
![GitHub License](https://img.shields.io/github/license/iotaledger/iota-core?branch=develop)
179
---
10+
[![unit-test](https://github.com/iotaledger/iota-core/actions/workflows/unit-test.yml/badge.svg?branch=develop)](https://github.com/iotaledger/iota-core/actions/workflows/unit-test.yml)
11+
[![unit-test-nightly](https://github.com/iotaledger/iota-core/actions/workflows/unit-test-nightly.yml/badge.svg?branch=develop)](https://github.com/iotaledger/iota-core/actions/workflows/unit-test-nightly.yml)
12+
[![build_docker](https://github.com/iotaledger/iota-core/actions/workflows/build_docker.yml/badge.svg?branch=develop)](https://github.com/iotaledger/iota-core/actions/workflows/build_docker.yml)
13+
[![docker-network-health](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-health.yml/badge.svg?branch=develop)](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-health.yml)
14+
[![docker-network-tests-nightly](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-tests-nightly.yml/badge.svg?branch=develop)](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-tests-nightly.yml)
1815

1916
In this repository you will find the following branches:
2017

2118
- `production`: this branch contains the latest released code targeted for the [IOTA mainnet](https://iota.org)
22-
- `staging`: this branch contains the latest released code targeted for the [shimmer network](https://shimmer.network)
19+
- `staging`: this branch contains the latest released code targeted for the [Shimmer network](https://shimmer.network)
2320
- `develop`: default branch where all development will get merged to. This represents the next iteration of the node.
2421

2522
## Notes

components/app/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
Name = "iota-core"
2626

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

3131
func App() *app.App {

components/debugapi/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
//nolint:unparam // we have no error case right now
1111
func validatorsSummary() (*ValidatorsSummaryResponse, error) {
1212
seatManager := deps.Protocol.Engines.Main.Get().SybilProtection.SeatManager()
13-
latestSlotIndex := deps.Protocol.Engines.Main.Get().Storage.Settings().LatestCommitment().Slot()
13+
latestSlotIndex := deps.Protocol.Engines.Main.Get().SyncManager.LatestCommitment().Slot()
1414
latestCommittee, exists := seatManager.CommitteeInSlot(latestSlotIndex)
1515
if !exists {
1616
return nil, ierrors.Errorf("committee for slot %d was not selected", latestSlotIndex)

components/inx/server_utxo.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func NewLedgerUpdateBatchOperationConsumed(spent *utxoledger.Spent) (*inx.Ledger
134134
func (s *Server) ReadOutput(_ context.Context, id *inx.OutputId) (*inx.OutputResponse, error) {
135135
engine := deps.Protocol.Engines.Main.Get()
136136

137-
latestCommitment := engine.Storage.Settings().LatestCommitment()
137+
latestCommitment := engine.SyncManager.LatestCommitment()
138138

139139
outputID := id.Unwrap()
140140

@@ -172,7 +172,7 @@ func (s *Server) ReadOutput(_ context.Context, id *inx.OutputId) (*inx.OutputRes
172172

173173
func (s *Server) ReadUnspentOutputs(_ *inx.NoParams, srv inx.INX_ReadUnspentOutputsServer) error {
174174
engine := deps.Protocol.Engines.Main.Get()
175-
latestCommitment := engine.Storage.Settings().LatestCommitment()
175+
latestCommitment := engine.SyncManager.LatestCommitment()
176176

177177
var innerErr error
178178
err := engine.Ledger.ForEachUnspentOutput(func(output *utxoledger.Output) bool {

components/protocol/component.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func configure() error {
277277
Component.LogDebugf("SlotCommitmentReceived: %s", commitment.ID())
278278
})
279279

280-
deps.Protocol.Events.Engine.SybilProtection.CommitteeSelected.Hook(func(committee *account.Accounts, epoch iotago.EpochIndex) {
280+
deps.Protocol.Events.Engine.SybilProtection.CommitteeSelected.Hook(func(committee *account.SeatedAccounts, epoch iotago.EpochIndex) {
281281
Component.LogInfof("CommitteeSelected, epoch: %d, committeeIDs: %s, reused: %t", epoch, committee.IDs(), committee.IsReused())
282282
})
283283

components/restapi/core/accounts.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,9 @@ func selectedCommittee(c echo.Context) (*api.CommitteeResponse, error) {
269269
// by default we return current epoch
270270
slot = timeProvider.SlotFromTime(time.Now())
271271
epoch = timeProvider.EpochFromSlot(slot)
272-
} else {
273-
slot = timeProvider.EpochEnd(epoch)
274272
}
275273

276-
seatedAccounts, exists := deps.Protocol.Engines.Main.Get().SybilProtection.SeatManager().CommitteeInSlot(slot)
274+
seatedAccounts, exists := deps.Protocol.Engines.Main.Get().SybilProtection.SeatManager().CommitteeInEpoch(epoch)
277275
if !exists {
278276
return &api.CommitteeResponse{
279277
Epoch: epoch,

components/restapi/core/component.go

-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package core
22

33
import (
44
"net/http"
5-
"strings"
65

76
"github.com/labstack/echo/v4"
87
"go.uber.org/dig"
@@ -33,8 +32,6 @@ func init() {
3332
var (
3433
Component *app.Component
3534
deps dependencies
36-
37-
features = []string{}
3835
)
3936

4037
type dependencies struct {
@@ -316,11 +313,6 @@ func configure() error {
316313
return nil
317314
}
318315

319-
// AddFeature adds a feature to the RouteInfo endpoint.
320-
func AddFeature(feature string) {
321-
features = append(features, strings.ToLower(feature))
322-
}
323-
324316
func checkNodeSynced() echo.MiddlewareFunc {
325317
return func(next echo.HandlerFunc) echo.HandlerFunc {
326318
return func(c echo.Context) error {

components/restapi/core/node.go

-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,5 @@ func info() *api.InfoResponse {
5353
Subunit: deps.BaseToken.Subunit,
5454
Decimals: deps.BaseToken.Decimals,
5555
},
56-
Features: features,
5756
}
5857
}

components/restapi/management/snapshots.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/iotaledger/iota.go/v4/api"
77
)
88

9-
func createSnapshots(_ echo.Context) (*api.CreateSnapshotsResponse, error) {
9+
func createSnapshots(_ echo.Context) (*api.CreateSnapshotResponse, error) {
1010
/*
1111
if deps.SnapshotManager.IsSnapshotting() || deps.PruningManager.IsPruning() {
1212
return nil, errors.WithMessage(echo.ErrServiceUnavailable, "node is already creating a snapshot or pruning is running")

0 commit comments

Comments
 (0)