Skip to content
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

Hard-coded value in core-exchange-json-rpc #31

Closed
NayiemWillems opened this issue Sep 14, 2019 · 1 comment
Closed

Hard-coded value in core-exchange-json-rpc #31

NayiemWillems opened this issue Sep 14, 2019 · 1 comment
Labels
Type: Bug The issue relates to broken or incorrect behaviour.

Comments

@NayiemWillems
Copy link

Expected Behavior

Installing core with the RPC module should allow users to communicate with the node and the network that the node is using.

Current Behavior

Instead of connecting to the network of the node, it grabs hard-coded values from 'exchange-json-rpc' that pulls data from the Ark network.

The package.json in 'core-exchange-json-rpc' shows a dependency called 'exchange-json-rpc' at line 24.

Heading over to this dependency in the 'network.ts' file, it pulls network data from Ark peers:
https://github.com/ArkEcosystem/exchange-json-rpc/blob/master/packages/rpc/src/services/network.ts

At line: 112 and 122.

Possible Solution

It should take the peers and port from a local folder or config file.
Probably in this format: ${resolve(process.env.CORE_PATH_CONFIG)}/peers.json

Steps to Reproduce (for bugs)

  1. Install a node from a bridgechain that is on the same node version as Ark. (Qredit is already patched with a temporary fix Qredit/core@28c6d10)
  2. Enable RPC
  3. Enter: curl -X POST -H "Content-Type: application/vnd.api+json" http://127.0.0.1:8080/ -d '{"jsonrpc":"2.0", "id":"1", "method":"transactions.info", "params":{"id":"b094b11e61c6f7ff8afb45aa1f264f1b14b175c6d40a8be6bb217989e40f18fe"}}'
  4. Replace transaction ID with the one that belongs to the bridgechain.
  5. It will return that the tx is not found, unless its a Ark transaction.

(any other command, like blockheight, network information etc will also return data from the Ark blockchain)

Context

Was trying to help TradeSatoshi integrate a bridgechain on their exchange using RPC.

Your Environment

Used core-control to install the node.

@ghost
Copy link

ghost commented Sep 14, 2019

Thanks for opening this issue! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@faustbrian faustbrian transferred this issue from ArkEcosystem/core Sep 15, 2019
@faustbrian faustbrian added the Type: Bug The issue relates to broken or incorrect behaviour. label Sep 15, 2019
@ArkEcosystem ArkEcosystem deleted a comment Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue relates to broken or incorrect behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants