Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature-ethtx #1217

Merged
merged 21 commits into from
Jul 4, 2022
Merged

feature-ethtx #1217

merged 21 commits into from
Jul 4, 2022

Conversation

libangzhu
Copy link
Contributor

@libangzhu libangzhu commented Jun 29, 2022

  1. 增加nonce 自增机制
  2. 调整chain33 兼容交易全部走evm通道
  3. evm check 中新增 交易 取消,加速等功能

@codecov
Copy link

codecov bot commented Jul 1, 2022

Codecov Report

Merging #1217 (e3c90d1) into master (2af34a2) will increase coverage by 0.08%.
The diff coverage is 100.00%.

❗ Current head e3c90d1 differs from pull request most recent head 6ffed26. Consider uploading reports for the commit 6ffed26 to get more accurate results

@@            Coverage Diff             @@
##           master    #1217      +/-   ##
==========================================
+ Coverage   56.15%   56.24%   +0.08%     
==========================================
  Files         211      211              
  Lines       35118    35127       +9     
==========================================
+ Hits        19721    19757      +36     
+ Misses      13651    13624      -27     
  Partials     1746     1746              
Impacted Files Coverage Δ
plugin/mempool/para/base.go 80.85% <ø> (ø)
plugin/dapp/evm/executor/vm/common/address.go 74.78% <100.00%> (+5.33%) ⬆️
plugin/dapp/evm/executor/vm/runtime/contracts.go 79.55% <100.00%> (+0.10%) ⬆️
plugin/consensus/qbft/consensus_state.go 60.22% <0.00%> (+0.18%) ⬆️
plugin/store/mpt/db/trie.go 56.34% <0.00%> (+0.58%) ⬆️
plugin/consensus/qbft/peer_set.go 65.70% <0.00%> (+1.91%) ⬆️
plugin/consensus/qbft/store.go 53.48% <0.00%> (+6.97%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2af34a2...6ffed26. Read the comment docs.

Comment on lines 162 to 165
log15.Info("ecrecover::Run", "hash", common.Bytes2Hex(input[:32]))
log15.Info("ecrecover::Run", "signature", common.Bytes2Hex(sig))

//log15.Info("ecrecover::pubkey", "pubkey", common.Bytes2Hex(pubKey))
log15.Info("ecrecover::pubkey", "pubkey", common.Bytes2Hex(pubKey))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个日志是为了测试吧, 是不是要关掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已调整

@@ -146,6 +149,16 @@ func NewContractAddress(b Address, txHash []byte) Address {
return PubKey2Address(execPub)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个应该是生成合约地址的老的接口, 是不是应该在这个基础上改, 以及调用这个接口的相关代码(如rpc 命令行等)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

考虑到兼容之前的合约地址创建方式,所以通过地址+哈希的方式被保留下来,仅ETH 签名类型的合约创建 才使用地址+nonce 的方式

}

// 通用的EVM合约执行逻辑封装
// readOnly 是否只读调用,仅执行evm abi查询时为true
func (evm *EVMExecutor) innerExec(msg *common.Message, txHash []byte, index int, txFee uint64, readOnly bool) (receipt *types.Receipt, err error) {
func (evm *EVMExecutor) innerExec(msg *common.Message, tx *types.Transaction, txHash []byte, index int, txFee uint64, readOnly bool) (receipt *types.Receipt, err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里就不要增加tx这个参数了,原则就是将执行过程中需要的参数解析到msg或EVMExecutor中

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已调整

@vipwzw vipwzw merged commit 48c72dc into 33cn:master Jul 4, 2022
@33cn
Copy link
Owner

33cn commented Oct 11, 2022

🎉 This PR is included in version 1.67.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@33cn 33cn added the released label Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants