Skip to content

Commit 9855f57

Browse files
authored
Merge pull request #6029 from Algo-devops-service/relstable3.25.0
2 parents 5c2cf06 + 6b09750 commit 9855f57

File tree

82 files changed

+3351
-2801
lines changed

Some content is hidden

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

82 files changed

+3351
-2801
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ jobs:
303303
parameters:
304304
platform:
305305
type: string
306-
executor: << parameters.platform >>_medium
306+
executor: << parameters.platform >>_large
307307
working_directory: << pipeline.parameters.build_dir >>/project
308308
parallelism: 10
309309
environment:
@@ -319,7 +319,7 @@ jobs:
319319
parameters:
320320
platform:
321321
type: string
322-
executor: << parameters.platform >>_medium
322+
executor: << parameters.platform >>_large
323323
working_directory: << pipeline.parameters.build_dir >>/project
324324
parallelism: 2
325325
environment:

.github/workflows/benchmarks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: Performance regression check
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3.5.3
20+
- uses: actions/checkout@v4
2121
- uses: actions/[email protected]
2222
with:
2323
go-version-file: 'go.mod'

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
update: true
1818
path-type: inherit
1919
- name: Check out code
20-
uses: actions/checkout@v3.5.3
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
- name: Determine Go version

.github/workflows/codegen_verification.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- 8080:8080
1515
steps:
1616
- name: Check out code
17-
uses: actions/checkout@v3.5.3
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020
path: go-algorand

.github/workflows/container.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Code
16-
uses: actions/checkout@v3.5.3
16+
uses: actions/checkout@v4
1717

1818
- name: Generate Container Metadata
1919
id: meta
@@ -59,7 +59,7 @@ jobs:
5959
# if: github.ref == format('refs/heads/{0}', 'master')
6060
# steps:
6161
# - name: Checkout Code
62-
# uses: actions/checkout@v3.5.3
62+
# uses: actions/checkout@v4
6363

6464
# - name: Update DockerHub Repository Description
6565
# uses: peter-evans/dockerhub-description@v3

.github/workflows/reviewdog.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code into the Go module directory
13-
uses: actions/checkout@v3.5.3
13+
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
1616
# move go out of the way temporarily to avoid "go list ./..." from installing modules
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Check out code into the Go module directory
35-
uses: actions/checkout@v3.5.3
35+
uses: actions/checkout@v4
3636
with:
3737
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
3838
# move go out of the way temporarily to avoid "go list ./..." from installing modules

.github/workflows/tools.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Check out code into the Go module directory
19-
uses: actions/checkout@v3.5.3
19+
uses: actions/checkout@v4
2020
# move go out of the way temporarily to avoid "go list ./..." from installing modules
2121
- name: Make libsodium.a
2222
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go

CODEOWNERS

-2
This file was deleted.

agreement/proposal.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func verifyProposer(p unauthenticatedProposal, ledger LedgerReader) error {
277277
// the header lacks it, the returned balanceRecord will be the right record.
278278
func payoutEligible(rnd basics.Round, proposer basics.Address, ledger LedgerReader, cparams config.ConsensusParams) (bool, basics.OnlineAccountData, error) {
279279
// Check the balance from the agreement round
280-
balanceRound := balanceRound(rnd, cparams)
280+
balanceRound := BalanceRound(rnd, cparams)
281281
balanceRecord, err := ledger.LookupAgreement(balanceRound, proposer)
282282
if err != nil {
283283
return false, basics.OnlineAccountData{}, err

agreement/proposalManager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (m *proposalManager) handleMessageEvent(r routerHandle, p player, e filtera
245245
}
246246
}
247247

248-
// filterVote filters a vote, checking if it is both fresh and not a duplicate, returning
248+
// filterProposalVote filters a vote, checking if it is both fresh and not a duplicate, returning
249249
// an errProposalManagerPVNotFresh or errProposalManagerPVDuplicate if so, else nil.
250250
// It also returns a bool indicating whether this proposal-vote should still be verified for tracking credential history.
251251
func (m *proposalManager) filterProposalVote(p player, r routerHandle, uv unauthenticatedVote, freshData freshnessData) (bool, error) {

agreement/pseudonode.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (n *asyncPseudonode) loadRoundParticipationKeys(voteRound basics.Round) []a
220220
n.participationKeys = nil
221221
return nil
222222
}
223-
balanceRound := balanceRound(voteRound, cparams)
223+
balanceRound := BalanceRound(voteRound, cparams)
224224

225225
// measure the time it takes to acquire the voting keys.
226226
beforeVotingKeysTime := time.Now()
@@ -422,6 +422,9 @@ func (t pseudonodeVotesTask) execute(verifier *AsyncVoteVerifier, quit chan stru
422422
Type: logspec.VoteBroadcast,
423423
Sender: vote.R.Sender.String(),
424424
Hash: vote.R.Proposal.BlockDigest.String(),
425+
Round: uint64(t.round),
426+
Period: uint64(t.period),
427+
Step: uint64(t.step),
425428
ObjectRound: uint64(vote.R.Round),
426429
ObjectPeriod: uint64(vote.R.Period),
427430
ObjectStep: uint64(vote.R.Step),
@@ -549,6 +552,8 @@ func (t pseudonodeProposalsTask) execute(verifier *AsyncVoteVerifier, quit chan
549552
logEvent := logspec.AgreementEvent{
550553
Type: logspec.ProposalBroadcast,
551554
Hash: vote.R.Proposal.BlockDigest.String(),
555+
Round: uint64(t.round),
556+
Period: uint64(t.period),
552557
ObjectRound: uint64(vote.R.Round),
553558
ObjectPeriod: uint64(vote.R.Period),
554559
}

agreement/pseudonode_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ func TestPseudonodeLoadingOfParticipationKeys(t *testing.T) {
449449
for rnd := basics.Round(3); rnd < 1000; rnd += 43 {
450450
keyManagerProxy.target = func(votingRound, balanceRnd basics.Round) []account.ParticipationRecordForRound {
451451
require.Equal(t, rnd, votingRound)
452-
require.Equal(t, balanceRound(rnd, cparams), balanceRnd)
452+
require.Equal(t, BalanceRound(rnd, cparams), balanceRnd)
453453
return keyManager.VotingKeys(votingRound, balanceRnd)
454454
}
455455
pb.loadRoundParticipationKeys(basics.Round(rnd))

agreement/selector.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ func (sel selector) CommitteeSize(proto config.ConsensusParams) uint64 {
4747
return sel.Step.committeeSize(proto)
4848
}
4949

50-
func balanceRound(r basics.Round, cparams config.ConsensusParams) basics.Round {
50+
// BalanceRound returns the round that should be considered by agreement when
51+
// looking at online stake (and status and key material). It is exported so that
52+
// AVM can provide opcodes that return the same data.
53+
func BalanceRound(r basics.Round, cparams config.ConsensusParams) basics.Round {
5154
return r.SubSaturate(basics.Round(2 * cparams.SeedRefreshInterval * cparams.SeedLookback))
5255
}
5356

@@ -61,7 +64,7 @@ func membership(l LedgerReader, addr basics.Address, r basics.Round, p period, s
6164
if err != nil {
6265
return
6366
}
64-
balanceRound := balanceRound(r, cparams)
67+
balanceRound := BalanceRound(r, cparams)
6568
seedRound := seedRound(r, cparams)
6669

6770
record, err := l.LookupAgreement(balanceRound, addr)

catchup/catchpointService.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ func (cs *CatchpointCatchupService) fetchBlock(round basics.Round, retryCount ui
698698
return blk, cert, downloadDuration, psp, false, nil
699699
}
700700

701-
// processStageLedgerDownload is the fifth catchpoint catchup stage. It completes the catchup process, swap the new tables and restart the node functionality.
701+
// processStageSwitch is the fifth catchpoint catchup stage. It completes the catchup process, swap the new tables and restart the node functionality.
702702
func (cs *CatchpointCatchupService) processStageSwitch() (err error) {
703703
err = cs.ledgerAccessor.CompleteCatchup(cs.ctx)
704704
if err != nil {

catchup/universalFetcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type universalBlockFetcher struct {
4343
log logging.Logger
4444
}
4545

46-
// makeUniversalFetcher returns a fetcher for http and ws peers.
46+
// makeUniversalBlockFetcher returns a fetcher for http and ws peers.
4747
func makeUniversalBlockFetcher(log logging.Logger, net network.GossipNode, config config.Local) *universalBlockFetcher {
4848
return &universalBlockFetcher{
4949
config: config,

cmd/goal/application.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ const maxAppArgs = 16
11791179
// minus 1 for the final app argument becoming a tuple of the remaining method args
11801180
const methodArgsTupleThreshold = maxAppArgs - 2
11811181

1182-
// parseArgJSONtoByteSlice convert input method arguments to ABI encoded bytes
1182+
// parseMethodArgJSONtoByteSlice convert input method arguments to ABI encoded bytes
11831183
// it converts funcArgTypes into a tuple type and apply changes over input argument string (in JSON format)
11841184
// if there are greater or equal to 15 inputs, then we compact the tailing inputs into one tuple
11851185
func parseMethodArgJSONtoByteSlice(argTypes []string, jsonArgs []string, applicationArgs *[][]byte) error {

cmd/netgoal/network.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ func runBuildNetwork() error {
168168
return fmt.Errorf("error resolving bootstrap file: %v", err)
169169
}
170170
net.BootstrappedNet = fileTemplate
171-
net.SetUseBoostrappedFiles(bootstrapLoadingFile)
171+
net.SetUseBootstrappedFiles(bootstrapLoadingFile)
172172
} else {
173-
net.SetUseBoostrappedFiles(false)
173+
net.SetUseBootstrappedFiles(false)
174174
}
175175

176176
net.SetUseExistingGenesisFiles(networkUseGenesisFiles)

cmd/tealdbg/localLedger.go

+28
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,34 @@ func (l *localLedger) LookupWithoutRewards(rnd basics.Round, addr basics.Address
336336
return ledgercore.ToAccountData(ad), rnd, nil
337337
}
338338

339+
func (l *localLedger) LookupAgreement(rnd basics.Round, addr basics.Address) (basics.OnlineAccountData, error) {
340+
// tealdbg does not understand rewards, so no pending rewards are applied.
341+
// Further, it has no history, so we return the _current_ information,
342+
// ignoring the `rnd` argument.
343+
ad := l.balances[addr]
344+
if ad.Status != basics.Online {
345+
return basics.OnlineAccountData{}, nil
346+
}
347+
348+
return basics.OnlineAccountData{
349+
MicroAlgosWithRewards: ad.MicroAlgos,
350+
VotingData: basics.VotingData{
351+
VoteID: ad.VoteID,
352+
SelectionID: ad.SelectionID,
353+
StateProofID: ad.StateProofID,
354+
VoteFirstValid: ad.VoteFirstValid,
355+
VoteLastValid: ad.VoteLastValid,
356+
VoteKeyDilution: ad.VoteKeyDilution,
357+
},
358+
IncentiveEligible: ad.IncentiveEligible,
359+
}, nil
360+
}
361+
362+
func (l *localLedger) OnlineCirculation(rnd basics.Round, voteRound basics.Round) (basics.MicroAlgos, error) {
363+
// A constant is fine for tealdbg
364+
return basics.Algos(1_000_000_000), nil // 1B
365+
}
366+
339367
func (l *localLedger) GetCreatorForRound(rnd basics.Round, cidx basics.CreatableIndex, ctype basics.CreatableType) (basics.Address, bool, error) {
340368
switch ctype {
341369
case basics.AssetCreatable:

config/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const VersionMajor = 3
3333

3434
// VersionMinor is the Minor semantic version number (x.#.z) - changed when backwards-compatible features are introduced.
3535
// Not enforced until after initial public release (x > 0).
36-
const VersionMinor = 24
36+
const VersionMinor = 25
3737

3838
// Version is the type holding our full version information.
3939
type Version struct {

daemon/algod/api/algod.oas2.json

+64
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,44 @@
178178
}
179179
}
180180
},
181+
"/debug/settings/pprof": {
182+
"get": {
183+
"description": "Retrieves the current settings for blocking and mutex profiles",
184+
"tags": [
185+
"private"
186+
],
187+
"produces": [
188+
"application/json"
189+
],
190+
"schemes": [
191+
"http"
192+
],
193+
"operationId": "GetDebugSettingsProf",
194+
"responses": {
195+
"200": {
196+
"$ref": "#/responses/DebugSettingsProfResponse"
197+
}
198+
}
199+
},
200+
"put": {
201+
"description": "Enables blocking and mutex profiles, and returns the old settings",
202+
"tags": [
203+
"private"
204+
],
205+
"produces": [
206+
"application/json"
207+
],
208+
"schemes": [
209+
"http"
210+
],
211+
"operationId": "PutDebugSettingsProf",
212+
"responses": {
213+
"200": {
214+
"$ref": "#/responses/DebugSettingsProfResponse"
215+
}
216+
}
217+
}
218+
},
181219
"/v2/accounts/{address}": {
182220
"get": {
183221
"description": "Given a specific account public key, this call returns the accounts status, balance and spendable amounts",
@@ -4053,6 +4091,26 @@
40534091
}
40544092
}
40554093
},
4094+
"DebugSettingsProf": {
4095+
"description": "algod mutex and blocking profiling state.",
4096+
"type": "object",
4097+
"title": "algod mutex and blocking profiling state.",
4098+
"tags": [
4099+
"private"
4100+
],
4101+
"properties": {
4102+
"block-rate": {
4103+
"description": "The rate of blocking events. The profiler aims to sample an average of one blocking event per rate nanoseconds spent blocked. To turn off profiling entirely, pass rate 0.",
4104+
"example": 1000,
4105+
"type": "integer"
4106+
},
4107+
"mutex-rate": {
4108+
"description": "The rate of mutex events. On average 1/rate events are reported. To turn off profiling entirely, pass rate 0",
4109+
"example": 1000,
4110+
"type": "integer"
4111+
}
4112+
}
4113+
},
40564114
"BuildVersion": {
40574115
"tags": [
40584116
"common"
@@ -5500,6 +5558,12 @@
55005558
"schema": {
55015559
"$ref": "#/definitions/Version"
55025560
}
5561+
},
5562+
"DebugSettingsProfResponse": {
5563+
"description": "DebugPprof is the response to the /debug/extra/pprof endpoint",
5564+
"schema": {
5565+
"$ref": "#/definitions/DebugSettingsProf"
5566+
}
55035567
}
55045568
},
55055569
"securityDefinitions": {

0 commit comments

Comments
 (0)