Skip to content

Commit 13fa7f7

Browse files
authored
Tron roadmap compatibility (#497)
* Add compatibility-mode
1 parent c0ad2e2 commit 13fa7f7

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Compatibility Mode - Emulation
2+
3+
## The problem
4+
The Ravencoin asset platform could have an uphill climb getting adoption because of its incompatibility with the existing infrastructure. Most exchanges, and crypto merchant acceptance systems are configured to handle coins (tokens) that work like Bitcoin (RPC to bitcoind) or Ethereum (IPC to geth using web3).
5+
6+
Direct use of the RPC transfer call for moving assets has been possible from the day that assets launched on Ravencoin - November 5, 2018. But expecting each and every exchange to modify their infrastructure to handle assets with different RPC calls might slow down Ravencoin asset adoption.
7+
8+
## The solution - Compatibility Mode - Emulation
9+
The solution is to speed up adoption is to run ravend in compatibility mode that emulates the RPC capabilities of ravend, for an asset instead of RVN. Exchanges that have already added RVN, can add asset exchange quickly an easily using emulation for every asset they'd like to add.
10+
11+
As an example, normally the rpc call for transferring RVN is
12+
```sendfrom "fromaccount" "toaddress" amount ( minconf "comment" "comment_to" )```
13+
Ordinarily this call to ravend (port 8766) will transfer RVN
14+
15+
Configuring a different port for sending the TRONCO token will allow the same RPC call to transfer TRONCO instead of RVN. The advantage is that the only change needed for compatibility with a system that can already handle BTC and RVN is to use the port configured for TRONCO, or whatever asset you'd like.
16+
17+
### Configuration
18+
Every Bitcoin-type, or Ravencoin-type coin uses a different RPC port. For example, the standard RPC port for Bitcoin is 8332, and the standard RPC port for Ravencoin is 8766.
19+
20+
An exchange can configure multiple Ravencoin assets by selecting a different port for each asset. Once configured, ravend will emulate a ravend daemon with RPC calls that send the specified asset, instead of RVN.
21+
22+
Configuration is done in ```raven.conf```
23+
```emulate=TRONCO:8888,FREE_HUGS:8889,MAIN/SUB:8890```
24+
25+
Each emulated asset must have its own port that is available on the machine.
26+
27+
The RPC username and password will use the same one as configured for Ravencoin.
28+
29+
### Detection of Emulation in Compatibility Mode
30+
An additional field is added to getblockchainfo for information.
31+
32+
```"emulate":"TRONCO:8888"```
33+
34+
This will be absent if not running in compatibility mode.
35+
36+
### Supported RPC Calls
37+
38+
Most of the Ravencoin RPC calls do not interact with assets. These can be straight pass-through. Only those that deal with transfers, and balances of RVN are switched to work with the specified asset.
39+
```getbalance ( "account" minconf include_watchonly )```
40+
```sendfrom "fromaccount" "toaddress" amount ( minconf "comment" "comment_to" )```
41+
```sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")```
42+
```sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")```
43+
```move "fromaccount" "toaccount" amount ( minconf "comment" )```
44+
```listtransactions ( "account" count skip include_watchonly)```
45+
```listunspent ( minconf maxconf ["addresses",...] [include_unsafe] [query_options])```
46+
```getreceivedbyaddress "address" ( minconf )```
47+
```getunconfirmedbalance```
48+
49+

0 commit comments

Comments
 (0)