A highly flexible blockchain architecture with great transaction performance.

Overview

XuperChain

Build Status Go Report Card GolangCI License Release

中文说明

What is XuperChain

XuperChain, the first open source project of XuperChain Lab, introduces a underlying solution to build the super alliance network. Based on the dynamic kernel of xupercore. You can use xuberchain as a blockchain infrastructure to build a compliant blockchain network.

XuperChain is the underlying solution for union networks with following highlight features:

  • Dynamic kernel

    • Based on the dynamic kernel technology, the free extension kernel components without kernel code intrusion and lightweight extension customized kernel engine are implemented to meet the needs of blockchain implementation for various scenarios.
    • It provides a comprehensive and high-performance implementation of standard kernel components.
    • Comprehensively reduce the cost of blockchain research and development, and open a new era of one click chain development.
  • High Performance

    • Creative XuperModel technology makes contract execution and verification run parallelly.
    • TDPoS ensures quick consensus in a large scale network.
    • WASM VM using AOT technology.
  • Solid Security

    • Contract account protected by multiple private keys ensures assets safety.
    • Flexible authorization system supports weight threshold, AK sets and could be easily extended.
  • High Scalability

    • Robust P2P network supports a large scale network with thousands of nodes.
    • Branch management on ledger makes automatic convergence consistency and supports global deployment.
  • Multi-Language Support: Support pluggable multi-language contract VM using XuperBridge technology.

  • Flexibility: Modular and pluggable design provides high flexibility for users to build their blockchain solutions for various business scenarios.

Contact

E-mail: [email protected]

Quick start

Requirements

  • OS Support: Linux and Mac OS
  • Go 1.12.x or later
  • GCC 4.8.x or later
  • Git

Build

Clone the repository

git clone https://github.com/xuperchain/xuperchain

Note: master branch contains latest features but might be unstable. for production use, please checkout our release branch. the latest release branch is v3.7.

Enter the xuperchain folder and build the code:

cd xuperchain
make

Note that if you are using Go 1.11 or later, go modules are used to download 3rd-party dependencies by default. You can also disable go modules and use the prepared dependencies under vendor folder.

Run test:

make test

Run

Run single node blockchain

There is an output folder if build successfully. Enter the output folder, create a default chain & start blockchains:

cd ./output
sh control.sh start

By doing this, a blockchain named "xuper" is created, you can find the data of this blockchain at ./data/blockchain/xuper/.

By default, the xuper chain will produce a block every 3 seconds, try the following command to see the trunkHeight of chain and make sure it's growing.

./bin/xchain-cli status

Run multi nodes blockchain

Generate multi nodes. Before running the following command, make sure you have run make to make the code.

make testnet

Enter the testnet directory, and then start three nodes separately (make sure the port is not used)

cd ./testnet/node1
sh ./control.sh start
cd ../node2
sh ./control.sh start
cd ../node3
sh ./control.sh start

Observe the status of each node

./bin/xchain-cli status -H :37101
./bin/xchain-cli status -H :37102
./bin/xchain-cli status -H :37103

Documentation

We have new documentation of Chinese version at XuperChain Chinese Docs, the English version is comming soon.

How to Contribute

We encourage you to contribute to XuperChain.

Please review the Contribution guidelines for information on how to get started contributing to the project.

License

XuperChain is under the Apache License, Version 2.0.

=====

中文说明

XuperChain是什么?

XuperChain是超级链体系下的第一个开源项目,是构建超级联盟网络的底层方案。基于XuperCore动态内核实现的。您可以使用XuperChain,作为区块链基础设施,构建合规的区块链网络。 。

核心特点

  • 动态内核

    • 基于动态内核技术,实现无内核代码侵入的自由扩展内核核心组件和轻量级的扩展订制内核引擎,满足面向各类场景的区块链实现的需要。
    • 提供了全面的、高性能的标准内核组件实现。
    • 全面降低区块链研发成本,开启一键发链新时代。
  • 高性能

    • 原创的XuperModel模型,真正实现了智能合约的并发执行和验证。
    • TDPOS算法确保大规模节点下的快速共识。
    • 使用AOT加速的WASM虚拟机,合约运行速度接近native程序。
  • 更安全

    • 多私钥保护的账户体系。
    • 鉴权支持权重累计、集合运算等灵活的策略。
  • 易扩展

    • 鲁棒的P2P网络,支持广域网超大规模节点。
    • 底层账本支持分叉管理,自动收敛一致性,实现真正全球化部署。
  • 多语言开发智能合约

    • 通过原创的XuperBridge技术,可插拔多语言虚拟机。
  • 高灵活性

    • 可插拔、插件化的设计使得用户可以方便选择适合自己业务场景的解决方案。

快速试用

环境配置

  • 操作系统:支持Linux以及Mac OS
  • 开发语言:Go 1.12.x及以上
  • 编译器:GCC 4.8.x及以上
  • 版本控制工具:Git

构建

克隆XuperChain仓库

git clone https://github.com/xuperchain/xuperchain

注意: master 分支是日常开发分支,会包含最新的功能,但是 不稳定。生产环境请使用最新的已发布分支,最新的已发布分支是v3.10

编译

cd xuperchain
make

跑单测

make test

单机版xchain

cd ./output
sh ./control.sh start
./bin/xchain-cli status

多节点xchain

生成多节点。 在运行下面的命令之前,请确保已经运行make去编译代码。

make testnet

进入testnet目录,分别启动三个节点(确保端口未被占用)。

cd ./testnet/node1
sh ./control.sh start
cd ../node2
sh ./control.sh start
cd ../node3
sh ./control.sh start

观察每个节点状态

./bin/xchain-cli status -H :37101
./bin/xchain-cli status -H :37102
./bin/xchain-cli status -H :37103

文档

关于XuperChain更详细、更深入的使用方法链接请查看XuperChain文档库

如何参与开发

  1. 阅读源代码,了解我们当前的开发方向
  2. 找到自己感兴趣的功能或模块
  3. 进行开发,开发完成后自测功能是否正确,并运行make & make test
  4. 发起pull request
  5. 更多详情请参见链接

许可证

XuperChain使用的许可证是Apache 2.0

联系我们

商务合作,请Email:[email protected], 来源请注明Github。 如果你对XuperChain开源技术及应用感兴趣,欢迎添加“百度超级链·小助手“微信,回复“技术论坛进群”,加入“百度超级链开发者社区”,与百度资深工程师深度交流!微信二维码如下:

微信二维码

Comments
  • 根据账户地址查询交易记录

    根据账户地址查询交易记录

    Brief of your idea cli增加命令,可以查询某个账户下的交易记录 bin/xchain-cli account txquery [address] -H 127.0.0.1:37101

    What could be better if XuperChain using your idea 以太坊的区块链浏览器可以根据地址查询

    Additional information 类似于这种:https://etherscan.io/address/0x5e201a38da7f5BC62bc8aebd2BB816a101676162

    opened by CyrusLiu158 11
  • app bin not exist!

    app bin not exist!

    $ sudo make
    rm -rf /home/linhieng/xuperchain/output
    bash /home/linhieng/xuperchain/auto/build_xvm.sh
    compile done!
    VERSION=HEAD COMMIT_ID=e684609 bash /home/linhieng/xuperchain/auto/build.sh
    go build -o /home/linhieng/xuperchain/output/bin/xchain -ldflags "-X main.Version=HEAD -X main.BuildTime=2022-07-08-16:53:42 -X main.CommitID=e684609" /home/linhieng/xuperchain/cmd/xchain/main.go
    /home/linhieng/xuperchain/auto/build.sh: line 36: go: command not found
    go build -o /home/linhieng/xuperchain/output/bin/xchain-cli -ldflags "-X main.Version=HEAD -X main.BuildTime=2022-07-08-16:53:42 -X main.CommitID=e684609" /home/linhieng/xuperchain/cmd/client/main.go
    /home/linhieng/xuperchain/auto/build.sh: line 36: go: command not found
    compile done!
    
    $ cd output/
    $ bash control.sh start
    app bin not exist!
    

    提示提示我 app bin 不存在,这是啥意思? 我查看了一下编译后的 output 结构,发现和文档里面的也不一样,bin 下少了东西

    $ tree output/
    output/
    ├── bin
    │   └── wasm2c
    ├── conf
    │   ├── contract.yaml
    │   ├── engine.yaml
    │   ├── env.yaml
    │   ├── ledger.yaml
    │   ├── log.yaml
    │   ├── network.yaml
    │   ├── server.yaml
    │   └── xchain-cli.yaml
    ├── control.sh
    └── data
        ├── genesis
        │   ├── poa.json
        │   ├── pow.json
        │   ├── tdpos.json
        │   ├── xpoa.json
        │   ├── xpos.json
        │   └── xuper.json
        ├── keys
        │   ├── address
        │   ├── private.key
        │   └── public.key
        └── netkeys
            ├── cacert.pem
            ├── cert.pem
            ├── net_private.key
            └── private.key
    
    6 directories, 23 files
    

    我怀疑过是不是因为我在 build_xvm.sh 文件加 export XVM_BUILD_MAIN=0,而导致编译后的 output 有问题。 因为使用该方法编译后确实有点问题,但最终还是可以 complile done! image

    所以我改用另外的方法,重新 make

    这是另外的方式:直接切换到 release-v5.1、master、release-v5.2分支编译

    但结果还是一样会出现 app bin not exist!


    我尝试看了一下报错原因,然后找到下面这段代码(从 output.sh 中截取出来的)

    AppName="xchain"
    BinPath="$Pwd/bin/$AppName"
    [ -f "$BinPath" ] || { echo "app bin not exist!"; exit; }
    

    可以看到,他是因为没有在 output/bin 下找到它想要的文件。

    这是我能够收集到的信息了,虽然如此,但是我还是不知道如何解决。 毕竟 output 文件是自动生成的呀😥

    opened by Linhieng 9
  • Grpc Client Invoke build error.

    Grpc Client Invoke build error.

    Brief of the issue When I wrote the GRPC client of XuperChain, I found that GRPC had a type error at compile time, because different GRPC packages were referenced. After using vendor, I found that the dependencies were abnormal.

    Your environment OS: Linux xuperunion 4.4.0-146-generic #172-Ubuntu SMP Wed Apr 3 09:00:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Go Version: 1.12.6 GCC Version: 5.4.0

    Repo steps

    Expected behaviours null

    What actually happened ./client.go:16:30: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/xuperchain/xuperunion/vendor/google.golang.org/grpc".ClientConn in argument to pb.NewXchainClient

    Additional information

    package main
    
    import (
    	"golang.org/x/net/context"
    	"crypto/tls"
    	"crypto/x509"
    	"io/ioutil"
    	"log"
    	"github.com/xuperchain/xuperunion/vendor/google.golang.org/grpc"
    	"github.com/xuperchain/xuperunion/vendor/google.golang.org/grpc/credentials"
    	pb "github.com/xuperchain/xuperunion/pb"
    )
    
    func main() {
    	cert, err := tls.LoadX509KeyPair("certs/test_client.pem", "certs/test_client.key")
    	if err != nil {
    		panic(err)
    	}
    
    	// 将根证书加入证书池
    	certPool := x509.NewCertPool()
    	bs, err := ioutil.ReadFile("certs/root.pem")
    	if err != nil {
    		panic(err)
    	}
    
    	if !certPool.AppendCertsFromPEM(bs) {
    		panic("cc")
    	}
    
    	// 新建凭证
    	transportCreds := credentials.NewTLS(&tls.Config{
    		ServerName:   "xuper",
    		Certificates: []tls.Certificate{cert},
    		RootCAs:      certPool,
    	})
    
    	dialOpt := grpc.WithTransportCredentials(transportCreds)
    
    	conn, err := grpc.Dial("127.0.0.1:37102", dialOpt)
    	if err != nil {
    		log.Fatalf("Dial failed:%v", err)
    	}
    	defer conn.Close()
    
    	client := pb.NewXchainClient(conn)
    	resp2, err := client.GetBlockChains(context.Background(), &pb.CommonIn{
    		Header: nil,
    	})
    
    	if err != nil {
    		log.Fatalf("%v", err)
    	}
    	log.Printf("Resp2:%+v", resp2)
    }
    
    
    opened by doreamon95 9
  • You need add fee problem

    You need add fee problem

    hi

    when I run the commands below,

    创建合约账户

    通用方式

    ./xchain-cli account new --desc account.des 其中,account.des内容如下 { "module_name": "xkernel", "method_name": "NewAccount", "args" : { "account_name": "1111111111111111", //说明:16位数字组成的字符串 "acl": "{"pm": {"rule": 1,"acceptValue": 0.6},"aksWeight": {"AK1": 0.3,"AK2": 0.3}}" } }

    简易方式

    ./xchain-cli account new --account 1111111111111111 // 说明:16位数字组成的字符串

    it show:

    [Fri Aug 23 16:34:49]#./xchain-cli account new --desc account.des
    contract response: {"pm": {"rule": 1,"acceptValue": 0.6},"aksWeight": {"AK1": 0.3,"AK2": 0.3}}
    The gas you cousume is: 1000
    You need add fee
    [Fri Aug 23 16:35:38]#./xchain-cli account balance --keys data/accounts/bob -H 127.0.0.1:37101
    0
    
    

    but how to solve it ?thank you .

    opened by jiebanghan 9
  • Unable to generate transaction of contract deployment

    Unable to generate transaction of contract deployment

    Brief of the issue Following to this tutorial to deploy my first contract, everything is good until 4.3( contract deployment). I successfully created an account but failed to generate the transaction of contract deployment.

    The output of ./xchain-cli wasm deploy --account XC8[email protected] --cname copy -H 14.215.179.74:37101 -m -A data/acl/addrs --arg '{"creator":"xchain234"}' --out put contractRawTx.out --fee 144200 counter is as follows:

    contract response: contract has not been banned
    contract response: access permission succeed
    contract response: initialize succeed
    The gas you cousume is: 144184
    The fee you pay is: 144200
    Select utxo error, details:NOT_ENOUGH_UTXO_ERROR
    
    

    Your environment XuperUnion v3.2 branch and using the docker environment.

    Repo steps Describe how to reproduce this issue.

    Expected behaviours Have an contractRawTx.out transaction as output

    What actually happened No output is created

    Additional information If possible, include a minimal, complete, and verifiable example to help us identify the issue. This also helps check that the issue is not with your own code.

    opened by jiahaoc1993 8
  • Question on Genesis (xuper.json)

    Question on Genesis (xuper.json)

    Hello,

    I am working through the documentation to run XuperChain after compiling it and have a question regarding the "/data/genesis" files.

    In particular, I see a static address "TeyyPLpp9L7QAcxHangtcHTu7HUZ6iydY" in the designation of the Xuper token and am wondering how this is generated and how to generate a new one:

    (example xuper.json) { "version": "1", "predistribution": [ { "address": "TeyyPLpp9L7QAcxHangtcHTu7HUZ6iydY", "quota": "100000000000000000000" } ], "maxblocksize": "128", "award": "1000000", "decimals": "8", "award_decay": { "height_gap": 31536000, "ratio": 1 }, "gas_price": { "cpu_rate": 1000, "mem_rate": 1000000, "disk_rate": 1, "xfee_rate": 1 }, "new_account_resource_amount": 1000, "genesis_consensus": { "name": "single", "config": { "miner": "TeyyPLpp9L7QAcxHangtcHTu7HUZ6iydY", "period": "3000" } } }

    opened by lonnietc 7
  • Does XuperChain establish transaction fees?

    Does XuperChain establish transaction fees?

    Hello,

    I have been reading up on the XuperChain blockchain and am trying to determine if it incorporates TX transactions fees for sending and receiving tokens?

    If so, then I would assume that there is a wallet address that is established when the boot node comes up for this purpose, but cannot find any information on it.

    Of course, there are a couple of existing blockchains (i.e. NANO, Mana, etc.) that do not have GAS fees and are truly fee-less but I would like to know how XuperChain is configured in this area.

    Any information would be helpful. Thanks in advance

    opened by lonnietc 7
  •  Optimizing code & add some notes

    Optimizing code & add some notes

    Description

    1. Some obvious duplicate calculations have been removed.
    2. In order to better understand the tipping-related code, some comment are added to the output code of the tips.

    Type of change

    • [x] Optimizing code

    Brief of your solution

    Repeated computational code, which assigns values to variables only once, is then used publicly.

    opened by af913337456 7
  • Question on pre-distributed account

    Question on pre-distributed account

    Hello,

    I have been working with the 3-node TESTNET to get a feel for things and bring up the nodes with no problem.

    then:

    Check the Keys main account

    $ bin/xchain-cli account balance TeyyPLpp9L7QAcxHangtcHTu7HUZ6iydY 100000000000038000000

    Create Bob and chack account

    $ bin/xchain-cli account newkeys --output data/bob $ bin/xchain-cli account balance eYKe14ok9XQ1jdCGjdmNJSWsMhS1R6cxr 0

    Transfer some to Bob

    $ bin/xchain-cli transfer --to eYKe14ok9XQ1jdCGjdmNJSWsMhS1R6cxr --amount 100 --keys data/keys/ -H 127.0.0.1:37101 4e4e1ce92aa0a1a1496801695c1ab5bce89b6a99757194007187799fa5cc3fa2

    Check Bob account

    $ bin/xchain-cli account balance eYKe14ok9XQ1jdCGjdmNJSWsMhS1R6cxr 100

    Check the Pre-Distributed account

    $ bin/xchain-cli account balance TeyyPLpp9L7QAcxHangtcHTu7HUZ6iydY 100000000000124999900

    Transfer large amount to Bob

    $ bin/xchain-cli transfer --to eYKe14ok9XQ1jdCGjdmNJSWsMhS1R6cxr --amount 100000000 --keys data/keys/ -H 127.0.0.1:37101 60b896b9adbea6314a1130e1f8e99f5553caa1f1a33601925e0d7e056bb5ffe4

    Check Bob account again

    $ bin/xchain-cli account balance eYKe14ok9XQ1jdCGjdmNJSWsMhS1R6cxr 100000100

    Check the Pre-Distributed account

    $ bin/xchain-cli account balance TeyyPLpp9L7QAcxHangtcHTu7HUZ6iydY 100000000000031999900

    The question that I have is that the main "data/keys" Pre-Distribution account seems to increase little-by-little due to mining which is correct, but that when I TRANSFER tokens OUT of the main data/keys account then the main balance does not seem to decrease.

    Is this correct?

    I would expect for the "data/keys" account to decrease as tokens are transferred to Bob, and others.

    Or, is the purpose of the "data/keys" initial account to maintain a cumulative sum total MAX tokens for the whole network?

    Can you please clarify?

    Thanks and Happy Holidays

    opened by lonnietc 6
  • 部署solidity智能合约出错

    部署solidity智能合约出错

    执行 #./bin/xchain-cli evm deploy --account [email protected] -a '{"initialSupply":"1000","tokenName":"ONE","tokenSymbol":"ONE"}' --cname TokenERC20 /root/data/TokenERC20/TokenERC20.bin --abi /root/data/TokenERC20/TokenERC20.abi --name xuper

    控制台输出: PreExe contract response : rpc error: code = Unknown desc = Err:500-50501-contract invoke failed+bad address, logid:1629364792_5354109026064301

    opened by katoyi120 6
  • 在环境部署的第一步 make 时中断报错

    在环境部署的第一步 make 时中断报错

    Brief of the issue build xvm error: make[1]: Entering directory '/home/xuperchain/.compile_cache/xvm/xvm/compile/wabt' make[1]: *** 没有指明目标并且找不到 makefile。 停止。 make[1]: Leaving directory '/home/xuperchain/.compile_cache/xvm/xvm/compile/wabt' complie xvm failed Makefile:24: recipe for target 'xvm' failed make: *** [xvm] Error 1

    Your environment XuperChain V5.1.0 GO version go1.15.6 linux/amd64 Oracle VM VirtualBox ,OS linux 4.15.0-30deepin-generic CPU AMD 5950X 16-Core

    Repo steps 我同样的配置创建了一个新的虚拟机 使用centos8 一切正常

    Expected behaviours recipe for target 'xvm' failed build 中断无法继续执行

    What actually happened 在环境部署的第一步 make 时中断报错

    Additional information 以上问题我暂时是使用以下方式解决的:

    function buildxvm() {
        # clean dir
        ----
        ----
    
        # download pkg
    
        # unzip
    	
         sleep 5  #加入等待时间(暂且解决)
    	
       # make
    	    
    }
    

    buildxvm 函数中的 #unzip 与 #make 之间 等待5秒中待文件全部复制完毕再向下执行

    opened by ifishnet 5
  • 解决make时报错XVM找不到问题

    解决make时报错XVM找不到问题

    Description

    What is the purpose of the change? Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

    Fixes # (issue)

    Type of change

    Please delete options that are not relevant.

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update

    Brief of your solution

    Please describe your solution to solve the issue or feature request.

    How Has This Been Tested?

    Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

    opened by CN-XIANGJIANXIONG 8
  • Update README.md

    Update README.md

    update xchain help QR code

    Description

    What is the purpose of the change? Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

    Fixes # (issue)

    Type of change

    Please delete options that are not relevant.

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update

    Brief of your solution

    Please describe your solution to solve the issue or feature request.

    How Has This Been Tested?

    Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

    opened by uaanaa 1
  • error code和message 规范化

    error code和message 规范化

    Brief of your idea 当前xuper-sdk-go等client调用xuperchain,返回的错误信息如UTXOVM_NOT_FOUND_ERROR、TX_VERIFICATION_ERROR并无详细介绍,且存在接口返回的error message说明和问题实际原因不匹配,导致用户排查比较困难,建议规范化错误输出。

    What could be better if XuperChain using your idea 规范化错误说明,降低用户问题排查成本

    opened by MyYuan 0
  • xuperchain文档优化诉求

    xuperchain文档优化诉求

    Brief of your idea 1、当前xuperchain官方文档针对不同xchian版本功能对比并无详细介绍,缺乏chang log说明,导致用户按需选择指定版本比较困难。 2、更多资料:配置文件部分,关于配置文件的详细说明缺失,配置文件只罗列了文件名称,具体使用场景下不同的配置说明,并无案例介绍,导致配置修改和升级时容易踩坑; 3、进阶使用:监控部分,各个监控指标的含义说明缺失,仅仅罗列了监控项; 4、进阶使用:权限管理部分,并未详细不同场景下采用的权限控制体系,比如账号权限管理,哪种场景下需要修改其配置; 5、建议网络部署提供多种方式:源码编译、docker部署等; 6、关于对arm的支持也没有相关说明;

    What could be better if XuperChain using your idea 补充版本说明、详细介绍节点的配置项说明等,降低用户搭建或升级区块链网络的成本,便于业务系统快速集成

    opened by MyYuan 0
  • 支持VRF随机数

    支持VRF随机数

    Brief of your idea 智能合约在执行时能够获取随机数,并且其它节点可以验证该随机数的生成过程是随机的。

    What could be better if XuperChain using your idea 现有的合约模板中的区块链抽奖小游戏合约样例没有意义,因为该随机数不可验证。所有用户只能无条件相信背书节点。但实际上,背书节点可以操纵并重试,直至获得对自己有利的随机数才对交易进行签发背书。在理论上,背书节点甚至可以跳过随机数的生成过程,直接使用对自己有利的数字,而其它节点均无法对该过程进行验证。

    Are there any side effects?

    Additional information 建议设置信标链服务,来生成可验证的VRF随机数。 或者设置基于门限的预言机阵列,基于不可预测的线下事件来生成可验证随机数。

    opened by HawkJing 0
  • 支持Schnorr、EDDSA签名算法

    支持Schnorr、EDDSA签名算法

    Brief of your idea 基于Crypto密码库,支持其它常见签名算法的混合使用,在SDK和链核心,除ECDSA外,额外支持Schnorr、EDDSA签名。

    What could be better if XuperChain using your idea 在随机数发生器不安全的情况下,避免用户私钥的泄露

    Are there any side effects? 因为需要自动判断签名类型,验签速度可能会减慢

    Additional information SDK默认使用ECDSA,但需要支持新的签名算法。 链核心支持自动判断签名类型,并动态切换验签算法。

    opened by HawkJing 0
Releases(v5.2.0)
  • v5.2.0(Jan 13, 2022)

    Performance optimization

    • Transfer transaction
    1. Overall memory usage decreased by around 33%.
    2. Overall CPU usage decreased by about 50%.
    • Contract transaction
    1. Overall memory usage decreased by around 50%.
    2. Overall CPU usage decreased by about 30%.

    Ledger

    Optimize the unconfirmed transaction pool mempool, perform topological sorting on unconfirmed transactions when submitting transactions to the chainnode, improve block packaging, block synchronization and block execution speed.

    Block synchronization

    Optimize The block synchronization scheme is optimized, from passively receiving blocks to actively pulling blocks, and synchronizing blocks from reverse order synchronization to sequential synchronization (block height from low to high), maximizing the use of network bandwidth and improving synchronization efficiency.

    Consensus

    Improve the QCTree rollback logic, fix the dirty write problem at the kernel layer and bcs layer, increase the timeout logic of absenteeism to collect signatures to ensure the packaging block time, and improve the stability and correctness of the consensus.

    Bug fix

    xupercore:

    1. Fix the bug that if thetoo small utxo cache is too small,may cause the block execution failure. may fail;
    2. The stability of consensus upgrade has been improved. The previous version may cause nodes to fail to block. the consensus upgrade stability of the latest version has been improved to more than 99%, to solve the problem that nodes may fail to block.
    3. Fix the bug that the verification of the timer contract state machine walking may casuefail verification of the timer contract failure. when the state machine walks.
    4. Fixed a bug that the configuration field init_proposer of poa and pos consensus is allowed to be empty.where the init_proposer of the poa and pos contract consensus configuration was empty, which might cause the program to exit.
    5. Fix theed a bug that reloading a parallel chain maycould cause the program to exit when reloading a parachain.

    xchain-cli:

    1. Fix the bug that where utxo merge command fails transaction due to missing signatureutxo merge command fail.
    2. Fix the bug that the default chain name of the prune ledger command is wrong.default chain name of the prune ledger command.
    3. Status command supports specifying chain name.
    4. Add Proposal Height Check.

    New features

    Architecture:

    1. Support arm architecture.

    log:

    1. Improve log write performance.

    xupercore:

    1. Improve the speed of acquiring transactions within blocks.
    2. Prohibit pow consensus upgrade.
    3. Reduce memory allocation for merkle algorithm.
    4. Chained-BFT supports a candidate group number of 1, ensuring that a single candidate can still execute according to the QCTree process.
    Source code(tar.gz)
    Source code(zip)
  • v5.1.1(Jan 13, 2022)

    What's Changed

    • bugfix: ecverify and xvmAddressFromPubkey can not be resolved
    • bugfix: abi encoding error of dynamic objet after uint[] ,which causing execution reverted
    • bugfix: parachain cmd modifies the group of the specific parachain
    • bugfix: add bcname field in GetBalance response
    • bugfix: fix gateway rpc endpoint to 127.0.0.1
    • bugfix: PreExecWithSelectUTXO response empty in nofee mode
    • bugfix : forcestop in control.sh takes no effect
    • add metrics for performance benchmark
    • update xpoa init_proposer formet in genesis config
    Source code(tar.gz)
    Source code(zip)
  • v5.1.0(Jul 15, 2021)

    Architecture Upgrade

    1. xuperchain upgrade to new architecture based on xupercore

    Smart Contract Improvements

    1. New virtual machine supported for Python

    Other Improvements and Bugs

    1. Fix XDev compilation failure on go1.16
    2. Move XDev as an independent repositorie from XuperChain
    3. Fix the protoc version, which is 3.7.1
    Source code(tar.gz)
    Source code(zip)
  • v3.10.3(Jun 18, 2021)

  • v3.10.2(May 24, 2021)

    Smart Contract

    • Add event support for solidity contract
    • Add GO Contract Examples
    • Add C++ Contract Examples

    CLI

    • Allow specify account when query contract

    XDEV

    • Allow specify account when invoke contract

    Bugfix

    • Default log level is debug, which resaults in penalty
    Source code(tar.gz)
    Source code(zip)
  • v3.10.1(Apr 29, 2021)

  • v3.10.0(Feb 25, 2021)

    Smart Contract Improvements

    1. XuperChain multi VMs support EVM.
    2. XuperChain supports deploying, invoke and query smart contracts coded by solidity.

    P2P Network Improvements

    1. P2Pv2 supports TLS and ipv6.

    Kernel

    1. XuperChain upgrades a new algorithm to generate transaction hash determinedly.

    Cli

    1. XuperChain cli supports transactions with endorsement.

    Other Improvements and Bugs

    1. Add java sdk for XuperChain.
    2. Some bugs about parallel chain.
    3. Bug fix for smr module.
    4. Some other bug fixes.

    Document Improvements

    Publish documents of v3.10.0

    1. Documents of XuperChain EVM Contract
    2. Several other changes.
    Source code(tar.gz)
    Source code(zip)
  • v3.9.0(Aug 21, 2020)

    Contract Improvements

    1. XuperChain smart contract supports Java language to write smart contract. 1). XuperChain multi VM support native VM. 2). Java smart contract language is added to reduce the threshold for Java programmers to enter the blockchain field. 3). Support many Java contract sdk for developers to interact with blockchain. 4). Support many Java contract demos, such as ERC20, Counter, Cross Query.
    2. XuperChain support contract event so that developers can subscribe events of contract.

    Other Improvements

    1. XModel support snapshot function so that user can use XModel with a given blockid or height.
    2. Support grpc and p2p flow monitor by prometheus.
    3. Support stop chain service so that one who created the chain can stop it.
    4. None utxo scheme so that user can build network without utxo.
    5. Several bug fixes.

    Document Improvements

    Publish documents of v3.9.0

    1. Documents of XuperChain JAVA Contract
    2. Documents of XuperChain Contract Event
    3. Documents of XuperChain XPoA Mathematics
    4. Documents of XuperChain XPoA Usage
    5. Several other changes.
    Source code(tar.gz)
    Source code(zip)
  • v3.8.0(Jun 17, 2020)

    XuperChain v3.8.0 Release Notes

    Consensus Improvements

    XuperChain Pluggable Consensus support XPoA Consensus that more suitable for alliance chain scenario.

    1. Add a new consensus type XPoA(PoA+ChainedBFT), validators can be changed easily by an validate contract.
    2. Note that this feature is still in preview.

    Other Improvements

    1. Command line xchain-cli status support flags that user can get status of a special types.
    2. Add identity contract exemple.
    3. Several bug fixes.

    Document Improvements

    Publish documents of v3.7.0

    1. Documents of XuperChain CrossChain
    2. Documents of XuperChain xdev tool
    3. Documents of XuperChain Group Chain
    4. Documents of XuperChain Event
    Source code(tar.gz)
    Source code(zip)
  • v3.7.0(Apr 9, 2020)

    Cross-Chain Features

    Now XuperChain support cross-chain operations among XuperChain networks.

    1. Support read-only cross-chain contract invoke with extensible endorser strategy.
    2. Support cross-chain transaction verification using Xuper Relayer which is based-on merkle tree proof.

    Smart Contract Improvements

    1. A new develop and test toolkit: xdev, for all smart contract developers to easily build and run unit tests.
    2. C++ Contract SDK supports sub modules and provides several built-in modules like crypto, json and so on.
    3. Trust Ledger and Trust mart contract VM to support processing encrypted data in contracts based TEE.

    P2P network Improvements

    1. P2Pv1 support XPoS consensus and Chained-BFT.
    2. P2Pv1 support dynamic nodes and building non-permitted network without CA certifications.

    Other Improvements

    1. Performance improvements on batch tx broadcast.
    2. Support Hierarchical Deterministic encrypted data.
    3. Several bug fixes.
    Source code(tar.gz)
    Source code(zip)
  • v3.6.0(Mar 5, 2020)

    System Improvements

    1. Support chain group, this means the parallel-chain can be deployed on a subset of the blockchain network.
    2. Support subscribe/unsubscribe block/transaction/account events from client.
    3. Support query the statistics of all contracts/accounts on a blockchain.
    4. Open sourced the Chinese National Cryptography Standard(Guo Mi) crypto plugin, support SM2/3/4.

    Network Improvements

    1. Support different P2P plugins, make p2pv2 as a P2P plugin implementation.
    2. Add a new p2pv1 plugin, which uses GRPC as underlying communication protocol and support security TLS connections using CA certificates.

    Smart Contract Improvements

    1. Support upgrading WASM contracts.
    2. Add several smart contract templates.
    Source code(tar.gz)
    Source code(zip)
  • v3.5.0(Feb 27, 2020)

    Consensus Improvements

    1. Improve the stability of XPoS(TDPoS+ChainedBFT), validators can quickly reach agreement when the network started.
    2. Support other consensus upgrade to XPoS, or change the validators of XPoS.

    Transaction Improvements

    1. Support transactions without UTXO Input/Output.
    2. Support validating contract permission of cross-contract invokes.

    Network Improvements

    1. Improve the block/transaction broadcast performance of P2P network using interactive broadcast message.
    2. Support static peers configuration in P2Pv2.

    Other Improvements

    1. P2P stability improvements and bug fix of "walk error" in some cases.
    2. Crypto compatibility improvements to support retrieve private key by mnemonic generated using XuperChain V2.
    Source code(tar.gz)
    Source code(zip)
  • v3.4.0(Dec 13, 2019)

    Smart Contract

    1. Support transfer to contract and transfer from a contract.
    2. Contract SDK add builtin Account type for user accounts.
    3. Add contract template for digital assets.

    Performance Improvements

    1. Support block/transaction compression in P2P message.
    2. Add contract data cache to speed up the contract execution.

    Other Improvements

    1. Support update gas price by proposal/vote system.
    2. Add interface to query the available and frozen UTXO of user account.
    3. Plugin system support autoload plugins from given folder.
    4. Several bug fixes.
    Source code(tar.gz)
    Source code(zip)
  • v3.3.0(Oct 17, 2019)

    New Features

    • Performance Improvement

      • Verify transactions parallel in a block using DAG.
    • Consensus

      • Add new Chained-BFT module into consensus;
      • Integrate DPoS with Chained-BFT, note that this feature is still in preview.
    • Smart Contract

      • Contract SDK supports print log into log file;
      • Contract supports get block/transaction data;
      • Define the standard error code of contracts' return message;
      • Add new contract build and test tool.
    • Security Enhancements

      • Support multisig and ring signature in crypto module;
      • Disable external invoke of initialize function of WASM contracts;
      • Refine the verification process of transaction, avoid the risk of some auth_require addresses were used without verification in contract context.
    • Other Features

      • Limit initiator to address only to simplify permission check;
      • Improve the UTXO walk process, support truncating ledger in some forked cases;
      • Support update the config of reserve contracts, and some more improvements on reserve contracts.
    Source code(tar.gz)
    Source code(zip)
  • v3.2.0(Sep 2, 2019)

    New Features

    • Performance Improvement

      • Add new KV engine badger;
      • Improve log context init performance;
      • Add new crypto plugin using schnorr signature;
    • Smart Contract

      • Resource cost support Memory and Disk usage;
      • Context support getting transaction's initiator and auth_require info;
      • VM could stop immediately when running out of resource;
    • Security Enhancements

      • Add P2P address identity protocol to binding peer's netURL with node address;
      • Routing Security: support core peers connecting to each other directly to keep core network safe.
      • Security Patchs: Limit the connection number from the same IP; Validate autogen tx to avoid fake transaction attack; Fix UTXO with negative frozen heigh could pass transaction check; Check the number of coinbase transactions in a block to avoid byzantine miner;
    • Other Features

      • CLI support getting DPoS status, querying all contracts belongs to a contract account and all contract accounts contains specified address in account ACL.
      • Compliance Features: Unified reserve contracts validation framework; Add several reserve contracts such as endorse-based transfer; Support forbidding contracts by contracts' name;
      • Add new API PreExecWithSelectUTXO which pre-execute contract request and return enough UTXO records with the contract result.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(May 27, 2019)

    This is the first public release of XuperUnion which introduces a highly flexible blockchain architecture with great transaction performance.

    Source code(tar.gz)
    Source code(zip)
Bayesian text classifier with flexible tokenizers and storage backends for Go

Shield is a bayesian text classifier with flexible tokenizer and backend store support Currently implemented: Redis backend English tokenizer Example

Erik Aigner 151 Sep 20, 2022
Menggunakan clean architecture dengan domain driven design

Golang project Menggunakan clean architecture dengan domain driven design Domain - Entity Sebuah model untuk entitas Domain - Model Hampir sama dengan

Binsar Dwi Jasuma 0 Jan 4, 2022
Clean Architecture With Golang

Clean Architecture With Golang When init a new project go mod init github.com/samuelterra22/clean-architecture-go Run testes go test ./... Generate a

Samuel Terra 2 Aug 2, 2022
NJ Meetup - Build an event-driven architecture with Apache Pulsar

Meetup-YourFirstEventDrivenApp NJ Meetup - Build an event-driven architecture with Apache Pulsar Code Along bin/pulsar-admin tenants create meetup bi

Timothy Spann 2 May 8, 2022
Social-gold - Social Gold is the blockchain that powers the Social Gold Social platform

Social Gold is Proof of authority (POA) blockchain that powers the Social Gold S

Willis Ayres 1 Feb 20, 2022
A curated list of Awesome Go performance libraries and tools

Awesome Go performance Collection of the Awesome™ Go libraries, tools, project around performance. Contents Algorithm Assembly Benchmarks Compiling Co

Oleg Kovalov 275 Sep 11, 2022
A quick tour (or reminder) of Go performance tools

Basics of benchmarking, profiling and tracing with Go Introduction This documentation gives an overview of possibilities offered by go tooling to meas

Samuel GAY 237 Aug 9, 2022
A high performance go implementation of Wappalyzer Technology Detection Library

wappalyzergo A high performance port of the Wappalyzer Technology Detection Library to Go. Inspired by https://github.com/rverton/webanalyze. Features

ProjectDiscovery 331 Sep 28, 2022
A high-performance timeline tracing library for Golang, used by TiDB

Minitrace-Go A high-performance, ergonomic timeline tracing library for Golang. Basic Usage package main import ( "context" "fmt" "strcon

TiKV Project 45 Sep 21, 2022
Transaction processor for the Elrond Blockchain

Elrond Ledger Transactions Processor Elrond Ledger Transactions Processor processes transactions block by block on the Elrond ledger. This codebase is

TheFabric.IO 3 Jun 27, 2022
Api for getting blockchain block and transaction details in Go.

Getting Blockchain Data Api for getting blockchain block and transaction details Things you need Go: brew install go Install docker Setup go folder in

Hasan 0 Dec 14, 2021
Blockchain transaction manager for Hyperledger FireFly

Blockchain transaction manager for Hyperledger FireFly. Integrates public blockchains through a pluggable FireFly Connector API framework. Extensible policy engine for managing gas & resubmission. Confirmation manager for managing finality on both transactions and event streams.

Hyperledger 5 Sep 23, 2022
A dead simple, highly performant, highly customizable sessions middleware for go http servers.

If you're interested in jwt's, see my jwt library! Sessions A dead simple, highly performant, highly customizable sessions service for go http servers

Adam Hanna 67 Aug 31, 2022
BlobStore is a highly reliable,highly available and ultra-large scale distributed storage system

BlobStore Overview Documents Build BlobStore Deploy BlobStore Manage BlobStore License Overview BlobStore is a highly reliable,highly available and ul

CubeFS 15 Jun 30, 2022
Yu is a highly customizable blockchain framework.

禹 Yu is a highly customizable blockchain framework. 中文文档 Overall Structure Introduction By using Yu, you can customize three levels to develop your ow

null 24 Sep 3, 2022
Yu is a highly customizable blockchain framework.

禹 Yu is a highly customizable blockchain framework. 中文文档 Overall Structure Introduction By using Yu, you can customize three levels to develop your ow

null 24 Sep 3, 2022
arsyncer is the high performance arweave network transaction synchronisation component.

arsyncer Install go get github.com/everFinance/arsyncer Introduction arsyncer is the high performance arweave network transaction synchronisation comp

everFinance 14 Sep 1, 2022
A Go "clone" of the great and famous Requests library

GRequests A Go "clone" of the great and famous Requests library License GRequests is licensed under the Apache License, Version 2.0. See LICENSE for t

Levi Gross 1.9k Sep 20, 2022
Censors or hides shell / Bash / console output based on defined patterns - great for hiding secrets in demos!

censor-shell Installation go install Usage Make the file ~/.censor-shell as an INI file with the following content: [nameofmyreplacement] pattern = b

Ian Mckay 38 Jul 20, 2022
A strongly typed HTML templating language that compiles to Go code, and has great developer tooling.

A language, command line tool and set of IDE extensions that makes it easier to write HTML user interfaces and websites using Go.

Adrian Hesketh 140 Sep 24, 2022