# Test environment:

Operating system: macOs Mojave 10.14.2 8G 256G SSD JDK 1.8 (The use of Oracle jdk version is recommended)

# Before you start:

  1. JDK 1.8 (The use of Oracle jdk version is recommended)

  2. Obtain at least two pairs of private keys and addresses in the format of tron network (get the address https://tronscan.org/#/wallet/new or tronweb) address_A, private_A; address_B, private_B; address_C, private_C; Note: The keystore file is generated by wallet/new, and the file name is named after the address.

  3. Deploy at least one SuperNode for block production;

  4. Deploy any number of FullNode nodes to synchronize blocks and broadcast transactions;

**Note: Only one SR node and one fullnode node are set up in this example**

# Deployment guide

**1. Get FullNode.jar, Soliditynode.jar by compiling or release.**

**a. Compile by downloading the source code**

1). Create the code directory

2). Download java tron ​​source code

3). Compile the java-tron project

**b. Get the latest version of the jar package directly through release** [https://github.com/tronprotocol/java-tron/releases](🔗)

**2. Configuration file**

**a. Get the Super Node Configuration File**

1). Download the private_net_config.conf file [ https://github.com/tronprotocol/tron-deployment/blob/master/private_net_config.conf](🔗)

2). Modify the **localwitness **in the configuration file.

3). Change **genesis.block.witnesses** in the configuration file to the address corresponding to the private key in localwitness

4). Change **p2p.version **to any positive integer except for 11111

5). Set the first SR’s **needSyncCheck** to false, others true

6). Change **node.discovery.enable** to true.

7). Write the account address that needs to be generated to **genesis.block.assets** as needed

7). Name the configuration file supernode.conf

**b. Get the full node configuration file**

1). Download the private_net_config.conf file, [https://github.com/tronprotocol/tron-deployment/blob/master/private_net_config.conf](🔗)

2). Change the seed.node ip.list in the configuration file to the IP address and the port of the SR. ( in this case)

3). Set **p2p.version** to be the same as p2p.version of the super node. 4). Set **genesis.block **to be consistent with genesis.block configuration in the super node. 5). Set **needSyncCheck** to true 6). Set **node.discovery.enable** to true 7). Name the configuration file fullnode.conf

**3. Node Deployment**

** a. Deploying super nodes**

** b. Deploying full node**

After the node is enabled, logs and output-directory will be generated on the sibling directory of java-tron.jar logs: node log files output-directory: node data storage directory

**Command line parameter description:** --witness: enable the witness function, i.e .: --witness. --log-config: Specify the log configuration file path, i.e .: --log-config logback.xml. -c: Specify the configuration file path, i.e .: -c config.conf.

**The use of log file:** You can modify the level of the module to control the output of the log. The default level of each module is INFO. For example, to only print the information above the warn level of the network module, you can modify it as follows. <logger name = "net" level = "WARN" />

**Note:** 1). If SR and fullnode are on the same host, it is recommended to create separate folders for SR and fullnode to facilitate troubleshooting based on logs.

2). It is not possible to exclude super nodes other than myself from joining, and specific operations such as network isolation can be performed according to their own needs.

**4. Proposal **

In order to be consistent with the mainnet environment, it is necessary to keep the proposal in the private chain the same with the mainnet proposal. Please note: some proposals have a sequential order, **and it is recommended to make a proposal according to the proposal_id of the main network.** a. Use the wallet / proposalcreate interface to create proposals, sign and broadcast b. Use the wallet / proposalapprove interface to approve proposals, sign and broadcast Please refer to the documentation for specific interface usage: [HTTP documentation] (https://tronprotocol.github.io/documentation-zh/api/http/)

**Note: ** If you need to quickly pass the proposal, you need to modify it as follows

  1. Modify the proposal effective time parameter, proposalExpireTime = 259200000 // 3 day: 259200000(ms) (modify block.proposalExpireTime in the configuration file)

  2. Modify the time interval of super representative adjustment, the current default is 6 hours. Can be modified by proposal

**All the current mainnet proposals and related information:** [https://api.trongrid.io/wallet/listproposals](🔗) [ https://tronprotocol.github.io/documentation-zh/mechanism&algorithm/sr/](🔗)

**The proposals passed by the mainnet are organized as follows:**