Skip to content

Tokencore 2.0.1, monolith Docker/CI, external signing, DB token catalog#29

Merged
GalaxySciTech merged 1 commit intomasterfrom
cursor/tokencore-multichain-optimize-5cc6
May 3, 2026
Merged

Tokencore 2.0.1, monolith Docker/CI, external signing, DB token catalog#29
GalaxySciTech merged 1 commit intomasterfrom
cursor/tokencore-multichain-optimize-5cc6

Conversation

@GalaxySciTech
Copy link
Copy Markdown
Owner

Summary

This change completes the agreed plan for a single-module wallet service under src/, tokencore 2.0.1, operational Docker/CI alignment, and clearer extension points for multi-chain signing and configuration.

What changed

  • Dependency: com.github.galaxyscitech:tokencore 2.0.0 → 2.0.1 in build.gradle.
  • Build & deploy: Root Dockerfile (multi-stage bootJar), docker-compose.yml uses ./Dockerfile, GitHub Actions and GitLab CI build ./gradlew bootJar and artifact build/libs/*.jar. Removed the duplicate top-level wallet-webapi/ tree.
  • Spring configuration: src/main/resources/application.yml now wires MySQL (DB_URL / DB_USERNAME / DB_PASSWORD), JPA (ddl-auto: none, batch hints), Caffeine cache, keystore env alignment, Actuator + Prometheus (spring-boot-starter-actuator, micrometer-registry-prometheus).
  • SysConfigKey: Repaired a corrupted enum file and added scheduler keys plus ETH_GAS_FALLBACK_URL (optional HTTP JSON fallback when the node cannot serve eth_gasPrice).
  • Signing: ChainSigningService routes BTC/ETH USDT signing through tokencore or an optional HTTP external signer when wallet_chain_config.signing_backend is EXTERNAL. New column documented in db/wallet_db.sql and optional migration db/002_wallet_chain_signing_backend.sql. WalletProperties binds wallet.signing, wallet.tokencore (ETH_SIGN_CHAIN_ID, BTC_SIGN_CHAIN_ID), and wallet.external-signer.
  • HSM: HsmXServiceImpl supports EOS, DOGECOIN, FILECOIN import paths from tokencore 2.0.1; Bitcoin/ETH/USDT signing uses configurable chain id strings instead of hard-coded mainnet constants.
  • RPC: RpcClient.getGasPrice no longer calls the defunct ethgasstation endpoint by default; RpcClient.bitcoinStyleRpc centralizes UTXO RPC selection; WalletXServiceImpl.getUtxos uses it.
  • E2 token catalog: Removed enum TokenKey; TokenCatalogService reads distinct chains/symbols from the token table; BlockChainController.get_support_token uses it; CacheServiceImpl no longer auto-inserts rows from the removed enum.
  • Package rename: com.wallet.webapicom.wallet.api (directory src/main/kotlin/com/wallet/api/).
  • Docs & scripts: README / README_CN / .env.example / build.sh / start.sh updated for the monolith layout.

Verification

  • ./gradlew test and ./gradlew bootJar succeed locally.
  • Docker image build was not executed in this environment because the docker CLI is unavailable; the Dockerfile follows the same Gradle stages as CI.

Follow-ups (optional)

  • Run db/002_wallet_chain_signing_backend.sql on existing databases that were created before this PR.
  • Document or implement a reference external signer service for {baseUrl}/v1/sign if teams want EXTERNAL signing without writing their own adapter.
Open in Web Open in Cursor 

…ken catalog

- Upgrade GalaxySciTech tokencore to 2.0.1; fix broken SysConfigKey enum
- Add root Dockerfile, compose uses ./Dockerfile; align GitHub/GitLab CI to bootJar
- application.yml: datasource, JPA batch hints, actuator/prometheus, wallet.* props
- HsmXService: EOS/DOGE/FIL import paths; configurable ETH/BTC sign chain ids
- ChainSigningService + wallet_chain_config.signing_backend for EXTERNAL HTTP signer
- RpcClient: configurable ETH gas fallback URL; bitcoinStyleRpc for UTXO getUtxos
- Remove TokenKey enum; TokenCatalogService reads token table; rename webapi package to api
- Migration SQL for signing_backend column; remove duplicate top-level wallet-webapi/

Co-authored-by: Galaxy <GalaxySciTech@users.noreply.github.com>
@GalaxySciTech GalaxySciTech marked this pull request as ready for review May 3, 2026 07:25
@GalaxySciTech GalaxySciTech merged commit 30f11be into master May 3, 2026
1 check passed
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.

2 participants