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

[Release] 4.0.0 #399

Merged
merged 20 commits into from Mar 19, 2024
Merged

[Release] 4.0.0 #399

merged 20 commits into from Mar 19, 2024

Conversation

Ansonhkg
Copy link
Collaborator

Version: 4.0.0

Pull Requests

Checklist:

  • Testing: All new features and bug fixes must have passed unit and e2e tests. Automated test results must be reviewed and approved by at least one member of the JS-SDK team.
  • Documentation: Any changes to the JS-SDK, including new features, modifications, or bug fixes, must be accompanied by updated documentation. This includes API docs, changelogs, and migration guides for breaking changes
  • Deprecation Notices: If the release includes deprecating existing features, a clear deprecation notice (adding deprecated tag to related function) must be provided, including the timeline for when the feature will be removed and guidance for alternative solutions.
  • No tsc warnings: If your branch much follow the configured tsc rules meaning no new warnings or errors should introduced in your branch.
  • Release notes: Contact the docs team to prepare the release note, highlighting new features, improvements, bug fixes, and known issues.

Ansonhkg and others added 20 commits March 13, 2024 17:38
Bumped plugin to latest version
Added configuration:
- Sort imports from 'farthest' to 'closest'
- Validate imports exist
- Ensure we don't import directly across the `/packages` directory
- Alphabetize imports for consistency
- Disallow duplicate imports
…ports, fix typescript error on _defaultConfig
…nse values, and add missing `hdRootPubkeys` property
… match how it is being used in examples, and make `minNodeCount` optional.
…types and incorrect retryTolerance value in config

- Fixed networkSyncInterval type
- Fixed incorrect key being set in `config.retryTolerance` (should've been `maxRetryCount`)
- Fixed `serverKeys` and `connectedNodes` 'any' usages
…uctor config logic

- Fixed incorrect property in configs for Manzano and Habanero, from `checkSevSnpAttestation` (nonexistent) to `checkNodeAttestation`
- Remove unnecessary _defaultConfig; use existing value from class definition instead
- Simplify `config.litNetwork` switch logic and remove unnecessary if/else (default case does the same thing anyway)
- Couple of typos fixed too
- Removed unnecessary casting of `this.config.letNetwork` now that types are correct on `config`
…TWORKS JSDoc and content, and make reference to LitNetwork enum values
…eAttestation and BaseJsonExecutionRequest.authMethods

- Make `LitNodeClientConfig.checkNodeAttestation` optional, since we often set it internally based on network IDs
- Narrow signature of `BaseJsonExecutionRequest.authMethods` (resolves eslint error)
- Ensure network sync is a mostly atomic operation - don't write node properties to client until handshakes complete
- Ensure multiple calls to the same core instance's `connect()` method are coalesced into one handshake operation
- Await operations inside of `connect()`, so that failures bubble up to the caller and they can react appropriately
- Refactor `listenForNewEpoch()` to track staking contract listener in a way that allows for disconnection later and ensure one-and-only-one listener is ever attached
- Add `disconnect()` method that clears all intervals to allow consumers to shut down gracefully
- Make `networkSyncInterval` explicitly private (use `disconnect()`!)
- Fix a variety of incorrect types
- Replace 500ms polling setInterval that compared length of `serverKeys` and `config.bootstrapUrls` with Promise.race() for timeout condition
- JSDocs and clearer context in error messages
…ic with new `connect()` logic

- Fixed fetching new epoch number for every command sent to any node
- Epoch update timeout handler is `unref()`'d in nodejs to avoid keeping the process open
- Moved setting _stakingContract to `setNewConfig()` so that setting up listeners that use it are sync operations that don't create new instances every time they fire
- Ensured that network state polling doesn't update the epoch cache before node propagation delay is reached
- Cayenne also now keeps up-to-date epoch number cached
…ched value

- Added error handling so errors aren't unhandled rejections
- Print the epochNumber from the cache instead of getting it directly from the contract each second
@Ansonhkg Ansonhkg marked this pull request as ready for review March 19, 2024 14:32
@Ansonhkg Ansonhkg merged commit ce5a112 into master Mar 19, 2024
4 checks passed
@Ansonhkg Ansonhkg deleted the staging/4.0.0 branch March 19, 2024 14:32
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 this pull request may close these issues.

None yet

2 participants