-
Notifications
You must be signed in to change notification settings - Fork 28
feat: Integrate Midnight network support #175
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for openzeppelin-monitor ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
LGTM
I see that many checks are failing, seems like issue with midnight dependencies. |
The work on this started off a bit experimental, and started getting more shape in the follow-up PRs. I will be merging #218 and #240 in this one which should resolve the checks 🤞 Thanks for the review both @MCarlomagno and @zeljkoX ❤️ |
* chore: Implement BlockChainClient functions * chore: Add default events and txs functions to client * chore: Fix integration tests * chore: Working deserializer * test: Add tests for get_chain_type * chore: Upgrade to midnight-node 0.12.0 * revert: Upgrade to midnight-node 0.12.0 This reverts commit 77c1fbe. * chore: Add status to midnight tx and helper fns * chore: Fix errors and imports for midnight-node 0.12.0 * fix: Remove extra whitespace * fix: Remove untagged * fix: Transaction deserialization * chore: Add print statements * feat: Match on function signature * feat: Attempt at decrypting coininfo * chore: Successful decrypt with Seed * feat: Decrypt coininfo from viewing key config * chore: Cleanup * test: Fix monitor execution test for midnight * test: Add test coverage for Midnight transaction * test: Midnight client integration * chore: Add test builders for midnight * test: Add tests for midnight transport * fix: Number formatting * test: Add filter tests * chore: Normalise midnight hashes * chore: Add comment for why we test against empty strings * fix: Temporarily bypass deserialization * chore: Add comment * feat: Add monitoring on transaction status * chore: Cargo update * test: Add coverage for websocket transport * test: Add coverage for websocket and events * test: Fix existing tests * test: Implement ignored event tests * chore: Fix transaction status * test: Add test coverage for transaction status filtering * chore: Use finalised head for Midnight get_blocks * chore: Reverts commit a0176d8. * chore: Get latest finalised block * chore: Apply review suggestions * chore: Use * docs: Add Midnight documentation (#240) * docs: Add Midnight documentation and examples * fix: Remove config file * chore: Remove unused bip32 crate * test: Add test for secret string display value * fix: Telegram token resolving * chore: Update documentation with get_latest_block changes * docs: Update rpc endpoint for chain type * fix: Readme * chore: Cargo update
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.
LGTM!
* refactor: Draft websockets and HTTP endpoint managers * test: Add integration tests for websocket logic * chore: Replace generic ws client with midnight specific * refactor: Use solely websocket for RPC requests (#253) * refactor: Use solely websocket for RPC requests * test: Fix tests and add helper methods * chore: Fix tests and ignore ones that rely on substrate * chore: Improve substrateclienttrait mocks * test: Add more coverage for transport * test: Add more test coverage for midnight client * docs: Add missing docstrings * test: Add coverage for monitor execution * test: Add coverage for filter_block * test: Fix remaining pool errors * chore: Remove outdated conditions and update docs
if let Err(ConfigError::ValidationError(err)) = result { | ||
assert!(err | ||
.message | ||
.contains("Protocol: must start with one of: wss://, ws://")); |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-insecure-websocket.detect-insecure-websocket
if let Err(ConfigError::ValidationError(err)) = result { | ||
assert!(err | ||
.message | ||
.contains("Protocol: must start with one of: http://, https://, wss://, ws://")); |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-insecure-websocket.detect-insecure-websocket
🚨 Bugbot Trial ExpiredYour team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot. A team admin can activate the plan in the Cursor dashboard. |
Summary
https://linear.app/openzeppelin-development/issue/PLAT-6492/add-network-and-models
This PR lays the foundational groundwork for integrating the Midnight network into the OpenZeppelin Monitor. It introduces essential models and initial test coverage to support Midnight's unique blockchain structure.
Key Changes:
Reviewer Focus Areas:
Merged PRs:
Testing Process
Checklist