Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up the private block chain of Ethernet Square on Microsoft Azure

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to set up the private block chain of Ethernet Square on Microsoft Azure, aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Nethereum supports Microsoft Azure, and here's how to deploy the ethersquare private block chain on Azure and start interacting with it:

1. Create an Azure account and, of course, log in directly if you already have one.

two。 Create a new resource on the left menu of Azure, as shown in the figure:

3. Enter ethereum consortium blockchain in the resource search resource search bar to select the ethereum consortium blockchain template, and then click Create to create.

4. Click create create to confirm the deployment model.

5. Enter the settings for the blockchain, and then click OK to OK.

Number of alliance members: the number of mining members in the network. A subnet will be formed for each mining member. (2 to 12 members can be set)

Number of mining nodes per member: the number of mining nodes deployed by each member. Total mining node = member * node of each member. (1 to 15 nodes can be set for each member)

Mining node storage performance: the storage type of the transaction database. (standard or advanced)

Number of transaction nodes: the number of transaction nodes to be created. (1 to 5)

Transaction node storage performance: the storage type of the transaction database. (standard or advanced)

The transaction node stores replication.

Stores the replication policy. (LRS,GRS,RAGRS)

Transaction node virtual machine size: the size of the virtual machine of the transaction node. (standard A, standard d, standard d-V2, standard F-series, standard DS, and standard FS)

6. Submit the network ID, some passwords, and then click OK to OK.

The network ID is preferably between 4 and 9 digits.

7. View the details of the blockchain, and then click OK to OK.

8. Agree (or disagree) the terms of use and give the Azure server a few minutes to deploy your blockchain.

Azure should take a few minutes to complete your blockchain.

9. Connect to your block chain

Now that your chain is deployed, you can interact with it by creating an instance of Web3:

Var web3 = new Web3 ("http://nethxrkkoyst.eastus.cloudapp.azure.com:8545");

To find your blockchain URL, go to your Azure menu and select the instance type of Azure: Public IP Address public IP address, and then outline the URL provided in Overview.

You can also query or modify the port to use RPC to interact with your blockchain. In your Azure menu, selecting Network Security Group's RPC port will allow online allow-geth-RPC.

10. Create an account on the deployed block chain

Use the following C# command:

Var ecKey = Nethereum.Signer.EthECKey.GenerateKey (); var address = ecKey.GetPublicAddress ()

This will return the address of the new account, which should look like this: 0xC33c96764640662A51d073347Df73546aCAb7715, now you can display the private key of the account:

Var privateKey = ecKey.GetPrivateKey (); "0x42360260880d7be8d401552cc9e41020c726b10ee8d2622d138b09c86e29e7a5"

The next step is to create an account account with your private key:

Var account = new Account ("0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7")

Finally, you want to enable the transaction with the new account

Var web3 = new Web3 (account)

11. Set up an account to use Ethernet currency Ether

To start sending transactions, your newly created account will need some Ether Ethernet coins. Azure BaaS will automatically deploy Ether Faucet, which will provide any address of the Ether Ethernet currency.

Faucet's URL is the same as your block chain and can be accessed from your browser.

Paste your account address, which should import 1000 Ether ethernet into your account.

This is the answer to the question about how to set up the private block chain of Ethernet Square on Microsoft Azure. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report