Matrix Mainnet Update Notice
This patch will bring the following changes to Matrix AI Network:
In the current version, mining nodes that are elected but fail to report their base compute will getblacklisted and lose all rewards for that round.The new patch will raise the penalty for backlisted mining nodes. If blacklisted, your node is alsounable to become a candidate mining Masternode for the next election cycle
We have found two flaws in the current version:
In the current version, the search space for POW mining is only 4 bytes large. When the difficultylevel is too high, an ideal target value may not be found after searching the entire space. In thenew version, we’ll add a 12-byte space, at the initial 12 bytes of the mixDigest field of a blockhead
The new version will introduce the following bug fixes.
Welcome! This guide is intended to get you running on the MATRIX network. To ensure your client behaves gracefully throughout the setup process, please check your system meets the following requirements:
OS | Windows, Linux | |
---|---|---|
CPU | 8 Core (Intel(R) Xeon(R) CPU X5670 @2.93GHz) | |
RAM | 16G | |
Free HD | 300G | |
Bandwidth | 20M | |
First of all, you need to clone the source code from MATRIX repository:
Git clone https://github.com/MatrixAINetwork/go-matrix.git, or
wget https://github.com/MatrixAINetwork/go-matrix/archive/master.zip
Branch: Master
Tag: v1.1.7
Building gman requires both a Go (version 1.7 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run your 'make gman' command
You can also obtain our compiled gman from github [https://github.com/MatrixAINetwork/GMAN_CLIENT/tree/master/MAINNET/20200520]https://github.com/MatrixAINetwork/GMAN_CLIENT/tree/master/MAINNET/20200520)
Step 1: Check out what you need to prepare (most of them can be obtaind from go-matrix repository)
/gman: exe file
/MANGenesis.json: genesis file
/chaindata: a folder which you should create
man.json: common profile which shall be put under /chaindata
picstore:a folder which shall be put under /chaindata
Step 2: Run Initiate command
./gman --datadir ./chaindata/ init ./MANGenesis.json
Step 3: Visit our web wallet to create a new wallet address, and save your keystore file as well as password.
Please refer to ['Guide to Web Wallet']
Carry out your deposit actions if you want to run for a miner or validator node (you can find steps on the above guide)
Step 4: Copy your keystore file to folder keystore which is generated at Step 2 (/chaindata/keystore)
Step 5: Create a file named signAccount.json under root, and its content is like:
[
{
"Address":" MAN.gQAAHUeTBxvgbzf8tFgUtavDceJP ",
"Password":" pass123456"
}
]
Then, run:
./gman --datadir ./chaindata aes --aesin ./signAccount.json --aesout entrust.json
Upon the window prompt, you will be asked to set a password (which should contain upper-case letter[s], lower-case letter[s], number[s] and special character[s])
Step 6: Copy the generated entrust.json to root
Step 7: Start gman
./gman --datadir ./chaindata --networkid 1 --debug --verbosity 5 --manAddress [your man.address here] --entrust ./entrust.json --gcmode archive --outputinfo 1 --syncmode full
for example,
./gman --datadir ./chaindata --networkid 1 --debug --verbosity 5 --manAddress MAN.gQAAHUeTBxvgbzf8tFgUtavDceJP --entrust ./entrust.json --gcmode archive --outputinfo 1 --syncmode full
In this step, you will need to input the password set in step 5.
Step 8: Run 'Attach': ./gman attach /chaindata/gman.ipc (gman.ipc is generated under /chaindata when starting gman)
Step 1: Check out what you need to prepare (most of them can be obtaind from go-matrix repository)
/gman: exe file
/MANGenesis.json: genesis file
/chaindata: a folder which you should create
man.json: common profile which shall be put under /chaindata
picstore:a folder which shall be put under /chaindata
Step 2: Run Initiate command
./gman --datadir ./chaindata/ init ./MANGenesis.json
Step 3: Start./gman --datadir ./chaindata --networkid 1 --outputinfo 1 --syncmode 'full'
Step 1: Check out what you need to prepare (most of them can be obtaind from go-matrix repository)
/gman: exe file
/MANGenesis.json: genesis file
/chaindata: a folder which you should create
man.json: common profile which shall be put under /chaindata
picstore:a folder which shall be put under /chaindata
Step 2: Run Initiate command
gman.exe --datadir chaindata\ init MANGenesis.json
Step 3: Create a file named signAccount.json, whose contents are:
[
{
"Address":"MAN.2skMrkoEkecKjJLPz6qTdi8B3NgjU ",
"Password":"haolin0123"
}
]
Step 4: Run:
gman.exe --datadir chaindata aes --aesin signAccount.json --aesout entrust.json
Upon the window prompt, you will be asked to set a password (which should contain upper-case letter[s], lower-case letter[s], number[s] and special character[s])
Step 5: Start gman
gman --datadir chaindata --networkid 1 --debug --verbosity 5 --manAddress MAN.2skMrkoEkecKjJLPz6qTdi8B3NgjU --entrust entrust.json --gcmode archive --outputinfo 1 --syncmode full
In this step, you will need to input the password set in step 5.
Step 8: Open another window
gman attach ipc:\\.\pipe\gman.ipc
gman.ipc is generated under /chaindata when starting gman)
Step 1: Check out what you need to prepare (most of them can be obtaind from go-matrix repository)
/gman: exe file
/MANGenesis.json: genesis file
/chaindata: a folder which you should create
man.json: common profile which shall be put under /chaindata
picstore:a folder which shall be put under /chaindata
Step 2: Run Initiate command
gman.exe --datadir chaindata\ init MANGenesis.json
Step 3: Start gman
gman --datadir chaindata --networkid 1 --outputinfo 1 -- syncmode full
Copyright 2018-2020 The MATRIX Authors
The go-matrix library is licensed under MIT.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
变量 变量是所有编程语言支持的基本要素,从计算机底层来说只有内存地址以及内部存储的二进制数据。计算机科学是分层结构,我们使用不同的语言站在不同的层次来思考问题,当使用类似C++,Java,Python,Go等语言时候的变量,相当于我们给某块存储空间起了一个名字,这个名字起着一个线索的作用,通过这个变量名称我们可以找到内存中存储的数据。 变量类型 把Go支持的类型简单分为基本类型和高级类型。 基本类
public class Solution { public int[][] generateMatrix(int n) { int res[][] =new int [n][n]; if(n==0) { return res; } int x=0,y=0,N=n-1,a=1;
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n =3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6,
import java.util.*; public class Solution { public ArrayList<Integer> spiralOrder(int[][] matrix) { ArrayList<Integer>jieguo = new ArrayList<Integer>(); int x=0; int y=0;
matrix Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 509 Accepted Submission(s): 297 Problem Description Given a matrix with n rows and m
前言: 工具是为实现需求服务的。不同的工具提供了不同的方式,在选择过程中,选择最优最快的实现方式,这是一个成熟的码农必备的技能。本篇参考了CodeProject上的这篇文章:Using SSRS - Matrix Control to Generate Columns Dynamically 场景:SQL Server 2012 AdventureWorks2012 数据库。 目的:实现按照
(1)二分法 public class Solution { public boolean searchMatrix(int[][] matrix, int target) { if(matrix==null || matrix.length==0 || matrix[0].length==0) return false; int
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] Output: [1,2,3,6,9,8,7,4,5] Example
Go! 是一个 PHP 5.4 库,让 PHP 支持 AOP 面向方面编程方法,无需 PECL 扩展、Runkit、evals 或者 DI 容器支持。可使用 XDebug 轻松调试。 示例代码: // Aspect/MonitorAspect.phpnamespace Aspect;use Go\Aop\Aspect;use Go\Aop\Intercept\FieldAccess;use Go\
命令go vet是一个用于检查Go语言源码中静态错误的简单工具。与大多数Go命令一样,go vet命令可以接受-n标记和-x标记。-n标记用于只打印流程中执行的命令而不真正执行它们。-n标记也用于打印流程中执行的命令,但不会取消这些命令的执行。示例如下: hc@ubt:~$ go vet -n pkgtool /usr/local/go/pkg/tool/linux_386/vet golang/
命令go fix会把指定代码包的所有Go语言源码文件中的旧版本代码修正为新版本的代码。这里所说的版本即Go语言的版本。代码包的所有Go语言源码文件不包括其子代码包(如果有的话)中的文件。修正操作包括把对旧程序调用的代码更换为对新程序调用的代码、把旧的语法更换为新的语法,等等。 这个工具其实非常有用。在编程语言的升级和演进的过程中,难免会对过时的和不够优秀的语法及标准库进行改进。这样的改进对于编程语
Pact Go的版本目前支持Pact v2规范,访问网站开始学习。 Go-Kit例子 Pact Go代码库中有一个详细的Go Kit 例子,介绍如何使用Pact去测试Go Kit微服务。 原生Go实现 还有一个Go版本的Pact(兼容pact v1.1),不需要运行一个守护进程。如果你不需要v2+的匹配以及运行守护进程,可以考虑使用或者为Pact Go贡献。
Panic表示的意思就是有些意想不到的错误发生了。通常我们用来表示程序正常运行过程中不应该出现的,或者我们没有处理好的错误。 package main import "os" func main() { // 我们使用panic来检查预期不到的错误 panic("a problem") // Panic的通常使用方法就是如果一个函数 // 返回一个我们不知道怎么处理
使用os.Exit可以给定一个状态,然后立刻退出程序运行。 package main import "fmt" import "os" func main() { // 当使用`os.Exit`的时候defer操作不会被运行, // 所以这里的``fmt.Println`将不会被调用 defer fmt.Println("!") // 退出程序并设置退出状态值