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
[Release] 4.0.0 #399
Conversation
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
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
…ypes for CustomNetwork for accuracy
…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
… in interfaces.ts
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Version: 4.0.0
Pull Requests
connect()
are surfaced to the caller #398Checklist: