xuperchain / xuper-sdk-go Goto Github PK
View Code? Open in Web Editor NEWXuper-SDK is a powerful tool for the Go developers to access and use public network of XuperChain easily and quickly.
License: Apache License 2.0
Xuper-SDK is a powerful tool for the Go developers to access and use public network of XuperChain easily and quickly.
License: Apache License 2.0
测试代码:
func TestInvokeWasmContract2(t *testing.T) {
acc, _ := account.RetrieveAccount(mnemonic, 1)
wasmContract := InitWasmContract(acc, node, "xuper", "counter", "XC1111111111111111@xuper")
wg := &sync.WaitGroup{}
for i := 0; i < 4; i++ {
wg.Add(1)
go func() {
defer wg.Done()
txid, err := wasmContract.InvokeWasmContract("increase", map[string]string{"key": "counter"})
if err != nil {
t.Log("err:", err)
return
}
t.Log("txid:", txid)
}()
}
wg.Wait()
}
错误:
--- PASS: TestInvokeWasmContract2 (3.82s)
contract_test.go:191: txid: 958bdd5540491fb90707cecd2b07febb3523a1762cdbd86f2a53a07700d3bd4a
contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
xchain.go
utxoOutput := &pb.UtxoOutput{
// UtxoList: utxolist,
// TotalSelected: totalSelected.String(),
UtxoList: response.UtxoOutput.UtxoList,
TotalSelected: response.UtxoOutput.TotalSelected,
"response.UtxoOutput" will be nil when invoke contract
error message
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xaa2475]
goroutine 1 [running]:
github.com/xuperchain/xuper-sdk-go/xchain.(*Xchain).GenRealTxOnly(0xc00026c010, 0xc0002967d0, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/go/pkg/mod/github.com/xuperchain/[email protected]/xchain/xchain.go:479 +0xa5
github.com/xuperchain/xuper-sdk-go/xchain.(*Xchain).GenCompleteTxAndPost(0xc00026c010, 0xc0002967d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/go/pkg/mod/github.com/xuperchain/[email protected]/xchain/xchain.go:745 +0x1097
github.com/xuperchain/xuper-sdk-go/contract.(*WasmContract).PostWasmContract(0xc00026c000, 0xc0002967d0, 0x0, 0x0, 0x0, 0x0)
/root/go/pkg/mod/github.com/xuperchain/[email protected]/contract/contract.go:120 +0x416
github.com/xuperchain/xuper-sdk-go/contract.(*WasmContract).InvokeWasmContract(0xc00026c000, 0xbf6580, 0x8, 0xc0001a3e48, 0x0, 0x0, 0x0, 0x0)
/root/go/pkg/mod/github.com/xuperchain/[email protected]/contract/contract.go:132 +0x205
update the version of the dependency of xchain
solidity代码如下:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/// @Custom:security-contact [email protected]
contract Seatune is ERC20, Pausable, Ownable {
constructor() ERC20("Seatune", "TUN") {
_mint(msg.sender, 990000 * 10 ** decimals());
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
super._beforeTokenTransfer(from, to, amount);
}
}
当我执行继承自openzeppelin包的方法时,如果xuperIDE调试,结果如下:
如果用cli调用,也是一致的
唯独在调用sdk时,返回结果不一致,是一串代码
返回的结果是这样的
请问如何才能取到正确的返回数据?
sdk在无币模式下,部署和调用合约会触发空指针异常
// GenerateTxInput generate txinput part
func (xc *Xchain) GenerateTxInput(utxoOutputs *pb.UtxoOutput, totalNeed *big.Int) (
[]*pb.TxInput, *pb.TxOutput, error) {
// utxoList => TxInput
//
// gen txInputs
var txInputs []*pb.TxInput
var txOutput *pb.TxOutput
//utxoOutputs是空对象
for _, utxo := range utxoOutputs.UtxoList {
txInput := &pb.TxInput{}
txInput.RefTxid = utxo.RefTxid
txInput.RefOffset = utxo.RefOffset
txInput.FromAddr = utxo.ToAddr
txInput.Amount = utxo.Amount
txInputs = append(txInputs, txInput)
}
}
错误描述
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x90c047]
goroutine 6 [running]:
testing.tRunner.func1(0xc0000f2300)
/usr/local/go/src/testing/testing.go:874 +0x3a3
panic(0x9ad1e0, 0xf36b90)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/xuperchain/xuper-sdk-go/xchain.(*Xchain).GenerateTxInput(0xc0002a6420, 0x0, 0xc000303b60, 0x0, 0x1, 0x40db86, 0x12, 0x0, 0xc0002ca310)
/home/jason/桌面/github.com/xuperchain/xuper-sdk-go/xchain/xchain.go:208 +0x37
github.com/xuperchain/xuper-sdk-go/xchain.(*Xchain).GenComplianceCheckTx(0xc0002a6420, 0xc0000a2870, 0x20, 0xc0002aee00, 0x3a)
/home/jason/桌面/github.com/xuperchain/xuper-sdk-go/xchain/xchain.go:99 +0xa1
github.com/xuperchain/xuper-sdk-go/xchain.(*Xchain).GenCompleteTxAndPost(0xc0002a6420, 0xc0000a2870, 0xa81602, 0x1, 0x2, 0xc0002aee00)
/home/jason/桌面/github.com/xuperchain/xuper-sdk-go/xchain/xchain.go:407 +0x4d
github.com/xuperchain/xuper-sdk-go/contract.(*WasmContract).PostWasmContract(0xc0002a6410, 0xc0000a2870, 0xa821d8, 0x25, 0xa6a20d, 0x1)
/home/jason/桌面/github.com/xuperchain/xuper-sdk-go/contract/contract.go:100 +0x141
github.com/xuperchain/xuper-sdk-go/contract.(*WasmContract).DeployWasmContract(0xc0002a6410, 0xc0000e3e20, 0xa821d8, 0x25, 0xa6a20d, 0x1, 0x8, 0xa78ad3, 0x18, 0xc0002a6410)
/home/jason/桌面/github.com/xuperchain/xuper-sdk-go/contract/contract.go:52 +0x126
github.com/xuperchain/xuper-sdk-go/contract.TestJason(0xc0000f2300)
/home/jason/桌面/github.com/xuperchain/xuper-sdk-go/contract/contract_test.go:216 +0x2fb
testing.tRunner(0xc0000f2300, 0xa9c368)
/usr/local/go/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:960 +0x350
make失败,go get github.com/xuperchain/xuper-sdk-go/v2 这个网址404
请教一下,我现在操作3.7版本的链需要支持,调用合约,安装合约等操作都会出现以下类似的错误,请问怎么解决呢?
出现的错误:
2022/02/18 17:40:48 GetConfig: &{************:37101 {false false 400 aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n} 100 xchain}
2022/02/18 17:40:48 PreExecWithSelecUTXO EndorserCall failed, err: rpc error: code = Unimplemented desc = unknown service pb.xendorser
2022/02/18 17:40:48 DeployWasmContract preExe failed, err: EndorserCall error! Response is: rpc error: code = Unimplemented desc = unknown service pb.xendorser
panic: EndorserCall error! Response is: rpc error: code = Unimplemented desc = unknown service pb.xendorser
另外我的skd配置内容如下,也没有配置xendorser开关什么的
endorseServiceHost: "*************"
complianceCheck:
# 是否需要进行合规性背书
isNeedComplianceCheck: false
# 是否需要支付合规性背书费用
isNeedComplianceCheckFee: false
# 合规性背书费用
complianceCheckEndorseServiceFee: 400
# 支付合规性背书费用的收款地址
complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT
# 如果通过合规性检查,签发认证签名的地址
complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n
#创建平行链所需要的最低费用
minNewChainAmount: "100"
# sdk调用生成账号相关的密码类型.简单来说生成的是否是国密算法。
crypto: "xchain"
txVersion: 1
我链的配置如下 xchain.yaml
内容如下
# node config
# 日志配置
log:
# 模块名称
module: xchain
# 日志目录
filepath: logs
# 日志文件名
filename: xchain
fmt: logfmt
# 是否打印命令行工具端口
console: true
# 日志等级
level: debug
# RPC 服务暴露的端口
tcpServer:
port: :37101
# prometheus监控指标端口, 为空的话就不启动
metricPort: :37200
tls: false
#cachePeriod: 2
# 最大接受数据包长度
# 区块链节点配置
p2p:
# module is the name of p2p module plugin, value is [p2pv2/p2pv1], default is p2pv2
module: p2pv2
port: 47101
#certPath: ./data/tls/1
#serviceName: saas_test.server.com
#bootNodes:
# - "/ip4/<ip>/tcp/<port>/p2p/<node_hash>" for p2pv2 or - "<ip>:<port>" for p2pv1
#staticNodes:
# xuper:
# - "127.0.0.1:47102"
miner:
# 密钥存储路径
keypath: ./data/keys
# 数据存储路径
datapath: ./data/blockchain
# 多盘存储的路径
#datapathOthers:
# - /ssd1/blockchain
# - /ssd2/blockchain
# - /ssd3/blockchain
utxo:
# utxo的内存LRUCache大小,表示内存中最多缓存多少个UtxoItem
cachesize: 2000000
# GenerateTx的临时锁定期限,默认是60秒
tmplockSeconds: 60
#单个块的合约执行的总时间(单位ms)
contractExecutionTime: 500
kernel:
# minNewChainAmount 设置创建平行链时最少要转多少钱到同链名address
minNewChainAmount: "100"
newChainWhiteList:
- dpzuVdosQrF2kmzumhVeFQZa1aYcdgFpN: true
# 管理native合约的配置
native:
enable: false
# 与部署相关的配置
deploy:
# 部署白名单,列表为钱包地址
whiteList:
enable: false
addresses:
- dpzuVdosQrF2kmzumhVeFQZa1aYcdgFpN
# docker相关配置
docker:
enable: false
# 合约运行的镜像名字
imageName: "docker.io/centos:7.5.1804"
# cpu核数限制,可以为小数
cpus: 1
# 内存大小限制
memory: "1G"
# 停止合约的等待秒数,超时强制杀死
stopTimeout: 3
# 插件配置文件路径
pluginConfPath: "./conf/plugins.conf"
# 是否启用p2p核心节点直连
coreConnection: false
txidCacheExpiredTime: "10s"
# 是否压缩交易/区块
enableCompress: true
# 块广播模式
blockBroadcaseMode: 0
# 剪枝配置
prune:
switch: false
bcname: "xuper"
targetBlockid: "xxx"
# wasm合约配置
wasm:
driver: "xvm"
enableUpgrade: false
xvm:
optLevel: 0
# 是否开启默认的XEndorser背书服务
enableXEndorser: false
我是用v2和v1.1版本的sdk都不行,恳求帮助
请问:
1.调用合约返回信息中没有eventlog,那有办法在不使用订阅的情况下知道此次交易是否有eventlog吗?
2.我想同步非挖矿的交易信息,如果使用订阅所有块,返回的信息中只有交易hash,并不能区分出这个交易是出块奖励还是正常的交易,这个有办法吗?
请问有evm合约升级方法吗,我看sdk中只提供了native和wasm合约升级方法,另外通过解读源码发现,提示说关闭了evm升级,不知为何?
2021/01/18 09:03:09 start testDeployWasmContract......
W8GDt7ajEP4rh18FAgw7xnQg2P6Wg8BTh
account: &{W8GDt7ajEP4rh18FAgw7xnQg2P6Wg8BTh {"Curvname":"P-256","X":115647121523999615544642610898155919161143807124137510426248196191719673759457,"Y":6834714425167762045798660276280535385884829351045282705119506064327324275863,"D":83942495777393029042150863703958248121731008811406779280150121616048053996456} {"Curvname":"P-256","X":115647121523999615544642610898155919161143807124137510426248196191719673759457,"Y":6834714425167762045798660276280535385884829351045282705119506064327324275863} }
2021/01/18 09:03:16 Fee will cost: 171785
2021/01/18 09:03:16 contract response: initialize succeed
2021/01/18 09:03:16 ComplianceCheck txid: f3290e93d43354ed9213f4be49548ae317408080d0abe98ce0b63a540dcd45b4
2021/01/18 09:03:16 DeployWasmContract err: Failed to post tx: RWACL_INVALID_ERROR
panic: Failed to post tx: RWACL_INVALID_ERROR
运行main_trust_counter时遇到上面的问题,这个错误是怎么会是
在利用solidity语言开发是,如ERC20、ERC721等,参数会经常传入以太坊0x的40位地址,这与xuper的16位地址不相同。
目前我是通过cli的形式在转换,既然cli已经支持,为什么sdk不加入该接口呢?
在并发场景下,容易因为引用同一utxo造成交易失败。
临时锁定utxo可增加交易成功率
If a user want to use other languages that he is very good at to interact with our blockchain, he'll can use it in the following ways:
If we don't add this function, a user can't use our lib directly.
go test -race -coverprofile=coverage.txt -covermode=atomic ./account/... ./common/... ./xuper/...
go: github.com/btcsuite/[email protected]: Get "https://proxy.golang.org/github.com/btcsuite/btcutil/@v/v0.0.0-20190425235716-9e5f4b9a998d.mod": dial tcp 172.217.163.49:443: connect: connection refused
make: *** [test] Error 1
github.com/xuperchain/[email protected]/protos/event.pb.go 代码:
func init() {
proto.RegisterEnum("protos.SubscribeType", SubscribeType_name, SubscribeType_value)
proto.RegisterType((*SubscribeRequest)(nil), "protos.SubscribeRequest")
proto.RegisterType((*Event)(nil), "protos.Event")
proto.RegisterType((*BlockRange)(nil), "protos.BlockRange")
proto.RegisterType((*BlockFilter)(nil), "protos.BlockFilter")
proto.RegisterType((*FilteredBlock)(nil), "protos.FilteredBlock")
proto.RegisterType((*FilteredTransaction)(nil), "protos.FilteredTransaction")
}
github.com/hyperledger/fabric-protos-go/blob/release-2.2/peer/events.pb.go 代码:
func init() {
proto.RegisterType((*FilteredBlock)(nil), "protos.FilteredBlock")
proto.RegisterType((*FilteredTransaction)(nil), "protos.FilteredTransaction")
proto.RegisterType((*FilteredTransactionActions)(nil), "protos.FilteredTransactionActions")
proto.RegisterType((*FilteredChaincodeAction)(nil), "protos.FilteredChaincodeAction")
proto.RegisterType((*BlockAndPrivateData)(nil), "protos.BlockAndPrivateData")
proto.RegisterMapType((map[uint64]*rwset.TxPvtReadWriteSet)(nil), "protos.BlockAndPrivateData.PrivateDataMapEntry")
proto.RegisterType((*DeliverResponse)(nil), "protos.DeliverResponse")
}
其中protos.FilteredBlock,protos.FilteredTransaction重复,导致编译后运行直接panic
链接本地国密环境时sdk报错:[SM2-P-256] is not supported yet
另:使用注释方法GetCryptoClient() base.CryptoClient出现以下编译异常信息:
# github.com/xuperchain/xuper-sdk-go/account
..\account\account.go:32:27: ecdsaAccount.JsonPublicKey undefined (type *"github.com/xuperchain/xuperchain/core/crypto/account".ECDSAAccount has no field or method JsonPublicKey, but does have JSONPublicKey)
..\account\account.go:33:27: ecdsaAccount.JsonPrivateKey undefined (type *"github.com/xuperchain/xuperchain/core/crypto/account".ECDSAAccount has no field or method JsonPrivateKey, but does have JSONPrivateKey)
..\account\account.go:48:27: ecdsaAccount.JsonPublicKey undefined (type *"github.com/xuperchain/xuperchain/core/crypto/account".ECDSAAccount has no field or method JsonPublicKey, but does have JSONPublicKey)
..\account\account.go:49:27: ecdsaAccount.JsonPrivateKey undefined (type *"github.com/xuperchain/xuperchain/core/crypto/account".ECDSAAccount has no field or method JsonPrivateKey, but does have JSONPrivateKey)
..\account\account.go:75:27: ecdsaAccount.JsonPublicKey undefined (type *"github.com/xuperchain/xuperchain/core/crypto/account".ECDSAAccount has no field or method JsonPublicKey, but does have JSONPublicKey)
..\account\account.go:76:27: ecdsaAccount.JsonPrivateKey undefined (type *"github.com/xuperchain/xuperchain/core/crypto/account".ECDSAAccount has no field or method JsonPrivateKey, but does have JSONPrivateKey)
..\account\account.go:91:40: cryptoClient.GetEcdsaPrivateKeyJsonFormatStr undefined (type base.CryptoClient has no field or method GetEcdsaPrivateKeyJsonFormatStr)
..\account\account.go:95:39: cryptoClient.GetEcdsaPublicKeyJsonFormatStr undefined (type base.CryptoClient has no field or method GetEcdsaPublicKeyJsonFormatStr)
# github.com/xuperchain/xuper-sdk-go/txhash
..\txhash\txhash.go:20:22: cryptoClient.HashUsingDoubleSha256 undefined (type base.CryptoClient has no field or method HashUsingDoubleSha256)
..\txhash\txhash.go:34:24: cryptoClient.HashUsingDoubleSha256 undefined (type base.CryptoClient has no field or method HashUsingDoubleSha256)
之前用sdk v1.0.0做成功了,请问v2.0.0是否支持与开放网络部署的智能合约建立连接?
遇到报错如下
EndorserCall ComplianceCheck failed: rpc error: code = Unknown desc = fee not enough
XuperChain使用Go-SDK调用模板合约“文件hash上链时,更改文件hash_id后仍出现”such hash has existed already的报错
image
我在“工作台”中“合约管理”中调用中修改不同的hash_id均成功了,但是在本地调用时修改不同的hash_id出现了such hash has existed already的报错
智能合约中的存证函数如下:
void storeFileInfo() {
xchain::Context* ctx = this->context();
std::string user_id = ctx->arg("user_id");
std::string hash_id = ctx->arg("hash_id");
std::string file_name = ctx->arg("file_name");
const std::string userKey = UserBucket + "/" + user_id + "/" + hash_id;
const std::string hashKey = HashBucket + "/" + hash_id;
std::string value = user_id + "\t" + hash_id + "\t" + file_name;
std::string tempVal;
if (ctx->get_object(hashKey, &tempVal)) {
ctx->error("storeFileInfo failed, such hash has existed already");
return;
}
if (ctx->put_object(userKey, value) && ctx->put_object(hashKey, value)) {
ctx->ok("storeFileInfo success");
return;
}
ctx->error("storeFileInfo failed");
}
后续更新:
去除了智能合约中的唯一性约束代码:
if (ctx->get_object(hashKey, &tempVal)) {
ctx->error("storeFileInfo failed, such hash has existed already");
return;
多次使用不同的hash_id运行成功,两次使用相同的hash_id上链存储也成功运行。但是实际的区块链存证业务场景中要求对存证文件的唯一性约束,请问错误是处在SDK上还是智能合约上?
报错:panic: EndorserCall PreExecWithFee failed: rpc error: code = Unknown desc = error 17 - Error 17: execution reverted: execution reverted
sdk.yaml设置如下:
endorseServiceHost: "39.156.69.83:37100"
complianceCheck:
isNeedComplianceCheck: true
isNeedComplianceCheckFee: true
complianceCheckEndorseServiceFee: 400
complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT
complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n
minNewChainAmount: "100"
crypto: "xchain"
txVersion: 3
maxRecvMsgSize: 134217728
add, _, _ := account.XchainToEVMAddress("qzuppnp2ZESdFf5Nd5AnDTWtBCASgg3cG")
fmt.Println(add)
fmt.Println("qzuppnp2ZESdFf5Nd5AnDTWtBCASgg3cG")
// outpt
1979D7D9326E313BFC3440523D68A417196B50BD
qzuppnp2ZESdFf5Nd5AnDTWtBCASgg3cG
add, _, _ := account.EVMToXchainAddress("1979D7D9326E313BFC3440523D68A417196B50BD")
fmt.Println(add)
fmt.Println("qzuppnp2ZESdFf5Nd5AnDTWtBCASgg3cG")
// outpt
SfJqiVXKNmZopWzMCjrJ6BjFfwDgZAApV
qzuppnp2ZESdFf5Nd5AnDTWtBCASgg3cG
你好,麻烦看下,谢谢
go: github.com/btcsuite/[email protected]: Get "https://proxy.golang.org/github.com/btcsuite/btcutil/@v/v0.0.0-20190425235716-9e5f4b9a998d.mod": dial tcp 172.217.160.113:443: i/o timeout
现在,修改XPOA共识候选人列表只能通过命令行多签,调用修改。后续是否可以在 sdk 中添加对应的方法。
Description
Get directly config info from member variable,no more reloading from configuration file.
make 成功了,但 make test 的时候报以下错误
go test github.com/xuperchain/xuper-sdk-go/account
ok github.com/xuperchain/xuper-sdk-go/account 0.030s
go test github.com/xuperchain/xuper-sdk-go/transfer
ok github.com/xuperchain/xuper-sdk-go/transfer (cached)
go test github.com/xuperchain/xuper-sdk-go/common
ok github.com/xuperchain/xuper-sdk-go/common (cached)
go test github.com/xuperchain/xuper-sdk-go/contract_account
ok github.com/xuperchain/xuper-sdk-go/contract_account (cached)
go test github.com/xuperchain/xuper-sdk-go/contract
ok github.com/xuperchain/xuper-sdk-go/contract (cached)
go test github.com/xuperchain/xuper-sdk-go/xchain
xchain/xchain_test.go:41:5: cli.Amount undefined (type *Xchain has no field or method Amount)
xchain/xchain_test.go:43:5: cli.To undefined (type *Xchain has no field or method To)
xchain/xchain_test.go:55:40: cli.Amount undefined (type *Xchain has no field or method Amount)
xchain/xchain_test.go:81:26: not enough arguments in call to cli.GenRealTx
have (*pb.PreExecWithSelectUTXOResponse, *pb.Transaction)
want (*pb.PreExecWithSelectUTXOResponse, *pb.Transaction, string)
xchain/xchain_test.go:92:6: assignment mismatch: 1 variable but cli.PostTx returns 2 values
xchain/xchain_test.go:104:5: cli.Amount undefined (type *Xchain has no field or method Amount)
xchain/xchain_test.go:106:5: cli.To undefined (type *Xchain has no field or method To)
xchain/xchain_test.go:118:40: cli.Amount undefined (type *Xchain has no field or method Amount)
xchain/xchain_test.go:143:44: cli.To undefined (type *Xchain has no field or method To)
xchain/xchain_test.go:143:52: cli.Amount undefined (type *Xchain has no field or method Amount)
xchain/xchain_test.go:143:52: too many errors
FAIL github.com/xuperchain/xuper-sdk-go/xchain [build failed]
FAIL
Makefile:20: recipe for target 'test' failed
make: *** [test] Error 2
使用go sdk时报错出现空指针异常
场景:
合约账号
UTXO不足;普通账号
给合约账号
转账一些,结果出现TX_VERIFICATION_ERROR
的错误?这个合约账号
是普通账号
下的。
请问是什么原因?
节点是拉的最新的代码 master 分支,配置成xpoa共识,返回报未实现?
retrieveAccount address: nuSMPvo6UUoTaT8mMQmHbfiRbJNbAymGh
2020/10/24 17:02:08 PreExecWithSelecUTXO EndorserCall failed, err: rpc error: code = Unimplemented desc = unknown service pb.xendorser
2020/10/24 17:02:08 CreateContractAccount err: EndorserCall error! Response is: rpc error: code = Unimplemented desc = unknown service pb.xendorser
exit status 255
账户余额查询正确,执行transfer报错,错误信息如下:
2020/08/05 15:58:44 PreExecWithSelecUTXO EndorserCall failed, err: rpc error: code = DeadlineExceeded desc = context deadline exceeded
2020/08/05 15:58:44 Transfer PreExecWithSelecUTXO failed, err: EndorserCall error! Response is: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Transfer err: EndorserCall error! Response is: rpc error: code = DeadlineExceeded desc = context deadline exceeded
transfer tx:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.