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

build: regenerate api routes and resolve merge error in catchup #5821

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions catchup/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@
return false
}
failureRank := peerRankDownloadFailed
if err == errNoBlockForRound {
var nbfe noBlockForRoundError
if errors.As(err, &nbfe) {
algorandskiy marked this conversation as resolved.
Show resolved Hide resolved
failureRank = peerRankNoBlockForRound
// remote peer doesn't have the block, try another peer
// quit if the the same peer peer encountered errNoBlockForRound more than errNoBlockForRoundThreshold times
Expand Down Expand Up @@ -730,30 +731,31 @@
return
default:
}
failureRank := peerRankDownloadFailed
if err == errNoBlockForRound {
var nbfe noBlockForRoundError
if errors.As(err, &nbfe) {
failureRank = peerRankNoBlockForRound

Check warning on line 737 in catchup/service.go

View check run for this annotation

Codecov / codecov/patch

catchup/service.go#L734-L737

Added lines #L734 - L737 were not covered by tests
// If a peer does not have the block after few attempts it probably has not persisted the block yet.
// Give it some time to persist the block and try again.
// None, there is no exit condition on too many retries as per the function contract.
if count, ok := peerErrors[peer]; ok {
if count > errNoBlockForRoundThreshold {
time.Sleep(50 * time.Millisecond)

Check warning on line 743 in catchup/service.go

View check run for this annotation

Codecov / codecov/patch

catchup/service.go#L741-L743

Added lines #L741 - L743 were not covered by tests
}
if count > errNoBlockForRoundThreshold*10 {

Check warning on line 745 in catchup/service.go

View check run for this annotation

Codecov / codecov/patch

catchup/service.go#L745

Added line #L745 was not covered by tests
// for the low number of connected peers (like 2) the following scenatio is possible:
// - both peers do not have the block
// - peer selector punishes one of the peers more than the other
// - the punoshed peer gets the block, and the less punished peer stucks.
// It this case reset the peer selector to let it re-learn priorities.
peerSelector = createPeerSelector(s.net, s.cfg, false)

Check warning on line 751 in catchup/service.go

View check run for this annotation

Codecov / codecov/patch

catchup/service.go#L751

Added line #L751 was not covered by tests
}
}
peerErrors[peer]++

Check warning on line 754 in catchup/service.go

View check run for this annotation

Codecov / codecov/patch

catchup/service.go#L754

Added line #L754 was not covered by tests
}
// remote peer doesn't have the block, try another peer
logging.Base().Warnf("fetchRound could not acquire block, fetcher errored out: %v", err)
peerSelector.rankPeer(psp, failureRank)

Check warning on line 758 in catchup/service.go

View check run for this annotation

Codecov / codecov/patch

catchup/service.go#L758

Added line #L758 was not covered by tests
continue
}

Expand Down
3 changes: 2 additions & 1 deletion daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7192,5 +7192,6 @@
{
"name": "private"
}
]
],
"x-original-swagger-version": "2.0"
algorandskiy marked this conversation as resolved.
Show resolved Hide resolved
}
4 changes: 2 additions & 2 deletions daemon/algod/api/server/v2/generated/data/routes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

408 changes: 204 additions & 204 deletions daemon/algod/api/server/v2/generated/experimental/routes.go

Large diffs are not rendered by default.

414 changes: 207 additions & 207 deletions daemon/algod/api/server/v2/generated/nonparticipating/private/routes.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data/transactions/logic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fields_string.go: fields.go
go generate

README.md: TEAL_opcodes.md README_in.md
python merge.py > README.md
python3 merge.py > README.md
@if [ -e $(SPECS)/dev/TEAL.md ]; then \
sed '/^$$/q' $(SPECS)/dev/TEAL.md | cat - README.md > teal.spec; \
mv teal.spec $(SPECS)/dev/TEAL.md; \
Expand Down