network

所属分类:区块链开发
开发工具:Java
文件大小:259KB
下载次数:0
上传日期:2023-04-21 18:51:29
上 传 者sh-1993
说明:  网络,一个由java实现的分布式、去中心化区块链网络和quourum协议
(network,A java-implemented distributed, decentralized blockchain network and quourum protocol)

文件列表:
BlueChain-1.png (73864, 2023-05-28)
LICENSE.md (35149, 2023-05-28)
bluechainlogo.png (46021, 2023-05-28)
network.iml (1223, 2023-05-28)
pom.xml (682, 2023-05-28)
src (0, 2023-05-28)
src\main (0, 2023-05-28)
src\main\java (0, 2023-05-28)
src\main\java\NetworkLauncher.java (5236, 2023-05-28)
src\main\java\config.properties (122, 2023-05-28)
src\main\java\node (0, 2023-05-28)
src\main\java\node\ClientConnection.java (2278, 2023-05-28)
src\main\java\node\Node.java (40656, 2023-05-28)
src\main\java\node\ServerConnection.java (3929, 2023-05-28)
src\main\java\node\blockchain (0, 2023-05-28)
src\main\java\node\blockchain\Block.java (687, 2023-05-28)
src\main\java\node\blockchain\BlockSkeleton.java (812, 2023-05-28)
src\main\java\node\blockchain\MerkleTree.java (6248, 2023-05-28)
src\main\java\node\blockchain\MerkleTreeProof.java (1916, 2023-05-28)
src\main\java\node\blockchain\Transaction.java (686, 2023-05-28)
src\main\java\node\blockchain\TransactionValidator.java (370, 2023-05-28)
src\main\java\node\blockchain\defi (0, 2023-05-28)
src\main\java\node\blockchain\defi\Account.java (687, 2023-05-28)
src\main\java\node\blockchain\defi\DefiBlock.java (691, 2023-05-28)
src\main\java\node\blockchain\defi\DefiTransaction.java (1049, 2023-05-28)
src\main\java\node\blockchain\defi\DefiTransactionValidator.java (4737, 2023-05-28)
src\main\java\node\blockchain\defi\Wallet.java (16846, 2023-05-28)
src\main\java\node\blockchain\test.java (1306, 2023-05-28)
src\main\java\node\communication (0, 2023-05-28)
src\main\java\node\communication\Address.java (651, 2023-05-28)
src\main\java\node\communication\BlockSignature.java (667, 2023-05-28)
src\main\java\node\communication\Message.java (1082, 2023-05-28)
src\main\java\node\communication\Messager.java (2629, 2023-05-28)
src\main\java\node\communication\MessagerPack.java (769, 2023-05-28)
src\main\java\node\communication\utils (0, 2023-05-28)
src\main\java\node\communication\utils\DSA.java (4146, 2023-05-28)
src\main\java\node\communication\utils\Hashing.java (1722, 2023-05-28)
src\main\java\node\communication\utils\Utils.java (3176, 2023-05-28)
... ...

# A java-implemented distributed, decentralized blockchain network ## Description This network is being developed for the purpose of student researchers, interested in developing blockchain solutions. We provide an alternate blockchain network option to expirement with, without the burden of high learning curves associated with softwares such as HyperLedger, Ethereum, etc. This software is not a public network costing gas fees to expirement with, nor is its implementation complex. With this, researchers or other curious people are invited expirement with and fork our software meet their use case. ## How to Use ### Prerequisites - Java 11 - Maven ### Running a Local Network 1. Navigate to the config.properties file (network/src/main/java/config.properties) 2. Configure the network to the specifications you desire. - **Warning:** The number of nodes your local machine can handle depends on the computing resources that the machine has. In addition, **networks over the size of 100 nodes may be subject to port exhaustion** depending on how many transcations are submitted in small time intervals. **Unexpected exceptions may occur as a result.** 3. Use Maven to compile and run the NetworkLauncher (navigate back to network/) mvn clean install java -cp target/network-1.0-SNAPSHOT.jar NetworkLauncher 4. Begin submitting transactions in new terminal - The transactions are arbitrary in content as of this version. - The Client application transaction args: Client trans - The Client as of now simply submits a transaction to an arbitrarily specified nodewhose content is an input string. That node gossips the transaction to the rest of the network java -cp target/network-1.0-SNAPSHOT.jar Client trans 8000 1 ### Running a cross-host Network For steps 1 and 2, please refer to the 'Running a Local Netork' section's steps 1 and 2 3. Use Maven to compile the NetworkLauncher (navigate back to network/) mvn clean install 4. Running the NetworkLauncher - For this step, since we plan to run our network across multiple hosts, please ensure that the networking and firewall permissions / setting allow TCP/IP connections from the ports and hosts you will specify - Using the NetworkLauncher java program in this context works by running the program on each host you plan on using. - Every node on each host is required to submit it's public key to the Node Registry, a directory intended to be shared across hosts. This allows each node in the network to properly use DSA with one another in addition to local peer discovery. - It is suggested to specify a '-t for each program in order for the networks to bind but wait to connect until you have every host setup - An example for our first host to run `java -cp target/network-1.0-SNAPSHOT.jar NetworkLauncher` - In this example we specified our host needs to wait 60 seconds before trying to connect to any nodes. We then gave it the port ranges and host names of the other nodes that we will want to connect with. - We would run a similar argument for each other host with slightly different ordering of the arguments

近期下载者

相关文件


收藏者