Skip to content

Issue #154#155

Merged
andrewnguyen22 merged 18 commits into
mainfrom
issue-#154
Apr 23, 2025
Merged

Issue #154#155
andrewnguyen22 merged 18 commits into
mainfrom
issue-#154

Conversation

@andrewnguyen22
Copy link
Copy Markdown
Collaborator

@andrewnguyen22 andrewnguyen22 commented Apr 21, 2025

Description

  • RootChainInfo polling is unreliable and resource intensive
  • It should allow the nestedChain listeners to have the info quicker and more consistently

Attempts to fix the following:

  • RootChain height can be off by 1 (N-1)
  • RootChain updates can take > 1 second in worst case situations

Related Issues

Closes: #154

Changes Made

  • Changed RootChainInfo retrieval from http polling to websockets pub/sub
  • Converted RootChainInfo struct to protobuf for faster marshalling
  • Still allow fallback http requests

Checklist

  • I have tested the changes locally and verified they work as intended.
  • I have appropriately titled my branch issue-#<issue-number>.
  • I have run re-built the web-wallet and/or block explorer (if applicable).
  • I have run npm run prettier to format the web-wallet and/or block explorer (if applicable)
  • I have updated documentation (if applicable).
  • I have included tests for the changes (if applicable).

Additional Notes

Still testing - will run in docker soon.

@andrewnguyen22 andrewnguyen22 added High Priority Highest priority issue Controller The bus that integrates the modules labels Apr 21, 2025
@andrewnguyen22 andrewnguyen22 self-assigned this Apr 21, 2025
Copy link
Copy Markdown
Collaborator

@rem1niscence rem1niscence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First set of review, most of them are minor clarifications and warnings, so far it looks pretty good! second one coming shortly

Comment thread cmd/rpc/sock.go Outdated
Comment thread cmd/rpc/sock.go Outdated
Comment thread cmd/rpc/server.go
Comment thread cmd/rpc/sock.go Outdated
Comment thread cmd/rpc/sock.go
Comment thread cmd/rpc/sock.go Outdated
Comment thread cmd/rpc/sock.go Outdated
Comment thread cmd/rpc/sock.go
Comment thread cmd/rpc/sock.go
Comment thread cmd/rpc/sock.go
Comment thread cmd/rpc/sock.go
Comment thread cmd/rpc/sock.go Outdated
Comment thread controller/controller.go Outdated
@andrewnguyen22 andrewnguyen22 merged commit db1c275 into main Apr 23, 2025
2 checks passed
@andrewnguyen22 andrewnguyen22 deleted the issue-#154 branch April 23, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Controller The bus that integrates the modules High Priority Highest priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Convert RootChainInfo polling to Pub/Sub architecture

2 participants