Position: Home page » Blockchain » Blockchain RPC settings

Blockchain RPC settings

Publish: 2021-05-25 11:24:38
1. How to run Ethereum source code go Ethereum
install MIPS based Linux header file
$CD $prjroot / kernel
$tar - xjvf linux-2.6.38. Tar. Bz2
$CD linux-2.6.38

create an include folder under the specified path to store related header files< br />$ mkdir -p $TARGET_ Prefix / include

ensures that the Linux source code is clean
$make mrproper

generates the required header file< br />$ make ARCH=mips headers_ check
$ make ARCH=mips INSTALL_ HDR_ PATH=dest headers_ Install

all the files in dest folder to the specified include folder< br />$ cp -rv dest/include/* $TARGET_ Prefix / include

delete dest folder at last
$RM - RF dest
$LS - L $target_ PREFIX/include
2. How to store information on the blockchain: call the API provided by the blockchain platform

generally, the blockchain platform will provide corresponding interfaces, such as RPC, json-rpc, HTTP, etc. of course, the platforms are not the same, and the degree of friendliness is different

some companies specializing in API, such as blockcypher, can provide friendly calling interfaces, and it is not very convenient to write answers on the mobile phone, Search below

as for the storage content, add a point: in addition to the conventional cloud storage, file entities on the file hash record chain also have blockchain based storage schemes, such as IPFs, storej and so on
3. The development is OK. I think it is more stable than other platforms.
4. In the actual development, we often encounter some situations like this,
(1) in the case of sudden high concurrency, when the server is under great pressure and calls some methods for more than 100ms and does not respond, we should automatically reject the service instead of blocking until the server crashes, It can be regarded as a disguised service degradation
(2) for the unpredictable code that may have deadlock, add time threshold limit to avoid unlimited resource competition
(3) for the unpredictable code that may have deadlock, add time threshold monitoring, Avoid dead cycle deterioration

some mature open source frameworks generally have the function of timeout response, such as
search framework: Lucene, Solr, elasticsearch,
RPC framework: Dubbo, thrift,
service coordination framework: zookeeper, etc.
if we want to add this function, what should we do
in fact, it's not difficult to add a timing function before and after the method call. If the threshold is exceeded, the thread should be terminated actively and the exception code should be thrown. Of course, in order not to affect the operation of the main service, this code should run independently in a sub thread, rather than coupled in the main thread. The idea is roughly the same. Of course, in order not to build a wheel repeatedly, we suggest to use Google's open source guava toolkit, which provides many useful functions, including the automatic termination of timeout method introced this time, and some functions to limit network traffic or the number of visits within a specified period of time, You can see guava's documentation for yourself<
timelimiter is an interface. There are two subclasses below,
faketimelimiter, which is often used to limit time-out debugging ring debugging.
simpletimelimiter is often used in formal methods, which call method time-out, that is, throw exception.
this paper focuses on the use of simpletimelimiter, There are mainly two methods in this class:
(1) newproxy implements timeout interception through JDK dynamic proxy and callwithtimeout
(2) callwithtimeout implements timeout interception through callable callback
the difference between the two methods lies in that the strategy implemented through proxy can be applied to every called method in this class, The implementation of timeout interception
and the implementation strategy through callback is applicable to the implementation of timeout interception only for a certain code block or method
introce the latest guava package through Maven:
java code

& lt; dependency> < br /> < groupId> com.google.guava</ groupId> < br /> < artifactId> guava</ artifactId> < br /> < version> 19.0</ version> < br /> </ dependency> <
A: Interception Based on proxy mode:
since guava uses JDK dynamic proxy to implement AOP interception, it requires that the proxy class must have an interface implementation, so it's a little troublesome to use.
we need to define an interface first, then define the implementation class, and rewrite the method to be called:
b: callback based usage, which is relatively simple, Because there is no need to use proxy mode,
both methods can implement method call timeout interruption, proxy mode is suitable for class level method timeout interruption, while callback based mode is more suitable for any single method.
5. Use multithreading to deal with similar problems
put the program calling this WebService into an independent thread a, and then create another thread B for timing. Thread a and thread B share a variable responseok

start the thread B before calling WebService in thread A. After successful return, set responseOK=true.
when thread B starts, it will stop timing if responseok = = true. If the timing exceeds 20 seconds, it will terminate thread a and return an error message

it seems that if the server times out when calling WebService, an exception will be triggered. Just intercept this exception.
6. Enter the "command prompt" window, type the "SC config RPCs start = Auto" command, the system will display "SC changeserviceconfig success", so that the RPC service can be successfully enabled.
7. Blockchain itself is a tool called decentralization and distrust. For example, when you graate from University, the current practice is to have a certificate recognized and issued by an authoritative authority as a certificate
this setting is troublesome, because it is a piece of paper, which can be forged, and there will be various gaps. The issuing authority is also a person, and there will be various gaps in the middle. As long as it is related to people, there will be various possibilities related to which media
blockchain provides a good opportunity. As soon as you graate, you can generate a record on the blockchain. No one can change this record. This thing exists objectively. As a physical existence, and then as a data existence, blockchain will be generated
in this way, it is easy for anyone who wants to find out where he graated from
this is similar to the big data often used in social networking (WeChat) and payment platforms (Alipay, Yi Bao).
8. First, the POS + pod hybrid consensus mechanism of the exclusive game community greatly improves the efficiency and consistency of the public chain network
Second, community autonomy. All decisions are made by community members. Under the hybrid consensus mechanism, both POS krypton players and pod technology players have higher yield and discourse power, which effectively avoids the impact of centralized computing power and financial resources on the whole game ecology, and thus reces the risk of bifurcation. If a node wants to propose a bifurcation for a certain protocol or standard, all nodes need to participate in the voting. If the pod + POS weighted value of the voting result exceeds 50%, the system defaults to the chain with high weighted value as the effective chain, and all nodes will migrate to the new chain mining at the time agreed in the voting result
thirdly, because game players have requirements for the performance and bandwidth of hardware devices, vs public chain sets the node players involved in accounting into two categories: full node and light node. Players can manually switch between full node and light node. Generally, light node mode is adopted in the process of the game to provide more hardware support for the game, and full node mode is started after the end of the game and ring the hang up period
fourthly, all the transaction rights in the game come from the players. Only after the players are authorized by the exclusive secret key, the game assets can be circulated. At the same time, all transaction data are encrypted by ECC (elliptic encryption algorithm), which is a modern cryptography technology, to ensure the information security of blockchain
fifthly, as a vertical public chain in the game field, vs will first complete the overall solution of decentralized game proction, virtual asset distribution and token economy operation. It includes game engine, developer environment, standard SDK, etc., which reces the difficulty and threshold for game developers to enter blockchain game development from various environments, greatly reces the workload and cost of game development team, and also makes vs public chain highly scalable.
9.

rent a server: my.vultr.com choose a $10 server per month to use the following instructions on Ubuntu server 18.04masternode. The server ensures that you have the following requirements- Set the number of coins required by the master node- A wallet for coins- Server or VPS. The explanation is divided into three parts. Set the control wallet (1 / 2) to open your wallet until the wallet has downloaded the complete blockchain. Go to tools. Click debug console. This is the console where you will execute all the commands. Create a masternode private key. The masternode genkey sample output shows your collateral address. getaccountaddress " MN1" The sample output records the master node private key and satellite address. Set up VPS and install Ubuntu server 18.04 on VPS. Update your Ubuntu machine. Sudo apt get update the dependencies required for sudo apt get upgrade installation. sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libboost-all-dev libboost-program-options-dev sudo apt-get install libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-co Mpiler unzip software properties common to install Berkeley DB. sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install libdb4.8-dev libdb4.8++-dev Download the daemons and tools from the official website. Extract the tar file. Tar - xzvf tbtcoin-daemon-linux.tar.gz tar - xzvf tbtcoin-qt-linux.tar.gz install daemons and tools. Sudo MV tbtcoinn D tbtcoin cli tbtcoin TX / usr / bin / create a configuration file. MKDIR $home /. Tbtcoin CD $home CD tbtcoin.conf touch tbtcoin.conf VI tbtcoin.conf paste the following line in examplecoin.conf#---- rpcuser=rpc_ tbtcoin rpcpassword= rpcallowip=127.0.0.1 #---- listen=1 server=1 daemon=1 maxconnections=64 #---- masternode=1 masternodeprivkey=REPLACE_ WITH_ MASTERNODE_ PRIVATE_ KEY externalip=REPLACE_ WITH_ EXTERNAL_ IP_ OF_ VPS # --- - change the text "replace"_ WITH_ MASTERNODE_ PRIVATE_ "Key" is replaced by "masternode private key" created with the command "masternode genkey". For example, masternodeprivkey = dtnro2wo changes the text "replace"_ WITH_ EXTERNAL_ IP_ OF_ "VPS" is replaced by the external IP address of the VPS. For example, externalip = 136.144.171.201 use the following command to start the node. Examplecoin setting control wallet (2 / 2) use the command "getaccountaddress" Mn1 "" to transfer the required number of coins to the "subsidiary address" you created. Wait until the transaction has the required master node acknowledgement. Go to tools. Click debug console. Enter the following command. Masternode outputs sample output [{& quot& quot; : & quot; 0", } ] Go to tools. Click open masternode profile. Modify the following lines and paste them into Notepad. Mn1 136.144.171.201:9999 0 Mn1 - alias of your masternode. 136.144.171.201 - external IP of your VPS. 9999 - change the P2P port of the coin- Masternode private key from the command "masternode genkey"- Transaction hash from the command "masternode outputs". 0 - a single number in the command "masternode outputs". Save the file and close Notepad. Close the wallet and reopen it. Go to settings. Click "unlock wallet". Enter your wallet password and unlock your wallet. Go to tools. Click debug console. Use this command to start masternode. Master node start alias Mn1 takes + / - 30 minutes to activate your master node
1

Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750