Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-algorand 3.25.0-stable Release PR #6029

Merged
merged 23 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
299b309
logger: fix data race in tests (#5999)
algorandskiy May 14, 2024
a3efb56
Typos: Correct some spelling mistakes (#6001)
jannotti May 14, 2024
98fdd2a
AVM: incentive opcodes (#5984)
jannotti May 15, 2024
51dc0b4
Build: bump jinja2 from 3.1.3 to 3.1.4 in /test/heapwatch (#5991)
dependabot[bot] May 15, 2024
f75fe9e
chore: fix non-exported function names in comments (#5987)
tianzedavid May 15, 2024
981abad
Build: bump golang.org/x/net from 0.17.0 to 0.23.0 (#5979)
dependabot[bot] May 16, 2024
2335b35
CICD: go-algorand relstable3.24.0-remerge mergeback (#6002)
Algo-devops-service May 20, 2024
2f852b7
Tests: Fix flakey ECDSA testing (#6005)
jasonpaulos May 30, 2024
f633857
CICD: Update to switch e2e_expect to large (#6004)
onetechnical May 30, 2024
0f1b10b
ci: upgrade github checkout action to v4 (#6010)
michaeltchuang Jun 4, 2024
8d228c0
CICD: update OS support in test release script (#6012)
onetechnical Jun 5, 2024
8d9632c
Tests: Fix e2e kmd timeout (#6016)
jasonpaulos Jun 7, 2024
d1e7725
metrics: Add TagCounterFiltered metrics for handler calls (#6013)
ohill Jun 7, 2024
0c02f9b
Tests: Fix flakey htlc test (#6017)
jasonpaulos Jun 7, 2024
f851f50
ledger: introduce expired stake cache (#6014)
algorandskiy Jun 7, 2024
08575d7
txHandler: fixes to ERL resources management (#6019)
algorandskiy Jun 7, 2024
abf4c8d
agreement: log current player state for VoteBroadcast and ProposalBro…
algorandskiy Jun 7, 2024
052dff4
tests: set communication timeout in kmd.init_wallet_handle (#6021)
algorandskiy Jun 7, 2024
9853ab2
Tools: Fix Cloudflare SRV update utility after API change (#6020)
onetechnical Jun 7, 2024
f06a86e
rest api: /debug/settings/pprof admin endpoint for debugging (#6018)
algorandskiy Jun 7, 2024
47f90e8
Merge branch 'master' into relbeta3.25.0
Algo-devops-service Jun 7, 2024
26362ad
Merge pull request #6022 from Algo-devops-service/relbeta3.25.0
algojohnlee Jun 10, 2024
6b09750
Merge branch 'rel/beta' into relstable3.25.0
Algo-devops-service Jun 12, 2024
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
parameters:
platform:
type: string
executor: << parameters.platform >>_medium
executor: << parameters.platform >>_large
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 10
environment:
Expand All @@ -319,7 +319,7 @@ jobs:
parameters:
platform:
type: string
executor: << parameters.platform >>_medium
executor: << parameters.platform >>_large
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 2
environment:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
go-version-file: 'go.mod'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
update: true
path-type: inherit
- name: Check out code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine Go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codegen_verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- 8080:8080
steps:
- name: Check out code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
with:
fetch-depth: 0
path: go-algorand
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4

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

# - name: Update DockerHub Repository Description
# uses: peter-evans/dockerhub-description@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
# move go out of the way temporarily to avoid "go list ./..." from installing modules
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
# move go out of the way temporarily to avoid "go list ./..." from installing modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
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
Expand Down
2 changes: 0 additions & 2 deletions CODEOWNERS

This file was deleted.

2 changes: 1 addition & 1 deletion agreement/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func verifyProposer(p unauthenticatedProposal, ledger LedgerReader) error {
// the header lacks it, the returned balanceRecord will be the right record.
func payoutEligible(rnd basics.Round, proposer basics.Address, ledger LedgerReader, cparams config.ConsensusParams) (bool, basics.OnlineAccountData, error) {
// Check the balance from the agreement round
balanceRound := balanceRound(rnd, cparams)
balanceRound := BalanceRound(rnd, cparams)
balanceRecord, err := ledger.LookupAgreement(balanceRound, proposer)
if err != nil {
return false, basics.OnlineAccountData{}, err
Expand Down
2 changes: 1 addition & 1 deletion agreement/proposalManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (m *proposalManager) handleMessageEvent(r routerHandle, p player, e filtera
}
}

// filterVote filters a vote, checking if it is both fresh and not a duplicate, returning
// filterProposalVote filters a vote, checking if it is both fresh and not a duplicate, returning
// an errProposalManagerPVNotFresh or errProposalManagerPVDuplicate if so, else nil.
// It also returns a bool indicating whether this proposal-vote should still be verified for tracking credential history.
func (m *proposalManager) filterProposalVote(p player, r routerHandle, uv unauthenticatedVote, freshData freshnessData) (bool, error) {
Expand Down
7 changes: 6 additions & 1 deletion agreement/pseudonode.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (n *asyncPseudonode) loadRoundParticipationKeys(voteRound basics.Round) []a
n.participationKeys = nil
return nil
}
balanceRound := balanceRound(voteRound, cparams)
balanceRound := BalanceRound(voteRound, cparams)

// measure the time it takes to acquire the voting keys.
beforeVotingKeysTime := time.Now()
Expand Down Expand Up @@ -422,6 +422,9 @@ func (t pseudonodeVotesTask) execute(verifier *AsyncVoteVerifier, quit chan stru
Type: logspec.VoteBroadcast,
Sender: vote.R.Sender.String(),
Hash: vote.R.Proposal.BlockDigest.String(),
Round: uint64(t.round),
Period: uint64(t.period),
Step: uint64(t.step),
ObjectRound: uint64(vote.R.Round),
ObjectPeriod: uint64(vote.R.Period),
ObjectStep: uint64(vote.R.Step),
Expand Down Expand Up @@ -549,6 +552,8 @@ func (t pseudonodeProposalsTask) execute(verifier *AsyncVoteVerifier, quit chan
logEvent := logspec.AgreementEvent{
Type: logspec.ProposalBroadcast,
Hash: vote.R.Proposal.BlockDigest.String(),
Round: uint64(t.round),
Period: uint64(t.period),
ObjectRound: uint64(vote.R.Round),
ObjectPeriod: uint64(vote.R.Period),
}
Expand Down
2 changes: 1 addition & 1 deletion agreement/pseudonode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func TestPseudonodeLoadingOfParticipationKeys(t *testing.T) {
for rnd := basics.Round(3); rnd < 1000; rnd += 43 {
keyManagerProxy.target = func(votingRound, balanceRnd basics.Round) []account.ParticipationRecordForRound {
require.Equal(t, rnd, votingRound)
require.Equal(t, balanceRound(rnd, cparams), balanceRnd)
require.Equal(t, BalanceRound(rnd, cparams), balanceRnd)
return keyManager.VotingKeys(votingRound, balanceRnd)
}
pb.loadRoundParticipationKeys(basics.Round(rnd))
Expand Down
7 changes: 5 additions & 2 deletions agreement/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ func (sel selector) CommitteeSize(proto config.ConsensusParams) uint64 {
return sel.Step.committeeSize(proto)
}

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

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

record, err := l.LookupAgreement(balanceRound, addr)
Expand Down
2 changes: 1 addition & 1 deletion catchup/catchpointService.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ func (cs *CatchpointCatchupService) fetchBlock(round basics.Round, retryCount ui
return blk, cert, downloadDuration, psp, false, nil
}

// processStageLedgerDownload is the fifth catchpoint catchup stage. It completes the catchup process, swap the new tables and restart the node functionality.
// processStageSwitch is the fifth catchpoint catchup stage. It completes the catchup process, swap the new tables and restart the node functionality.
func (cs *CatchpointCatchupService) processStageSwitch() (err error) {
err = cs.ledgerAccessor.CompleteCatchup(cs.ctx)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion catchup/universalFetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type universalBlockFetcher struct {
log logging.Logger
}

// makeUniversalFetcher returns a fetcher for http and ws peers.
// makeUniversalBlockFetcher returns a fetcher for http and ws peers.
func makeUniversalBlockFetcher(log logging.Logger, net network.GossipNode, config config.Local) *universalBlockFetcher {
return &universalBlockFetcher{
config: config,
Expand Down
2 changes: 1 addition & 1 deletion cmd/goal/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ const maxAppArgs = 16
// minus 1 for the final app argument becoming a tuple of the remaining method args
const methodArgsTupleThreshold = maxAppArgs - 2

// parseArgJSONtoByteSlice convert input method arguments to ABI encoded bytes
// parseMethodArgJSONtoByteSlice convert input method arguments to ABI encoded bytes
// it converts funcArgTypes into a tuple type and apply changes over input argument string (in JSON format)
// if there are greater or equal to 15 inputs, then we compact the tailing inputs into one tuple
func parseMethodArgJSONtoByteSlice(argTypes []string, jsonArgs []string, applicationArgs *[][]byte) error {
Expand Down
4 changes: 2 additions & 2 deletions cmd/netgoal/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ func runBuildNetwork() error {
return fmt.Errorf("error resolving bootstrap file: %v", err)
}
net.BootstrappedNet = fileTemplate
net.SetUseBoostrappedFiles(bootstrapLoadingFile)
net.SetUseBootstrappedFiles(bootstrapLoadingFile)
} else {
net.SetUseBoostrappedFiles(false)
net.SetUseBootstrappedFiles(false)
}

net.SetUseExistingGenesisFiles(networkUseGenesisFiles)
Expand Down
28 changes: 28 additions & 0 deletions cmd/tealdbg/localLedger.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,34 @@
return ledgercore.ToAccountData(ad), rnd, nil
}

func (l *localLedger) LookupAgreement(rnd basics.Round, addr basics.Address) (basics.OnlineAccountData, error) {

Check warning on line 339 in cmd/tealdbg/localLedger.go

View check run for this annotation

Codecov / codecov/patch

cmd/tealdbg/localLedger.go#L339

Added line #L339 was not covered by tests
// tealdbg does not understand rewards, so no pending rewards are applied.
// Further, it has no history, so we return the _current_ information,
// ignoring the `rnd` argument.
ad := l.balances[addr]
if ad.Status != basics.Online {
return basics.OnlineAccountData{}, nil

Check warning on line 345 in cmd/tealdbg/localLedger.go

View check run for this annotation

Codecov / codecov/patch

cmd/tealdbg/localLedger.go#L343-L345

Added lines #L343 - L345 were not covered by tests
}

return basics.OnlineAccountData{
MicroAlgosWithRewards: ad.MicroAlgos,
VotingData: basics.VotingData{
VoteID: ad.VoteID,
SelectionID: ad.SelectionID,
StateProofID: ad.StateProofID,
VoteFirstValid: ad.VoteFirstValid,
VoteLastValid: ad.VoteLastValid,
VoteKeyDilution: ad.VoteKeyDilution,
},
IncentiveEligible: ad.IncentiveEligible,
}, nil

Check warning on line 359 in cmd/tealdbg/localLedger.go

View check run for this annotation

Codecov / codecov/patch

cmd/tealdbg/localLedger.go#L348-L359

Added lines #L348 - L359 were not covered by tests
}

func (l *localLedger) OnlineCirculation(rnd basics.Round, voteRound basics.Round) (basics.MicroAlgos, error) {

Check warning on line 362 in cmd/tealdbg/localLedger.go

View check run for this annotation

Codecov / codecov/patch

cmd/tealdbg/localLedger.go#L362

Added line #L362 was not covered by tests
// A constant is fine for tealdbg
return basics.Algos(1_000_000_000), nil // 1B

Check warning on line 364 in cmd/tealdbg/localLedger.go

View check run for this annotation

Codecov / codecov/patch

cmd/tealdbg/localLedger.go#L364

Added line #L364 was not covered by tests
}

func (l *localLedger) GetCreatorForRound(rnd basics.Round, cidx basics.CreatableIndex, ctype basics.CreatableType) (basics.Address, bool, error) {
switch ctype {
case basics.AssetCreatable:
Expand Down
2 changes: 1 addition & 1 deletion config/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const VersionMajor = 3

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

// Version is the type holding our full version information.
type Version struct {
Expand Down
64 changes: 64 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,44 @@
}
}
},
"/debug/settings/pprof": {
"get": {
"description": "Retrieves the current settings for blocking and mutex profiles",
"tags": [
"private"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"operationId": "GetDebugSettingsProf",
"responses": {
"200": {
"$ref": "#/responses/DebugSettingsProfResponse"
}
}
},
"put": {
"description": "Enables blocking and mutex profiles, and returns the old settings",
"tags": [
"private"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"operationId": "PutDebugSettingsProf",
"responses": {
"200": {
"$ref": "#/responses/DebugSettingsProfResponse"
}
}
}
},
"/v2/accounts/{address}": {
"get": {
"description": "Given a specific account public key, this call returns the accounts status, balance and spendable amounts",
Expand Down Expand Up @@ -4053,6 +4091,26 @@
}
}
},
"DebugSettingsProf": {
"description": "algod mutex and blocking profiling state.",
"type": "object",
"title": "algod mutex and blocking profiling state.",
"tags": [
"private"
],
"properties": {
"block-rate": {
"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.",
"example": 1000,
"type": "integer"
},
"mutex-rate": {
"description": "The rate of mutex events. On average 1/rate events are reported. To turn off profiling entirely, pass rate 0",
"example": 1000,
"type": "integer"
}
}
},
"BuildVersion": {
"tags": [
"common"
Expand Down Expand Up @@ -5500,6 +5558,12 @@
"schema": {
"$ref": "#/definitions/Version"
}
},
"DebugSettingsProfResponse": {
"description": "DebugPprof is the response to the /debug/extra/pprof endpoint",
"schema": {
"$ref": "#/definitions/DebugSettingsProf"
}
}
},
"securityDefinitions": {
Expand Down
Loading
Loading