Skip to content

Conversation

@UnbornAztecKing
Copy link
Collaborator

@UnbornAztecKing UnbornAztecKing commented Nov 12, 2025

Summary

  • Migrate MEXC WebSocket provider from JSON to Protocol Buffers (protobuf) serialization.
  • Add MEXC protobuf schema as a git submodule and generate Go bindings for message types via buf.
  • Upgrade Go version from 1.25.1 to 1.25.4 across all modules and base Docker images.
  • Upgrade proto-builder tooling from v0.14.0 to v0.17.1.

Details

MEXC Provider Changes

  • Protobuf Integration

    • Added proto/v2/vendors/mexc/websocket-proto as a git submodule pointing to MEXC's official protobuf repo.
    • Generated Go types in providers/websockets/mexc/pb/ for all MEXC push data messages (e.g., PublicMiniTickerV3Api, PublicIncreaseDepthsV3Api, order/deal/kline messages).
  • Message Handling

    • ws_data_handler.go: HandleMessage now attempts protobuf deserialization first, falling back to JSON only for control messages (subscription acks, pongs).
    • Retained JSON for subscription requests and ping/pong control messages per MEXC WebSocket API.

Build & Tooling

  • Makefile

    • Added proto-gen-vendors target to run scripts/protocgen-vendors.sh for vendor protobuf generation.
    • Removed unused deploy-dev target (Levant/Nomad deployment).
    • Updated e2e-docker-build to use local image names (slinky-sim-app, slinky-e2e-sidecar) instead of GHCR URIs to avoid registry dependency.
    • Changed docker-push to use docker buildx build --push with multi-arch support (linux/amd64,linux/arm64) instead of plain docker push.
  • Protobuf Tooling

    • Upgraded protoImageName from ghcr.io/cosmos/proto-builder:0.14.0 to 0.17.1.
    • Added scripts/protocgen-vendors.sh to lint and generate vendor protobuf definitions.

Go Version & Dependencies

  • Docker Images
    • Base images updated to golang:1.25.4-trixie / golang:1.25.4-alpine3.22.
    • Added ENV GOTOOLCHAIN=auto to base and sidecar Dockerfiles to allow automatic toolchain upgrades.

CI/CD

  • GitHub Actions
    • Deleted .github/workflows/e2e.yml (end-to-end test workflow removed entirely).
    • release.yml: added Docker login step for GHCR (docker/login-action@v3) before running GoReleaser to enable multi-arch image pushes.

Testing

  • Unit Tests

    • providers/websockets/mexc/ws_data_handler_test.go updated with new protobuf message factory (getPriceFactory) for generating test messages.
    • Removed tests for JSON-only scenarios (e.g., incorrect channel validation).
    • Retained tests for subscription messages (JSON), protobuf price updates, unsupported markets, and invalid price formats.
  • Coverage

    • Existing integration tests removed with deletion of .github/workflows/e2e.yml; no obvious replacement added.

@UnbornAztecKing UnbornAztecKing force-pushed the mexc-protobuf branch 5 times, most recently from af908c7 to abe7da1 Compare November 13, 2025 21:43
upgrade go to 1.25.4

avoid compiler issues on mac: golang/go#75775

set GOTOOLCHAIN=auto on base images

disable e2e tests:
    e2e tests cannot load the images built locally
    adding this capability requires forking the provider
    before, tests were run against the last images pushed to the registry
    as this is not a valid test of the build, it is disabled temporarily

move new proto workflow to v2, deferring full normalization
    skip proto workflow doesn't use modern buf features, but a mix of
    buf and shell scripting
@UnbornAztecKing UnbornAztecKing merged commit 8d60cd7 into main Nov 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants