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

Increase maxPerformDataSize for maxObservation, maxOutcome size #292

Merged
merged 3 commits into from
Nov 27, 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
4 changes: 2 additions & 2 deletions pkg/v3/observation.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
// as different nodes would upgrade at different times and would need to
// adhere to each others' limits
const (
ObservationPerformablesLimit = 100
ObservationPerformablesLimit = 50
ObservationLogRecoveryProposalsLimit = 5
ObservationConditionalsProposalsLimit = 5
ObservationBlockHistoryLimit = 256

// MaxObservationLength applies a limit to the total length of bytes in an
// observation. NOTE: This is derived from a limit of 5000 on performData
// observation. NOTE: This is derived from a limit of 10000 on performData
// which is guaranteed onchain
MaxObservationLength = 1_000_000
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/v3/observation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func TestLargeObservationSize(t *testing.T) {
Hash: [32]byte{1},
})
}
largePerformData := [5001]byte{}
largePerformData := [10001]byte{}
for i := 0; i < ObservationPerformablesLimit; i++ {
newResult := validLogResult
uid := types.UpkeepIdentifier{}
Expand Down
4 changes: 2 additions & 2 deletions pkg/v3/outcome.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const (
OutcomeSurfacedProposalsRoundHistoryLimit = 20

// MaxOutcomeLength applies a limit to the total length of bytes in an outcome for
// a round. NOTE: This is derived from a limit of 5000 on performData
// a round. NOTE: This is derived from a limit of 10000 on performData
// which is guaranteed onchain
MaxOutcomeLength = 2_000_000
MaxOutcomeLength = 2_500_000
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a smaller change than 2x because

  1. there was existing margin
  2. there is a component of proposals in outcome that didn't scale according to performData

// MaxReportLength limits the total length of bytes for a single report.
MaxReportLength = 1_000_000
// MaxReportCount limits the total number of reports allowed to be produced
Expand Down
2 changes: 1 addition & 1 deletion pkg/v3/outcome_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestLargeOutcomeSize(t *testing.T) {
AgreedPerformables: []types.CheckResult{},
SurfacedProposals: [][]types.CoordinatedBlockProposal{},
}
largePerformData := [5001]byte{}
largePerformData := [10001]byte{}
for i := 0; i < OutcomeAgreedPerformablesLimit; i++ {
newResult := validLogResult
uid := types.UpkeepIdentifier{}
Expand Down