I want to run some tests on monero, but I only want monerod to communicate to peers on my local network. I don't want it download the official blockchain. I want my wallet, which I will run from my local network, to only send transactions to the monerod instance running on my local network. Therefore, the blockchain on my computer will only have transactions from me. Is this possible? I see that you can run monerod in offline mode, but I'm not sure if this does what I want.
2 Answers
Start 2 nodes of a stagenet which only like talking to each other:
monerod --stagenet --no-igd --hide-my-port --data-dir node1 --p2p-bind-ip 127.0.0.1 --p2p-bind-port 48080 --rpc-bind-port 48081 --zmq-rpc-bind-port 48082 --add-exclusive-node 127.0.0.1:38080
monerod --stagenet --no-igd --hide-my-port --data-dir node2 --p2p-bind-ip 127.0.0.1 --rpc-bind-ip 0.0.0.0 --confirm-external-bind --add-exclusive-node 127.0.0.1:48080
Then start cli wallet on the same machine:
monero-wallet-cli --stagenet
and create a wallet. Use your new stagenet address to mine on one of the nodes by typing
start_mining <yourwalletaddress> 1
in the monerod window.
Notes:
- This also works on windows
- The above statements will create two directories in the working directory named
node1
andnode2
to hold the blockchain. - The new wallet files will also be in the working directory.
-
Thanks. After doing all of that, I see transactions on my wallet window showing up periodically. Where are these transaction coming from? The block height went from 1 to now 20.– user8982Jul 27, 2018 at 4:07
-
Blocks get mined every 2 minutes on average regardless if there are transactions or not. Your node is the one mining them. You are getting the mining reward.– m2049rJul 28, 2018 at 9:39
-
Thanks. Could you answer this question? It makes more sense than the existing answers.– user8982Jul 28, 2018 at 13:08
I am in MSYS2 environment. After I run the commands below: ./monerod.exe --stagenet --no-igd --hide-my-port --data-dir node1 --p2p-bind-ip 127.0.0.1 --p2p-bind-port 48080 --rpc-bind-port 48081 --zmq-rpc-bind-port 48082 --add-exclusive-node 127.0.0.1:38080 it ok
then run : ./monerod.exe --stagenet --no-igd --hide-my-port --data-dir node2 --p2p-bind-ip 127.0.0.1 --rpc-bind-ip 0.0.0.0 --confirm-external-bind --add-exclusive-node 127.0.0.1:48080
it shows: C:/tools/msys64/home/root/monero/build/MINGW64_NT-10.0-18362/master/release/bin/monerod.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
so how to solve it? thank you very much.