Skip to content

Commit

Permalink
Merge branch 'develop' into empty-active-set
Browse files Browse the repository at this point in the history
  • Loading branch information
dshulyak committed Sep 8, 2023
2 parents 15b92c3 + 430408c commit 2821625
Show file tree
Hide file tree
Showing 122 changed files with 7,983 additions and 872 deletions.
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ ignore:
- "cmd"
- "**/*_scale.go"
- "**/*mock*.go"
- "**/mocks/*.go"
- systest
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
GOTESTSUM_JUNITFILE: unit-tests.xml
run: make test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
# always run even if the previous step fails
if: always()
with:
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
GOTESTSUM_JUNITFILE: unit-tests.xml
run: make test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
# always run even if the previous step fails
if: always()
with:
Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

See [RELEASE](./RELEASE.md) for workflow instructions.

## UNRELEASED

### Upgrade information

### Highlights

### Features

* [#4969](https://github.com/spacemeshos/go-spacemesh/pull/4969) Nodes will also fetch from PoET 111 for round 3 if they were able to register to PoET 110.

### Improvements

* [#4965](https://github.com/spacemeshos/go-spacemesh/pull/4965) Updates to PoST:
* Prevent errors when shutting down the node that can result in a crash
* `postdata_metadata.json` is now updated atomically to prevent corruption of the file.

## v1.1.4

### Upgrade information
Expand All @@ -14,13 +30,13 @@ See [RELEASE](./RELEASE.md) for workflow instructions.

Replacement for original version of hare. Won't be enabled on mainnet for now.
Otherwise protocol uses significantly less traffic (atlest x20), and will allow
to set lower expected latency in the network, eventually reducing layer time.
to set lower expected latency in the network, eventually reducing layer time.

### Improvements

* [#4879](https://github.com/spacemeshos/go-spacemesh/pull/4795) Makes majority calculation weighted for optimistic filtering.
The network will start using the new algorithm at layer 18_000 (2023-09-14 20:00:00 +0000 UTC)
* [#4923](https://github.com/spacemeshos/go-spacemesh/pull/4923) Faster ballot eligibility validation. Improves sync speed.
* [#4923](https://github.com/spacemeshos/go-spacemesh/pull/4923) Faster ballot eligibility validation. Improves sync speed.
* [#4934](https://github.com/spacemeshos/go-spacemesh/pull/4934) Ensure state is synced before participating in tortoise consensus.
* [#4939](https://github.com/spacemeshos/go-spacemesh/pull/4939) Make sure to fetch data from peers that are already connected.
* [#4936](https://github.com/spacemeshos/go-spacemesh/pull/4936) Use correct hare active set after node was synced. Otherwise applied layer may lag slightly behind the rest.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ install:
go mod download
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.53.3
go install github.com/spacemeshos/go-scale/scalegen@v1.1.10
go install github.com/golang/mock/mockgen
go install go.uber.org/mock/mockgen@v0.2.0
go install gotest.tools/gotestsum@v1.10.0
go install honnef.co/go/tools/cmd/staticcheck@v0.4.3
.PHONY: install
Expand Down
11 changes: 8 additions & 3 deletions activation/activation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/spacemeshos/post/shared"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"

Expand Down Expand Up @@ -385,7 +385,7 @@ func TestBuilder_StartSmeshing_PanicsOnErrInStartSession(t *testing.T) {

l := log.NewMockLogger(gomock.NewController(t))
panicCalled := make(chan struct{})
l.EXPECT().Panic(gomock.Any(), gomock.Any()).Do(func(_, _ any) {
l.EXPECT().Panic(gomock.Any(), gomock.Any()).Do(func(string, ...any) {
close(panicCalled)
})
tab := newTestBuilder(t)
Expand Down Expand Up @@ -509,7 +509,12 @@ func TestBuilder_Loop_WaitsOnStaleChallenge(t *testing.T) {

ctx, cancel := context.WithCancel(context.Background())
defer cancel()
tab.mclock.EXPECT().AwaitLayer(currLayer.Add(1)).Do(func(got types.LayerID) { cancel() })
tab.mclock.EXPECT().AwaitLayer(currLayer.Add(1)).Do(func(got types.LayerID) <-chan struct{} {
cancel()
ch := make(chan struct{})
close(ch)
return ch
})

// Act & Verify
var eg errgroup.Group
Expand Down
2 changes: 1 addition & 1 deletion activation/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/spacemeshos/merkle-tree"
poetShared "github.com/spacemeshos/poet/shared"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/spacemeshos/go-spacemesh/codec"
"github.com/spacemeshos/go-spacemesh/common/types"
Expand Down
2 changes: 1 addition & 1 deletion activation/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/spacemeshos/go-spacemesh/common/types"
)

//go:generate mockgen -package=activation -destination=./mocks.go -source=./interface.go
//go:generate mockgen -typed -package=activation -destination=./mocks.go -source=./interface.go

type AtxReceiver interface {
OnAtx(*types.ActivationTxHeader)
Expand Down

0 comments on commit 2821625

Please sign in to comment.