Ethereum RPC event
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
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
Ruitai coin has not been launched on the third-party platform, but it is rumored that it will also be launched on the third-party platform.
it seems that the implementation of broadcast distributed environment is relatively complex. Understand the pomelo implementation, and find a solution to realize broadcasting though you don't think about it at first.
let's use pomelo to give chat an example Look at login. First, connect to the gate server:
function queryentry (uid, callback) {
var route = & 39; gate.gateHandler.queryEntry';
pomelo. Init ({
host: window. Location. Hostname,
port: 3014,
log: true
}, function () {
pomelo. Request (route, {/ / initiate a request to get the server address used to connect to the connector
uid: uid
}, function (data) {
pomelo. Disconnect()< br />if(data.code === 500) {
showError(LOGIN_ ERROR);< br />return;< br />}
callback(data.host, data.port);< br />});< br />});< br />};< The main purpose of the code is to communicate with the gate, and the gate is returned to the client to connect to the connector server address. Let's take a look at the gate server address:
/ / next function is used to perform some operations and return to data sending
handler.queryentry = function (MSG, session, next) {
var uid = msg.uid< br />if(! uid) {
next(null, {
code: 500
});< br />return;< br />}
// get all connectors
var connectors = this.app.getServersByType(' connector'); // Get the configuration information of the prime connector server
if (! Connectors || connectors. Length = = = 0) {
next (null, {/ / error, the second parameter wie returned to the client
code: 500
})< br />return;< br />}
// select connector
var res = dispatcher.dispatch(uid, connectors); // Select the connector server
next (null, {
code: 200,
host: res.host,
port: res.clientport
})< br />};< br />var crc = require(' crc');< br />
mole.exports.dispatch = function(uid, connectors) {
var index = Math.abs(crc.crc32(uid)) % connectors.length;< br />return connectors[index];< br />};
you should know that the gate server selects the connector server. Get the login code for the connection between the connector and the connector server:
/ / query entry of connection
query entry (user name, function (host, port) {
pomelo. Init ({
host: host, / / return to the connection between the connector server host and port
port:,
log: true
}, function() {
var route = " connector.entryHandler.enter"; // Log in
pomelo.request (route, {
Username: username,
rid: rid
}, function (data) {
if (data. Error) {
showerror (plicate_ ERROR);< br />return;< br />}
setName();< br />setRoom();< br />showChat();< br />initUserList(data);< br />});< br />});< br />});
let's call the connector server handlerenter to pass the parameter usernamerid (room ID). Let's see what the connector server enter does:
handler. Enter = function (MSG, session, next) {
var self = this< br />var rid = msg.rid;< br />var uid = msg.username + '* 39; + Rid / / group name should be added to user name
var sessionservice = self. App. Get ( 39; sessionService');< br />
//plicate log in
if( !! Sessionservice. Getbyuid (uid)) {/ / indicates the same user
next (null, {
code: 500,
error: true
})< br />return;< br />}
session.bind(uid); // Session is bound to uid
session. Set (& # 39; rid', rid);< br />session.push(' rid', function(err) {
if(err) {
console.error(' set rid for session service failed! error is : %j', err.stack);< br />}
});< br />session.on(' closed', onUserLeave.bind(null, self.app)); // Set the closed event handling function
/ / put user into channel
/ / session is applicable to select a chat server. To talk about the front-end server ID, the transmitting station should know which front-end servers of the front-end channel users are connected to
/ / select a chat server waiting for rid to ensure the same room and chatServer
self.app.rpc.chat.chatremote.add (session, uid, self.app.get(' serverId'), rid, true, function(users){
next(null, {
users:users // The remote server returns to the previous channel (user
})< br />});< br />};
this service provides add INS for various services in your system. Just restart the service
General method: control panel management tools services
on the right, the top d starts with it. Right click attribute. Set it to automatic. If it doesn't start, click start on the side
if you can't start it in the normal way, you have to use the following method:
remember the rampant & quot; Shock wave & quot; Virus, right? It attacks Windows 2000 / XP / 2003 operating system based on NT kernel by using DCOM vulnerability of RPC service. Many users disable RPC service in order to avoid its attack. But when they want to enable RPC service again, they find that & quot; RPC service properties & quot; The & quot; Start type & quot; Drop down list box and & quot; Start & quot; The button is grayed out, and the property page of the service is not even found
e to the strong interdependence between windows services, when RPC service is disabled, many system services relying on RPC service can not run normally, such as messenger service, Windows Installer service, etc; In addition, it may lead to some application running failure and system exception. Next, the author introces three ways to start the service< Method 1: modify the registry method
Click & quot; Start → run & quot;, Type & quot; Regedit" Open & quot; Registry Editor & quot;, Expand branch & quot; HKEY_ LOCAL_ MACHINE\ SYSTEM\ CurrentControlSet\ Services\ RpcSs", Change the value of the start item to & quot; 00000002", Just restart the system< Method 2: use sc.exe command
Click & quot; Start → run & quot;, Type & quot; cmd" Enter & quot; Command prompt & quot; Window, type & quot; sc config RpcSs start= auto" Command, the system will display & quot; SC ChangeServiceConfig SUCCESS", This enables the RPC service to start successfully
note: to use & quot; sc" The command must have windows 2000 / 2003 Resource Kit installed, otherwise it will not work
method 3: use the recovery console
take Windows XP system as an example, put the installation CD in the CD-ROM drive, and set the BIOS parameters to boot from CD-ROM; After starting the computer, the system will enter the Windows XP installation interface and press & quot; R" Key to log in to the recovery console. In the recovery console, type & quot; enable RpcSs service_ auto_ start" Command, and then type & quot; exit" Command, restart the system and log in in normal mode to start RPC service successfully
note: & quote; Enable" Is a command provided by the recovery console to start system services and device drivers. It can only be used under the recovery console.
CIH virus was written by a Taiwan University student named Chen Yinghao. The first pirated discs sold by two major international piracy groups were widely spread in Europe and the United States. Later, they were reprinted by internet websites, making them spread rapidly. At that time, it was a great disaster. Countless computer hard disks around the world were covered with junk data. This virus even destroyed the BIOS of the computer, and finally even the computer could not start. In 2001 and 2002, the virus revived several times. It's really an undead Xiaoqiang
loss estimation: hundreds of millions of dollars

