Comments (5)
并且当我连续向区块发送该消息时,正常交易将无法被处理
while True:
sendTrans = "{\"method\": \"Chain33.SendToAddress\",\"params\": [{\"From\": \"1CbEVT9RnM5oZhWMj4fxUrJX94VtRotzvs\",\"To\": \"1GhMZ7vpEEGLUmxcf8KRNedjpKZYFus9dJ\",\"amount\": 100000000}],\"id\": 0}"
print sendTrans
req2 = requests.post("http://localhost:8801",data=sendTrans)
print 'sendTrans',req2.text
from chain33.
在调试中我发现,问题似乎是在执行区块时,当交易出错后,仅仅将 block 中的交易删除,但是没有删除掉 mempool 中的交易。并且由于该交易无法扣除 Fee,执行级别为 ExecErr,我在 mempool 的 api 中似乎只发现了删除 ExecPack 级别交易的 api。
在 blockchain/exec.go 文件的 execBlock 函数中,似乎是这样,请问有别的发现吗?
if receipt.Ty == types.ExecErr {
chainlog.Error("exec tx err", "err", receipt)
if errReturn { //认为这个是一个错误的区块
return nil, nil, types.ErrBlockExec
}
deltxlist[i] = true
continue
}
...
//删除无效的交易
var deltx []*types.Transaction
if len(deltxlist) > 0 {
var newtx []*types.Transaction
for i := 0; i < len(block.Txs); i++ {
if deltxlist[i] {
deltx = append(deltx, block.Txs[i])
} else {
newtx = append(newtx, block.Txs[i])
}
}
block.Txs = newtx
block.TxHash = merkle.CalcMerkleRoot(block.Txs)
}
from chain33.
应该是这个问题,我们正在思考怎么修复。
from chain33.
应该有三个问题:
-
mempool 没有不应该让这样的交易进入打包环节
-
公司模块执行删除的交易,对应的mempool 中也要删除。
-
solo 挖矿 在交易删除光了之后,应该重新挖,而不是创建出区块。
from chain33.
@icehawk-hyb 你来修复这三个问题
from chain33.
Related Issues (20)
- 以太坊地址大小写兼容问题 HOT 2
- 扩展Address driver接口 HOT 1
- 部署/调用合约的手续费问题 HOT 1
- 以太坊地址作为dbkey存储大小写敏感 HOT 2
- 执行 send 命令行时, 无法指定签名的地址类型 HOT 3
- 钱包增加 coin type 898 支持 HOT 1
- block TxHash未正确设置 HOT 1
- 32位机器上使用atomic需要保证字节对齐 HOT 1
- 平行链延时交易兼容问题 HOT 1
- 平行链扩容方案 HOT 1
- 平行链EVM交易出现ErrSign的错误 HOT 3
- 平行链的evm手续费问题 HOT 3
- eth 兼容交易哈希与chain33 哈希映射 HOT 1
- 单元测试偶发失败 HOT 1
- chain33进程无法退出 HOT 1
- 源码编译 HOT 1
- 平行链执行器地址格式兼容 HOT 1
- blockchain同步处理导致死锁
- queue 模块单元测试偶现超时问题 HOT 3
- 新版本性能下降
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chain33.