-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Altair 1.1.0-alpha.5 - Beacon Chain #2554
Merged
Merged
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
9c18ef2
Remove SYNC_PUBKEYS_PER_AGGREGATE
twoeths e73acc8
Adjust sync committee size and duration
twoeths 9672ee1
Use stable sync committee indices when processing block rewards
twoeths 30e0900
Restrict sync committee period calculation boundaries
twoeths 5ee16f0
Participation flag and incentive review
twoeths e9e0673
Update inactivity penalty deltas processing
twoeths f0fff5a
Ensure indices are ordered [source, target, head] everywhere
twoeths 712c8bd
Map attestation participation to flag deltas in fork transition
twoeths fe4cd2c
Fix all current altair spec tests
twoeths b324594
Fix lint in beacon-state-transition
twoeths 8c38e51
Finality phase0 spec tests are removed in altair-1.1.0-alpha.5
twoeths 81f01ae
Remove duplicate call of getNextSyncCommitteeIndices()
twoeths 3f40221
Altair-1.1.0-alpha.5 for network and validator
twoeths b8f3339
Altair-1.1.0-alpha.5 for Sync Protocol
twoeths 5604160
Fix processSyncCommittee and add respective spec tests
twoeths bc5b470
Add operations minimal spec tests
twoeths 18a8c96
Fix EpochProcess, add finality minimal spec test
twoeths 4a92026
Improve the way to access aggregationBits
twoeths 30f5512
Add fork and fork_choice spec tests
twoeths cc659de
Add genesis minimal spec test
twoeths 7a32963
Add fork transition spec test
twoeths 16ea02f
SSZ spec test for altair - SyncCommittee
twoeths d056d4a
Add expectEqualBeaconState() for altair spec tests
twoeths ca63a52
chore: fix yarn check-types
twoeths a894416
chore: remove debugged comment
twoeths File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {altair, phase0} from "@chainsafe/lodestar-types"; | ||
import {IBaseSpecTest} from "../../type"; | ||
|
||
export interface IUpgradeStateCase extends IBaseSpecTest { | ||
pre: phase0.BeaconState; | ||
post: altair.BeaconState; | ||
} |
46 changes: 46 additions & 0 deletions
46
packages/spec-test-runner/test/spec/altair/fork/upgradeState.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import {join} from "path"; | ||
import {expect} from "chai"; | ||
|
||
import {TreeBacked} from "@chainsafe/ssz"; | ||
import {config} from "@chainsafe/lodestar-config/minimal"; | ||
import {allForks, altair, phase0} from "@chainsafe/lodestar-beacon-state-transition"; | ||
import {describeDirectorySpecTest, InputType} from "@chainsafe/lodestar-spec-test-util"; | ||
import {IUpgradeStateCase} from "./type"; | ||
import {upgradeState} from "@chainsafe/lodestar-beacon-state-transition/lib/altair"; | ||
import {SPEC_TEST_LOCATION} from "../../../utils/specTestCases"; | ||
|
||
describeDirectorySpecTest<IUpgradeStateCase, altair.BeaconState>( | ||
"upgrade state to altair", | ||
join(SPEC_TEST_LOCATION, "/tests/minimal/altair/fork/fork/pyspec_tests"), | ||
(testcase) => { | ||
const phase0State = allForks.createCachedBeaconState<phase0.BeaconState>( | ||
config, | ||
testcase.pre as TreeBacked<phase0.BeaconState> | ||
); | ||
return upgradeState(phase0State); | ||
}, | ||
{ | ||
inputTypes: { | ||
pre: { | ||
type: InputType.SSZ_SNAPPY, | ||
treeBacked: true, | ||
}, | ||
post: { | ||
type: InputType.SSZ_SNAPPY, | ||
treeBacked: true, | ||
}, | ||
meta: InputType.YAML, | ||
}, | ||
sszTypes: { | ||
pre: config.types.phase0.BeaconState, | ||
post: config.types.altair.BeaconState, | ||
}, | ||
|
||
timeout: 100000000, | ||
dapplion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
shouldError: (testCase) => !testCase.post, | ||
getExpected: (testCase) => testCase.post, | ||
expectFunc: (testCase, expected, actual) => { | ||
expect(config.types.altair.BeaconState.equals(actual, expected)).to.be.true; | ||
}, | ||
} | ||
); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a hot path in the state transition function we should keep using a for loop for speed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use
zipIndexesInBitList
to improve performancelodestar/packages/beacon-state-transition/test/perf/util/aggregationBits.test.ts
Line 26 in f677874
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! I was refering to the alternative path when it's not a tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If aggregationBits should always be a tree then the filter is fine