Skip to content

Instantly share code, notes, and snippets.

View HAOYUatHZ's full-sized avatar
😈
POISONed

HAOYUatHZ HAOYUatHZ

😈
POISONed
View GitHub Profile
@HAOYUatHZ
HAOYUatHZ / MulMat.c
Last active April 9, 2018 09:13
MulMat
void mul(const Mat256x256i8& a, const Mat256x256i8& b) {
for(int i=0; i<256; i++) {
for(int j=0; j<256; j++) {
int tmp=0;
for(int k=0; k<256; k++) {
tmp+=int(a.d[i][k])*int(b.d[k][j]);
}
this->d[i][j]=((tmp&0xFF)+ ((tmp>>8)&0xFF))&0xFF;
}
@HAOYUatHZ
HAOYUatHZ / B3_setup.md
Last active May 7, 2018 13:29
B3 setup

B3 setup

  1. power cable Connection
  2. network cable Connection
  3. power up
  4. discover the device's IP address
  • windows: 找IP, may need to press the "IP report" button on the device
  • smart phone: fing in App/Google store, and look for "antminer"
  • linux/mac: 'ping antminer'
  1. visit the ip address (or http://antminer/) in a broswer
package main
import (
"fmt"
"math/big"
"strconv"
"encoding/hex"
"github.com/bytom/consensus/difficulty"
)
package cutil
import (
"testing"
"fmt"
"github.com/bytom/protocol/bc"
"time"
"reflect"
)
package main
import (
"encoding/json"
"log"
"os"
"github.com/bytom/api"
"github.com/bytom/consensus"
"github.com/bytom/consensus/difficulty"
make bytomd
rm ./solonet -rf
cmd/bytomd/bytomd init --chain_id solonet -r "./solonet"
cmd/bytomd/bytomd node --web.close -r "./solonet"
package main
import(
"fmt"
"math/big"
"github.com/bytom/consensus/difficulty"
)
func main() {
package mining
import (
"encoding/hex"
"io/ioutil"
"os"
"testing"
dbm "github.com/tendermint/tmlibs/db"
g++ -o c:\Go\src\github.com\bytom\mining\tensority\cgo_algorithm\lib\cSimdTs.o -c c:\Go\src\github.com\bytom\mining\tensority\cgo_algorithm\lib\cSimdTs.cpp -std=c++11 -pthread -mavx2 -O3 -fopenmp -fPIC
go build -tags="simd" c:\Go\src\github.com\bytom\cmd\bytomd\main.go
# ifeq ($(OS),Windows_NT)
# CCFLAGS += -D WIN32
# ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
# CCFLAGS += -D AMD64
# else
# ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
# CCFLAGS += -D AMD64
# endif
# ifeq ($(PROCESSOR_ARCHITECTURE),x86)
# CCFLAGS += -D IA32