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

Slow unit test - getLatestWeakSubjectivityCheckpointEpoch #2564

Closed
dapplion opened this issue May 26, 2021 · 1 comment · Fixed by #2688
Closed

Slow unit test - getLatestWeakSubjectivityCheckpointEpoch #2564

dapplion opened this issue May 26, 2021 · 1 comment · Fixed by #2688
Assignees

Comments

@dapplion
Copy link
Contributor

Describe the bug

Review the workload happening there

getLatestWeakSubjectivityCheckpointEpoch
 ✓ should have 256 mod for slot 8192 and activeValidatorCount of 8192 (91ms)
 ✓ should have 256 mod for slot 16384 and activeValidatorCount of 16384 (160ms)
 ✓ should have 512 mod for slot 32768 and activeValidatorCount of 32768 (295ms)
 ✓ should have 1024 mod for slot 65536 and activeValidatorCount of 65536 (640ms)
 ✓ should have 1792 mod for slot 131072 and activeValidatorCount of 131072 (1154ms)
 ✓ should have 3328 mod for slot 262144 and activeValidatorCount of 262144 (2317ms)

Expected behavior

Unit tests should be under < 50ms

@dapplion
Copy link
Contributor Author

@3xtr4t3rr3str14l Can you open a separate PR just fixing this test only?

3xtr4t3rr3str14l added a commit that referenced this issue Jun 11, 2021
3xtr4t3rr3str14l added a commit that referenced this issue Jun 11, 2021
wemeetagain pushed a commit that referenced this issue Jun 11, 2021
wemeetagain added a commit that referenced this issue Jun 23, 2021
* ws cli WIP

* ipfs url

* update initBeaconState with ipns url

* fetch ws state from IPFS via cli

* remove uneeded comment

* ipfs state data format

* json formatting

* Delete ws-state-root.ssz

* args.ipfsGatewayUrl

* embed weakSubjectivityState data and add mainnet

* weakSubjectivityState prater update

* update prater ws state to latest

* add pyrmont to ws states and correct mainnet

* remove uneeded docker cli args

* fetching ws state log

* update yarn.lock

* fix ipfs fetch log

* redesign WIP

* WS CLI via eth2-ws-provider querying

* revert docker compose

* verify checkpoint roots

* error clarification

* verify ws state with isWithinWeakSubjectivityPeriod

* TODO comment clarification

* computeWeakSubjectivityPeriod corrections

* simplify ws state get/init

* Update docker-compose.yml

* getLatestBlockRoot impl and usage

* add coorparoo to ws servers list

* ws cli touchup

* clone header in getLatestBlockRoot

* applying PR feedback

* use infura instead of eth2-ws-provider

* comment clarification

* computeWeakSubjectivityPeriod: return val = uint64->number

* computeWeakSubjectivityPeriod unit test

* computeWeakSubjectivityPeriod unit test performance increase

* ws unit tests performance increase

* PR review changes

* revert #2564 fix

* revert try/catch

* use state checkpoint if none provided by user

* fetch store from db to verify ws state; verify wsStateFile; general ws choice oe oorganisation

* lint

* remove ssz test file and change ws.ts comment gravemarks

* Delete .git-data.json

* fix typo

* Minor tweaks

* rm state1.ssz

* Clean up weak subjectivity utils

* Update comment

* Reorganize cli weak subjectivity code

Co-authored-by: Cayman <caymannava@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants