What we want
How can we increase root account balance when all balance got over in multiple nodes with the Same Network(Private Blockchain)?
What we have
First, We have setup Stellar Private Blockchain as Standalone using Stellar-Core v10.1.0-dirty and Stellar-Horizon v0.15.3-linux-amd64.
We have changed the following value for testing purpose.
https://github.com/stellar/stellar-core/blob/master/src/ledger/LedgerManagerImpl.cpp#L72
GENESIS_LEDGER_TOTAL_COINS 100 billion XLM to 218056 stroop.
GENESIS_LEDGER_BASE_RESERVE 10 XLM to 1000 stroop.
GENESIS_LEDGER_BASE_FEE is 100 stroop.
Reserver balance= 2 baseReserve = 2 1000 =2000 stroop
As per the GENESIS_LEDGER_BASE_RESERVE and GENESIS_LEDGER_BASE_FEE value, any account need to 2000 stroop as reserve balance.
we have created an account with starting balance of 2000 stroop and all rest amount of root account send to that account.
Only 2000 stroop maintained to root account.Now, the root account balance got over.
In Standalone node, we have updated root account balance with a specific value like 10 XLM in accounts table of stellar-core node db. The balance of root account get increased and we have also checked on our local stellar-explorer. Transactions are getting successfully executed.
Also, we are able to create a new account with starting balance of 2000 stroop from root account. It is working fine.
Configuration for two stellar-core nodes
We have setup Stellar Private Blockchain(RUN_STANDALONE=false) with two nodes.
Node1 configuration file
HTTP_PORT=11626
PUBLIC_HTTP_PORT=false
RUN_STANDALONE=false
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
NODE_SEED="SCQSBM46U7DFSKBS6DPUJ7EMEU6JHCKXQPN3YVL2567KAZO6I3R2MHMF self"
NODE_IS_VALIDATOR=true
DATABASE="postgresql://dbname=stellar_node02_db user=stellar_user password=stellar_user host=localhost"
# Comma separated peers list
KNOWN_PEERS=["127.0.0.1:11635"]
# The port other instances of stellar-core can connect to you on.
PEER_PORT=11625
COMMANDS=["ll?level=debug"]
FAILURE_SAFETY=0
UNSAFE_QUORUM=true
#The public keys of the Stellar testnet servers
[QUORUM_SET]
THRESHOLD_PERCENT=100
VALIDATORS=["$self"]
[HISTORY.vs]
get="cp /tmp/stellar-core/history/vs/{0} {1}"
put="cp {0} /tmp/stellar-core/history/vs/{1}"
mkdir="mkdir -p /tmp/stellar-core/history/vs/{0}"
We start the Stellar-Horizon with stellar-core Node1.
./horizon --port 8000 --ingest=true --db-url "postgresql://stellar_user:stellar_user@localhost:5432/stellar_horizon_db?sslmode=disable" --stellar-core-db-url "postgresql://stellar_user:stellar_user@localhost:5432/stellar_node01_db?sslmode=disable" --stellar-core-url "http://127.0.0.1:11626"
Node2 configuration file
HTTP_PORT=11636
PUBLIC_HTTP_PORT=false
RUN_STANDALONE=false
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
NODE_SEED="SB6LSAQZFWT2D3EYFKVY5OKRTZP32FMLPI3YTKYY52TFG4ZLLKEMKPHJ self"
NODE_IS_VALIDATOR=true
DATABASE="postgresql://dbname=stellar_node03_db user=stellar_user password=stellar_user host=localhost"
# Comma separated peers list
KNOWN_PEERS=["127.0.0.1:11625"]
# The port other instances of stellar-core can connect to you on.
PEER_PORT=11635
COMMANDS=["ll?level=debug"]
FAILURE_SAFETY=0
UNSAFE_QUORUM=true
#The public keys of the Stellar testnet servers
[QUORUM_SET]
THRESHOLD_PERCENT=100
VALIDATORS=["$self"]
[HISTORY.vs]
get="cp /tmp/stellar-core/history/vs/{0} {1}"
put="cp {0} /tmp/stellar-core/history/vs/{1}"
mkdir="mkdir -p /tmp/stellar-core/history/vs/{0}"
Thanks