If you are developing smart contracts, developing DApps, or participating in a hackathon, you are likely to want to iterate fast, and therefore need quicker feedback loops.
Running RSKj in Regtest mode is the best fit for these needs.
rskj-core-*.jar
, where *
is replaced by the release tag name, for example 3.1.0-IRIS
.java -cp ${JAR} co.rsk.Start \
--regtest \
--reset \
-Drpc.providers.web.cors=* \
-Dminer.client.autoMine=true \
co.rsk.Start
localhost
-only network, clears the database each time the node is started,
and enables both CORS and autoMine
(which makes it behave similar to ganache).Using --import
indicates that the block database should be imported from an external source. This is typically expected to be used when connecting to RSK Testnet or RSK Mainnet, and when a reduction in “initial sync time” is desired.
java -cp ${JAR} co.rsk.Start \
--import \
--testnet
Note that the
--import
feature is to be used ONLY for testing and development purposes and not in production.
Remote procedure calls (JSON-RPC) are the primary interface through which RSK nodes communicate over the network.
JSON-RPC is available over two network transport protocols: HTTP and WebSockets
Note that RSK public nodes do not expose WebSockets, they are HTTP only. To work around this, you may either run your own RSK node, or use a third-party node provider, such as Getblock.
Go to top