Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ee9fbe1
New feature 25 "Deterministic Finality and Ride V9" added.
alexeykiselev Sep 22, 2025
547e9da
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Sep 24, 2025
bb070a1
Added bls signature methods (#1812)
esuwu Sep 29, 2025
59507b9
Added block finality schemas (#1833)
esuwu Sep 29, 2025
95c9e0f
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Sep 30, 2025
c01d622
Ride version 9 added. (#1761)
alexeykiselev Sep 30, 2025
7273f85
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Sep 30, 2025
29fdea9
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Oct 6, 2025
f33a9d2
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Oct 10, 2025
4bf39f1
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Oct 10, 2025
bb7402c
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Oct 15, 2025
72ac0fe
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Oct 15, 2025
c5d3bd5
Protobuf schemas updated to support CommitToGeneration transaction sn…
alexeykiselev Oct 15, 2025
af84eee
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Oct 29, 2025
f201259
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Nov 1, 2025
5ace672
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Nov 5, 2025
6997f12
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Nov 6, 2025
b815c4e
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Nov 18, 2025
46dba65
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Nov 20, 2025
0ee716d
Protobuf schemas submodule updated to the latest commit.
alexeykiselev Nov 21, 2025
b5ccda4
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Nov 25, 2025
68ff378
Restore -exclude-generated flag for gosec.
alexeykiselev Nov 25, 2025
c60d6cf
Merged from master
esuwu Dec 4, 2025
9526746
Merged from master
esuwu Dec 4, 2025
dc5359b
Returned exclude generated
esuwu Dec 4, 2025
999363d
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 5, 2025
caae0de
Merge branch 'master' into determenistic-finality-feature
nickeskov Dec 9, 2025
ecf096f
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 10, 2025
7b47f39
Protobuf code regenerated.
alexeykiselev Dec 10, 2025
a4c2fb9
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 11, 2025
d4f42cf
Protobuf schemas updated and code regenerated.
alexeykiselev Dec 15, 2025
6149756
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 15, 2025
099db31
Merge branch 'master' into determenistic-finality-feature
nickeskov Dec 15, 2025
1463fa0
Add commit to generation transaction (#1841)
alexeykiselev Dec 16, 2025
8d9c3fd
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 16, 2025
87af3f3
Add generation balance validation (#1938)
alexeykiselev Dec 16, 2025
6c8360e
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 17, 2025
9320382
Fix semgrep issues (#1946)
alexeykiselev Dec 17, 2025
56620d6
Fix generation commitment atomic snapshot JSON representation. (#1949)
nickeskov Dec 18, 2025
8377e30
Fix generation commitment atomic atomic snapshot from protobuf (#1950)
nickeskov Dec 18, 2025
f814f38
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 18, 2025
7284746
Add commit to generation transaction to ride v9 (#1953)
alexeykiselev Dec 29, 2025
a11e5aa
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Dec 29, 2025
ee8babd
Fix gosec issues. Original errors wrapped.
alexeykiselev Dec 29, 2025
3f4519f
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Jan 19, 2026
dbf124b
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Jan 19, 2026
5f2e490
Backport missing LibV9 switch branches from PR #1957. (#1967)
alexeykiselev Jan 26, 2026
eae7196
Scala-compatible way of BLS keys generation added. (#1971)
alexeykiselev Jan 27, 2026
4b5b1b7
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Feb 5, 2026
bf284d7
P-256 signature verification with Ride V9 (#1957)
nickeskov Feb 9, 2026
62bedbe
Go version updated to 1.25. (#1985)
alexeykiselev Feb 10, 2026
f1fafa1
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Feb 14, 2026
4881ec9
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Feb 16, 2026
1396934
Complexities of SHA256 functions updated for RideV9. (#1990)
alexeykiselev Feb 16, 2026
ec904d4
Support Finality and Block Endorsements (#1852)
esuwu Feb 17, 2026
b8f32c6
Merge branch 'master' into determenistic-finality-feature
alexeykiselev Feb 19, 2026
705cc5c
Added the lower bound finalization calculation, even if finalization …
esuwu Feb 20, 2026
22dd0f3
Cleared endorsement pool caches for rollbacks
esuwu Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
with:
persist-credentials: false

- name: Set up Go 1.24
- name: Set up Go 1.25
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ jobs:
fetch-tags: true
persist-credentials: false

- name: Set up Go 1.24
- name: Set up Go 1.25
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: true

Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Set up Go 1.24
- name: Set up Go 1.25
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: false # don't save & restore build caches because golangci-lint action does it internally

Expand All @@ -46,12 +46,19 @@ jobs:
with:
version: latest
args: -c .golangci.yml

# Strict linter configuration, only checking new code from pull requests.
- name: golangci-lint-strict
run: golangci-lint run -c .golangci-strict.yml --new-from-rev=origin/master

# Check for modern Go code patterns
- name: modernize check
run: go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.20.0 ./...
- name: Run modernize
shell: bash
run: |
set +o pipefail
go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest ./... 2>&1 | \
grep -vE '\.(pb|gen)\.go|mock|_string.go|^exit status|^go: downloading' | \
{ output=$(cat); [ -n "$output" ] && { echo "$output"; exit 1; } || exit 0; }

build:
name: ubuntu
Expand All @@ -65,10 +72,10 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Set up Go 1.24
- name: Set up Go 1.25
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Set up Go 1.24
- name: Set up Go 1.25
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: false

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_itests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
with:
persist-credentials: false

- name: Set up Go 1.24
- name: Set up Go 1.25
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: true
id: go
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
uses: securego/gosec@398ad549bbf1a51dc978fd966169f660c59774de # v2.23.0
with:
# with '-no-fail' we let the report trigger content trigger a failure using the GitHub Security features.
args: "-no-fail -fmt sarif -out gosec.sarif ./..."
args: "-no-fail -exclude-generated -fmt sarif -out gosec.sarif ./..."
- name: Transform gosec SARIF to meet SARIF 2.1.0 schema requirements
# Produces SARIF file has two incompatibilities with SARIF 2.1.0 schema all of them are in `fixes` object:
# 1. Field `description` contains only `markdown` property, but `text` property is mandatory.
# 2. Property `artifactChanges` must be non-empty array with valid `artifactChange` object.
# To fix those issues the first part of jq query copies content of `markdown` field into `text` field
# if it's not present. In the second part if the `fixes` object has null array as `artifactChanges` the empty
# valid `artifactChange` object inserted.
# After fix of mentioned gosec issues this step can be removed.
# After fix of mentioned gosec issues this step can be removed.
run: |
set -e
jq 'walk(if type=="object" and has("markdown") and (.text == null or .text == "") then .text = .markdown else . end) | (.runs[].results[]? .fixes[]? .artifactChanges) |= (if . == null then [{"artifactLocation": { "uri": "" }, "replacements": [{"deletedRegion": {"byteOffset": 0, "byteLength": 0 }}]}] else . end)' gosec.sarif > gosec_fixed.sarif
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.24.x
go-version: 1.25.x
check-latest: true
cache: true
- name: Run go list
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "pkg/grpc/protobuf-schemas"]
path = pkg/grpc/protobuf-schemas
url = https://github.com/wavesplatform/protobuf-schemas
branch = deterministic-finality
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
version: "2"
linters:
enable:
- exhaustive
settings:
cyclop:
max-complexity: 30
package-average: 10
errcheck:
check-type-assertions: false
exhaustive:
check:
- switch
exhaustruct:
exclude:
- ^net/http.Client$
Expand Down
3 changes: 3 additions & 0 deletions .semgrepignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ cmd/wmd/internal/swagger/

# Ignore testdata folders
pkg/state/testdata/

# Ignore generated files
**/*.pb.go
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Send the transaction to the network:

### Building from sources

Go version 1.24 or later is required to build the `node`, `importer`, `wallet` and other tools.
Go version 1.25 or later is required to build the `node`, `importer`, `wallet` and other tools.

To build a node, importer or other tools run a `make` command:

Expand Down
13 changes: 10 additions & 3 deletions cmd/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/wavesplatform/gowaves/pkg/logging"
"github.com/wavesplatform/gowaves/pkg/metrics"
"github.com/wavesplatform/gowaves/pkg/miner"
"github.com/wavesplatform/gowaves/pkg/miner/endorsementpool"
"github.com/wavesplatform/gowaves/pkg/miner/scheduler"
"github.com/wavesplatform/gowaves/pkg/miner/utxpool"
"github.com/wavesplatform/gowaves/pkg/node"
Expand Down Expand Up @@ -467,7 +468,7 @@ func runNode(ctx context.Context, nc *config) (_ io.Closer, retErr error) {
return nil, errors.Wrap(err, "failed to create services")
}

app, err := api.NewApp(nc.apiKey, minerScheduler, svs)
app, err := api.NewApp(nc.apiKey, minerScheduler, svs, cfg)
if err != nil {
return nil, errors.Wrap(err, "failed to initialize application")
}
Expand All @@ -480,7 +481,7 @@ func runNode(ctx context.Context, nc *config) (_ io.Closer, retErr error) {
return nil, errors.Wrap(apiErr, "failed to run APIs")
}

return startNode(ctx, nc, svs, features, minerScheduler, parent, declAddr, nl), nil
return startNode(ctx, nc, svs, features, minerScheduler, parent, declAddr, nl, cfg.GenerationPeriod), nil
}

func startNode(
Expand All @@ -492,6 +493,7 @@ func startNode(
parent peer.Parent,
declAddr proto.TCPAddr,
nl *slog.Logger,
periodGeneration uint64,
) *node.Node {
bindAddr := proto.NewTCPAddrFromString(nc.bindAddress)

Expand All @@ -504,7 +506,7 @@ func startNode(
go ntw.Run(ctx)

n := node.NewNode(svs, declAddr, bindAddr, nc.microblockInterval, nc.enableLightMode, nl, fl)
go n.Run(ctx, parent, svs.InternalChannel, networkInfoCh, ntw.SyncPeer())
go n.Run(ctx, parent, svs.InternalChannel, networkInfoCh, ntw.SyncPeer(), periodGeneration)
return n
}

Expand Down Expand Up @@ -808,12 +810,17 @@ func createServices(
if err != nil {
return services.Services{}, errors.Wrap(err, "failed to initialize UTX")
}
endorsementsPool, err := endorsementpool.NewEndorsementPool(cfg.MaxEndorsements)
if err != nil {
return services.Services{}, errors.Wrap(err, "failed to initialize endorsement pool")
}
return services.Services{
State: st,
Peers: peerManager,
Scheduler: scheduler,
BlocksApplier: blocks_applier.NewBlocksApplier(),
UtxPool: utxpool.New(utxPoolMaxSizeBytes, utxValidator, cfg),
EndorsementPool: endorsementsPool,
Scheme: cfg.AddressSchemeCharacter,
Time: ntpTime,
Wallet: wal,
Expand Down
2 changes: 1 addition & 1 deletion cmd/rollback/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func run() error {

slog.Info("Current height", "height", curHeight)

err = s.RollbackToHeight(*height)
err = s.RollbackToHeight(*height, false)
if err != nil {
return fmt.Errorf("failed to rollback: %w", err)
}
Expand Down
42 changes: 20 additions & 22 deletions cmd/statecmp/statecmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/pkg/errors"

"github.com/wavesplatform/gowaves/pkg/client"
"github.com/wavesplatform/gowaves/pkg/crypto"
"github.com/wavesplatform/gowaves/pkg/logging"
"github.com/wavesplatform/gowaves/pkg/proto"
)
Expand Down Expand Up @@ -43,10 +44,10 @@ func checkAndUpdateURL(s string) (string, error) {
return u.String(), nil
}

func loadStateHash(ctx context.Context, cl *client.Client, height uint64, tries int) (*proto.StateHash, error) {
func loadStateHash(ctx context.Context, cl *client.Client, height uint64, tries int) (proto.StateHash, error) {
ctx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()
var sh *proto.StateHash
var sh proto.StateHash
var err error
for range tries {
sh, _, err = cl.Debug.StateHash(ctx, height)
Expand All @@ -61,12 +62,12 @@ type printer struct {
lock sync.Mutex
}

func (p *printer) printDifferentResults(height uint64, res map[proto.FieldsHashes]*nodesGroup) {
func (p *printer) printDifferentResults(height uint64, res map[crypto.Digest]*nodesGroup) {
p.lock.Lock()
defer p.lock.Unlock()

for fh, nodes := range res {
hashJs, err := json.Marshal(fh)
for sh, nodes := range res {
hashJs, err := json.Marshal(sh)
if err != nil {
panic(err)
}
Expand All @@ -76,7 +77,7 @@ func (p *printer) printDifferentResults(height uint64, res map[proto.FieldsHashe
}

type stateHashInfo struct {
hash *proto.StateHash
sh proto.StateHash
node string
}

Expand All @@ -87,12 +88,13 @@ type hashResult struct {

type nodesGroup struct {
nodes []string
sh proto.StateHash
}

func newNodesGroup(first string) *nodesGroup {
func newNodesGroup(first string, sh proto.StateHash) *nodesGroup {
nodes := make([]string, 1)
nodes[0] = first
return &nodesGroup{nodes: nodes}
return &nodesGroup{nodes: nodes, sh: sh}
}

func (ng *nodesGroup) addNode(node string) {
Expand All @@ -112,27 +114,27 @@ func manageHeight(
sh, err := loadStateHash(ctx, cl, height, tries)
res := hashResult{
res: stateHashInfo{
hash: sh,
sh: sh,
node: node,
},
err: err,
}
results <- res
}(cl, node)
}
differentResults := make(map[proto.FieldsHashes]*nodesGroup)
differentResults := make(map[crypto.Digest]*nodesGroup)
for range clients {
hr := <-results
if hr.err != nil {
cancel()
return hr.err
}
fh := hr.res.hash.FieldsHashes
nodesGroup, ok := differentResults[fh]
sh := hr.res.sh
ng, ok := differentResults[sh.GetSumHash()]
if !ok {
differentResults[fh] = newNodesGroup(hr.res.node)
differentResults[sh.GetSumHash()] = newNodesGroup(hr.res.node, sh)
} else {
nodesGroup.addNode(hr.res.node)
ng.addNode(hr.res.node)
}
}
if len(differentResults) != 1 {
Expand All @@ -149,9 +151,7 @@ func download(
p := &printer{}
var wg sync.WaitGroup
for range goroutines {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
for height := range heightChan {
if err := manageHeight(ctx, height, nodes, clients, p, tries); err != nil {
cancel()
Expand All @@ -160,7 +160,7 @@ func download(
break
}
}
}()
})
}
wg.Wait()
}
Expand Down Expand Up @@ -219,11 +219,9 @@ func main() {
heightChan := make(chan uint64)
errChan := make(chan error, *goroutinesNum)
var wg sync.WaitGroup
wg.Add(1)
go func() {
wg.Go(func() {
download(heightChan, errChan, nodes, clients, *goroutinesNum, *tries)
wg.Done()
}()
})
for h := uint64(*startHeight); h < uint64(*endHeight); h++ {
gotErr := false
select {
Expand Down
Loading
Loading