Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7b607ce
Merge pull request #6487 from Algo-devops-service/relstable4.4.1
algojohnlee Nov 7, 2025
a64eadd
lint: Add gci formatter (#6536)
cce Feb 4, 2026
120e66e
Merge branch 'rel/beta' into relstable4.5.1
Algo-devops-service Feb 6, 2026
8b384d2
API: Enhance /v2/accounts to conditionally exclude app and asset para…
gmalouf Feb 6, 2026
a8c16ec
Merge pull request #6550 from Algo-devops-service/relstable4.5.1
algojohnlee Feb 9, 2026
6acf7d8
Merge remote-tracking branch 'origin/rel/stable' into relstable4.5.1-…
Algo-devops-service Feb 10, 2026
96024d7
Bump Version, Remove buildnumber.dat and genesistimestamp.dat files.
Algo-devops-service Feb 10, 2026
74a6d9b
build: add golangci-lint format into make fmt (#6549)
algorandskiy Feb 10, 2026
c80fa40
Merge pull request #6553 from Algo-devops-service/relstable4.5.1-remerge
algojohnlee Feb 10, 2026
ee8281b
Tools: fix DevNet genesis hash in algokey (#6556)
onetechnical Feb 12, 2026
c0b7a27
API: New pagination endpoint for applications (#6552)
gmalouf Feb 12, 2026
3753683
API: add OnlineCirculation to GetSupply (#6322)
cce Feb 13, 2026
00da5ef
network: use specific error assertions in tests (#6544)
cce Feb 13, 2026
791c5ae
p2p: fix StopNotify vs notifyAll deadlock on stop (#6562)
algorandskiy Feb 23, 2026
964ee6d
agreement: implement TODO in broadcast/relay actions (#6551)
algorandskiy Feb 24, 2026
4134b33
network: silently fall back if uncompressed vote received for statele…
cce Feb 24, 2026
c197379
tests: fix stopping race in http client harness (#6566)
algorandskiy Feb 25, 2026
ee2c246
network: don't listen if IncomingConnectionsLimit == 0 (#6568)
cce Feb 25, 2026
16982b5
Chore: do not modify pubsub global variables (#6545)
algorandskiy Feb 25, 2026
1d079fe
network: adjust pubsub params (#6569)
algorandskiy Feb 25, 2026
dbcceef
node: collect goroutines stacks before SIGKILL (#6557)
algorandskiy Feb 26, 2026
a1f5e36
kmd: fix macOS HID failures caused by Go async preemption signals (#6…
nullun Feb 27, 2026
136b97a
p2p: ignore pubsub PX peers for all node modes (#6554)
algorandskiy Feb 27, 2026
8d84b18
tests: fix flaky fetcher, catchpoint, expect tests (#6546)
algorandskiy Mar 2, 2026
267cc35
network: handle stream creation on existing conns (#6572)
algorandskiy Mar 5, 2026
25e0d3a
API: Incorporate deltas in presenting paginated view of assets or app…
gmalouf Mar 5, 2026
80f9086
Update the Version, BuildNumber, genesistimestamp.data
Algo-devops-service Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 17 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ linters:
- staticcheck
- testifylint
- unused

- forbidigo

settings:
dupword:
comments-only: true
Expand Down Expand Up @@ -101,6 +102,11 @@ linters:
enable:
- error-is-as
disable-all: true
forbidigo:
forbid:
- p: ^(require|assert)\.Error$
pkg: ^github\.com/stretchr/testify/(require|assert)$
msg: use ErrorContains, ErrorIs, or ErrorAs instead

exclusions:
generated: lax
Expand Down Expand Up @@ -147,6 +153,8 @@ linters:
text: '^empty-block: this block is empty, you can remove it'
- linters: revive
text: '^superfluous-else: if block ends with .* so drop this else and outdent its block'
- linters: forbidigo
path-except: ^network/

issues:
# Work our way back over time to be clean against all these
Expand All @@ -164,7 +172,15 @@ severity:

formatters:
enable:
- gci
- gofmt
settings:
gci:
sections:
- standard
- default
- prefix(github.com/algorand)
- prefix(github.com/algorand/go-algorand)
exclusions:
generated: lax
paths:
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ Ledger uses independent state machines that can rebuild from blockchain events,
- Race detection enabled for concurrent code validation
- Benchmark tests for performance-critical paths

### Paginated Resource Lookups (`ledger/acctupdates.go`)
The `lookupAssetResources`, `lookupApplicationResources`, and `lookupBoxResources` functions follow the same pattern: walk in-memory deltas backwards, query the DB, then merge the two result sets. These functions must stay closely aligned — a bug fix or structural change in one almost certainly requires the same change in the others. They are candidates for future consolidation into shared generic logic.

Their corresponding `Ledger`-level wrappers in `ledger/ledger.go` (`LookupAssets`, `LookupApplications`, `LookupBoxes`) must each hold `trackerMu.RLock()`, matching every other method that accesses tracker state.

### Code Organization
- Interface-first design for testability and modularity
- Dependency injection for component assembly
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ GOTAGSLIST := sqlite_unlock_notify sqlite_omit_load_extension
GOTAGSLIST += ${GOTAGSCUSTOM}

GOTESTCOMMAND := go tool -modfile=tool.mod gotestsum --format pkgname --jsonfile testresults.json --
GOLINTCOMMAND := go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.1 -c .golangci.yml

ifeq ($(OS_TYPE), darwin)
# M1 Mac--homebrew install location in /opt/homebrew
Expand Down Expand Up @@ -97,6 +98,7 @@ default: build

fmt:
go fmt ./...
$(GOLINTCOMMAND) fmt
./scripts/check_license.sh -i

fix: build
Expand All @@ -106,7 +108,7 @@ modernize:
GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@v0.39.0 -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./...

lint:
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.1 run -c .golangci.yml
$(GOLINTCOMMAND) run

warninglint: custom-golangci-lint
./custom-golangci-lint run -c .golangci-warnings.yml
Expand Down
46 changes: 20 additions & 26 deletions agreement/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,34 +464,28 @@ func disconnectAction(e messageEvent, err *serializableError) action {
return networkAction{T: disconnect, Err: err, h: e.Input.messageHandle}
}

func broadcastAction(tag protocol.Tag, o interface{}) action {
a := networkAction{T: broadcast, Tag: tag}
// TODO would be good to have compiler check this (and related) type switch
// by specializing one method per type
switch tag {
case protocol.AgreementVoteTag:
a.UnauthenticatedVote = o.(unauthenticatedVote)
case protocol.VoteBundleTag:
a.UnauthenticatedBundle = o.(unauthenticatedBundle)
case protocol.ProposalPayloadTag:
a.CompoundMessage = o.(compoundMessage)
}
return a
// note, there is no broadcastVoteAction
// because when a participant makes a vote, it is processed as voteVerified / handleMessageEvent events
// and then processed like any other votes, resulting in a relayVoteAction instead of a broadcast

func broadcastBundleAction(b unauthenticatedBundle) action {
return networkAction{T: broadcast, Tag: protocol.VoteBundleTag, UnauthenticatedBundle: b}
}

func relayAction(e messageEvent, tag protocol.Tag, o interface{}) action {
a := networkAction{T: relay, h: e.Input.messageHandle, Tag: tag}
// TODO would be good to have compiler check this (and related) type switch
// by specializing one method per type
switch tag {
case protocol.AgreementVoteTag:
a.UnauthenticatedVote = o.(unauthenticatedVote)
case protocol.VoteBundleTag:
a.UnauthenticatedBundle = o.(unauthenticatedBundle)
case protocol.ProposalPayloadTag:
a.CompoundMessage = o.(compoundMessage)
}
return a
func broadcastCompoundAction(msg compoundMessage) action {
return networkAction{T: broadcast, Tag: protocol.ProposalPayloadTag, CompoundMessage: msg}
}

func relayVoteAction(e messageEvent, v unauthenticatedVote) action {
return networkAction{T: relay, h: e.Input.messageHandle, Tag: protocol.AgreementVoteTag, UnauthenticatedVote: v}
}

func relayBundleAction(e messageEvent, b unauthenticatedBundle) action {
return networkAction{T: relay, h: e.Input.messageHandle, Tag: protocol.VoteBundleTag, UnauthenticatedBundle: b}
}

func relayCompoundAction(e messageEvent, msg compoundMessage) action {
return networkAction{T: relay, h: e.Input.messageHandle, Tag: protocol.ProposalPayloadTag, CompoundMessage: msg}
}

func verifyVoteAction(e messageEvent, r round, p period, taskIndex uint64) action {
Expand Down
3 changes: 2 additions & 1 deletion agreement/agreementtest/simulate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (
"testing"
"time"

"github.com/algorand/go-deadlock"
"github.com/stretchr/testify/require"

"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/agreement"
"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/crypto"
Expand Down
3 changes: 2 additions & 1 deletion agreement/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import (
"math/rand"
"testing"

"github.com/algorand/go-deadlock"
"github.com/stretchr/testify/require"

"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/data/basics"
Expand Down
3 changes: 2 additions & 1 deletion agreement/credentialArrivalHistory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"testing"
"time"

"github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/test/partitiontest"
)

func TestCredentialHistoryStore(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion agreement/cryptoVerifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import (
"testing"
"time"

"github.com/algorand/go-deadlock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/data/account"
Expand Down
3 changes: 2 additions & 1 deletion agreement/dynamicFilterTimeoutParams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"testing"
"time"

"github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/test/partitiontest"
)

func TestSampleIndexIsValid(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion agreement/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import (
"encoding/base64"
"testing"

"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"
)

// TestSerializableErrorBackwardCompatibility ensures Err field of type serializableError can be
Expand Down
1 change: 1 addition & 0 deletions agreement/fuzzer/dropMessageFilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package fuzzer

import (
"encoding/json"

"github.com/algorand/go-algorand/protocol"
)

Expand Down
3 changes: 2 additions & 1 deletion agreement/fuzzer/ledger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"maps"
"math/rand"

"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/agreement"
"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/crypto"
Expand All @@ -30,7 +32,6 @@ import (
"github.com/algorand/go-algorand/data/bookkeeping"
"github.com/algorand/go-algorand/data/committee"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-deadlock"
)

const randseed = 0
Expand Down
1 change: 1 addition & 0 deletions agreement/fuzzer/messageDelayFilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package fuzzer
import (
"container/heap"
"encoding/json"

"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/protocol"
Expand Down
3 changes: 2 additions & 1 deletion agreement/fuzzer/messageDuplicationFilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"container/heap"
"encoding/json"

"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/protocol"
)

// Duplicate message with delay
Expand Down
1 change: 1 addition & 0 deletions agreement/fuzzer/messagePriorityQueue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package fuzzer

import (
"container/heap"

"github.com/algorand/go-algorand/protocol"
)

Expand Down
3 changes: 2 additions & 1 deletion agreement/fuzzer/messageReflectionFilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"container/heap"
"encoding/json"

"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/protocol"
)

// Simulate a 2 way mirror where messages are passed through and also reflected back to sender with a delay
Expand Down
3 changes: 1 addition & 2 deletions agreement/fuzzer/tests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"math"
"math/rand"
"os"

//ossignal "os/signal"
"path/filepath"
//"runtime/pprof"
Expand All @@ -34,9 +33,9 @@ import (

"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/logging"
//"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/test/partitiontest"
)
Expand Down
20 changes: 10 additions & 10 deletions agreement/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ func (p *player) partitionPolicy(r routerHandle) (actions []action) {
// TODO do we want to authenticate our own bundles?
b := bundleResponse.Event.Bundle
r.t.logBundleBroadcast(*p, b)
a0 := broadcastAction(protocol.VoteBundleTag, b)
a0 := broadcastBundleAction(b)
actions = append(actions, a0)
}

Expand Down Expand Up @@ -550,15 +550,15 @@ func (p *player) partitionPolicy(r routerHandle) (actions []action) {
if resStaged.Committable {
transmit := compoundMessage{Proposal: resStaged.Payload.u()}
r.t.logProposalRepropagate(resStaged.Proposal, bundleRound, bundlePeriod)
a1 := broadcastAction(protocol.ProposalPayloadTag, transmit)
a1 := broadcastCompoundAction(transmit)
actions = append(actions, a1)
} else {
// even if there is no staged value, there may be a pinned value
resPinned := pinnedValue(*p, r, bundleRound)
if resPinned.PayloadOK {
transmit := compoundMessage{Proposal: resPinned.Payload.u()}
r.t.logProposalRepropagate(resPinned.Proposal, bundleRound, bundlePeriod)
a1 := broadcastAction(protocol.ProposalPayloadTag, transmit)
a1 := broadcastCompoundAction(transmit)
actions = append(actions, a1)
}
}
Expand Down Expand Up @@ -628,7 +628,7 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
// Dynamic filter timeout feature enabled, and current message
// updated the best credential arrival time
v := e.Input.Vote
return append(actions, relayAction(e, protocol.AgreementVoteTag, v.u()))
return append(actions, relayVoteAction(e, v.u()))
case NoLateCredentialTrackingImpact:
// Dynamic filter timeout feature enabled, but current message
// may not update the best credential arrival time, so we should
Expand All @@ -649,14 +649,14 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
return append(actions, verifyVoteAction(e, uv.R.Round, uv.R.Period, seq))
}
v := e.Input.Vote
a := relayAction(e, protocol.AgreementVoteTag, v.u())
a := relayVoteAction(e, v.u())
ep := ef.(proposalAcceptedEvent)
if ep.PayloadOk {
transmit := compoundMessage{
Proposal: ep.Payload.u(),
Vote: v.u(),
}
a = broadcastAction(protocol.ProposalPayloadTag, transmit)
a = broadcastCompoundAction(transmit)
}
return append(actions, a)
}
Expand All @@ -677,7 +677,7 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
uv := ef.(payloadProcessedEvent).Vote.u()

// relay proposal if it has been pipelined
ra := relayAction(e, protocol.ProposalPayloadTag, compoundMessage{Proposal: up, Vote: uv})
ra := relayCompoundAction(e, compoundMessage{Proposal: up, Vote: uv})

if ep.Round == p.Round {
vpa := verifyPayloadAction(e, ep.Round, ep.Period, ep.Pinned)
Expand All @@ -698,7 +698,7 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
}
up := e.Input.UnauthenticatedProposal

a := relayAction(e, protocol.ProposalPayloadTag, compoundMessage{Proposal: up, Vote: uv})
a := relayCompoundAction(e, compoundMessage{Proposal: up, Vote: uv})
actions = append(actions, a)
}

Expand Down Expand Up @@ -740,7 +740,7 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
return append(actions, verifyVoteAction(e, uv.R.Round, uv.R.Period, 0))
} // else e.t() == voteVerified
v := e.Input.Vote
actions = append(actions, relayAction(e, protocol.AgreementVoteTag, v.u()))
actions = append(actions, relayVoteAction(e, v.u()))
a1 := p.handle(r, ef)
return append(actions, a1...)

Expand All @@ -758,7 +758,7 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
ub := e.Input.UnauthenticatedBundle
return append(actions, verifyBundleAction(e, ub.Round, ub.Period, ub.Step))
}
a0 := relayAction(e, protocol.VoteBundleTag, ef.(thresholdEvent).Bundle)
a0 := relayBundleAction(e, ef.(thresholdEvent).Bundle)
a1 := p.handle(r, ef)
return append(append(actions, a0), a1...)
}
Expand Down
3 changes: 2 additions & 1 deletion agreement/proposalManager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package agreement
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"
)

// Creates a proposal manager, and returns it in automata and white box form, along
Expand Down
Loading
Loading