Ethereum test address
If you want to query the transaction records on the main network, you can use Etherscan. However, if you build your own private chain, how should you query the transaction records
the answer is that you need to listen to the logs on the chain, save them in the database, and then query them in the database. For example:
< pre t = "code" L = "Java" > varaddr = & quot& quot;< br />varfilter=web3.eth.filter({fromB lock:0 ,toBlock:' latest', address:addr });< br />filter.get(function(err,transactions){transactions.forEach(function(tx){
vartxInfo=web3.eth.getTransaction(tx.transactionHash);
/ / at this time, the transaction information txinfo can be stored in the database
})< br />}); Pre >
Web3. Eth. Filter() is used to monitor the log on the chain, and Web3. Eth. Gettransaction() is used to extract the information of the specified transaction. Once the transaction information is obtained, it can be stored in the database for query
recommend a practical introction, you can see: Ethereum tutorial
at present, the central bank's research on digital currency is still at an early stage, and it only plans to launch digital currency, but it is still far away from issuing digital currency. When the central bank studies digital currency, it may study the existing mainstream digital currencies such as bitcoin, Ruitai, dogcoin, etc.
etherem has a lot of block chain procts with regional centralization, such as digix, gold Internet of things and so on.
Transaction
the behavior of blockchain transaction follows different rule sets
< UL >e to the distributed and unlicensed nature of public blockchain, anyone can sign the transaction and broadcast it to the network
according to different blockchains, traders will be charged a certain transaction fee, which depends on the needs of users rather than the value of assets in the transaction
blockchain transactions do not require any central authority verification. It only needs to use the digital signature algorithm (DSA) corresponding to its blockchain to sign it with the private key
once a transaction is signed, broadcast to the network and mined into a successful block in the network, the transaction cannot be recovered
Ethereum transaction structure
Ethereum transaction data structure: transaction 0.1 eth
{& 39; nonce': 39; 0x00', // Decimal: 0
& 39; gasLimit': 39; 0x5208', // Decimal system: 21000
& 39; gasPrice': 39; 0x3b9aca00', // Decimal system: 10000000000
& 39; to': 39; 39; ,// Sending address
& 39; value': 39; 0x16345785d8a0000',// 100000000000000000 ,10^17
' data': 39; 0x', // Decimal representation of null data; chainId': 1 / / blockchain network ID
}
these data have nothing to do with the transaction content, but have something to do with the execution mode of the transaction. This is because when you send a transaction in Ethereum, you must define some other parameters to tell miners how to handle your transaction. Transaction data structure has two attribute designs & quot; gas": & quot; gasPrice",& quot; gasLimit"
" gasPrice": The unit is Gwei, which is 1 / 1000 eth, indicating the transaction cost
& quot; gasLimit": The maximum gas charge allowed for the transaction
these two values are usually filled in automatically by the wallet provider
in addition, you need to specify which Ethereum network to execute the transaction (chainid): 1 represents the Ethereum main network
ring development, tests are usually carried out locally and on the test network, and transactions are carried out through the test eth issued by the test network to avoid economic losses. After the test, enter the main network transaction
in addition, if you need to submit some other data, you can use & quot; data" And & quot; nonce" Attach as part of a transaction
a nonce (number used only once) is the value used by Ethereum to track transactions, which helps to avoid double spending and replay attacks in the network
Ethereum transaction signature
Ethereum transaction involves ECDSA algorithm. Taking JavaScript code as an example, the popular ethers.js is used to call ECDSA algorithm for transaction signature
you can use the online application composer to deliver signed transactions to Ethereum. This is known as "offline signature.". Offline signatures are particularly useful for applications such as status channels, which are smart contracts that track the balance between two accounts and transfer funds after a signed transaction is submitted. Offline signature is also a common practice in dexes
you can also use online wallet to create signature verification and broadcast through Ethereum account
with Portis, you can sign a transaction to interact with the gas station network (GSN)
< / UL >
the Xueshuo innovation blockchain Technology Workstation of Lianqiao ecation online is the only approved "blockchain Technology Specialty" pilot workstation of "smart learning workshop 2020 Xueshuo innovation workstation" launched by the school planning, construction and development center of the Ministry of ecation of China. Based on providing diversified growth paths for students, the professional station promotes the reform of the training mode of the combination of professional degree research, proction, learning and research, and constructs the applied and compound talent training system
configure by yourself command:
ifconfig
eth0
IP address
netmask
subnet mask
get IP address automatically:
dhclient
(1) using winarpattack for
this software can detect many items, and it can also detect all the attacks it can carry out through its own detection function. I have verified this on two virtual machines, The commonly used functions are as follows:
source MAC address mismatch and target MAC address mismatch
arp scanning - to detect which hosts are scanning the LAN through ARP requests, so as to get a list of hosts
arp_ Antisniff_ Scan - detect which host is in sniffer state in LAN, so as to know who is sniffing
host mainline - detect online host
host changes IP - host changes its IP address or adds a new address
host changes MAC -- host changes its MAC address
new host -- new host is found
host adds IP -- host adds a new IP address
multi IP host -- host has less than one IP address
multi MAC host -- host has less than one MAC address
attack flood -- list which hosts sent Many ARP packets to other hosts
attack spoofing -- the host sends specific ARP packets to two targets of sniff data, so the cheated data is exposed
attack deception in LAN -- the host makes all the hosts in LAN believe that it is the gateway, so the thief can sniff the data sent by all the hosts to the gateway
local ARP list changes - now winarpattacker can monitor the local ARP list. When the MAC address of a host in the local ARP list changes, winarpattacker can report this phenomenon
through winarpattack, we can roughly know which hosts in the local area are performing ARP address spoofing, but this is not the advantage of this software. We can also use more specialized software to detect, that is Antisniff<
(2) using Antisniff software for detection
this is a very classic software, but because it appeared earlier and did not update later, its best running platform is WinNT, which can also run under 95 / 98, but according to my experimental test, this software runs very unstable under 98, Under XP, it will prompt that the network card cannot be found and cannot be used. Therefore, the best platform is NT. It's really hard to find an NT installation disk these days. It took me a lot of effort to build the NT virtual machine, but the detection effect is good. It only takes three steps to get the result:
1 Define the host or network segment to be scanned
click "network configuration" - "host (s) to scan" in turn, and then select whether to scan "host" (stand-alone) or "range" (network segment range), so as to define the host to be scanned in the local area
2. Scanning
in order to speed up the scanning time, we can limit the items to be scanned, because it is to detect ARP address spoofing. In "detection tests" of "scanner configuration", just select ARP test, and then click the inverted triangle symbol to start scanning
3. View the results
if it is found that the network card of a host in the LAN is in the mixed mode, Antisniff will give an alarm immediately. First pop up a skeleton pattern, and then report which IP address of the host is in the mixed mode. Then we can check the specific results in the "report" item, Click "report on machine", and then select a specific IP host. In the ARP test res. column, if "1" appears, the network card is in mixed mode. If "0" appears, the network card is in normal mode. Why a host network card is sometimes in mixed mode and sometimes in normal mode (as shown in Figure 4), the key lies in whether the host has turned on the ARP address spoofing software at that time. From this, we can see that the detection result of Antisniff is quite accurate< Third, ARP address spoofing protection
winarpattack has its own protection function, but we actually have a better choice. I have tested it. If we install 360 security guard's ARP firewall or color shadow ARP firewall personal version and other software, the attack launched by winarpattack will not succeed, so ARP address spoofing is very annoying, However, as long as we do a good job in self-protection, we can still be immune
the purpose of introcing the above software is to let you know more about the attack content in the process of ARP address deception protection in LAN, so that you can win a hundred battles.