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

Pre master #697

Merged
merged 364 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
364 commits
Select commit Hold shift + click to select a range
a86690a
update ps coinData decimals
zhouwei1985 Sep 7, 2020
538d4b7
commit local config files
niels1286 Sep 8, 2020
b1de860
test code
MIMIEYES Sep 8, 2020
83dab6d
Merge branch '2.7.0' of https:/nuls-io/nuls-v2 into 2.7.0
MIMIEYES Sep 8, 2020
500c89e
commit local config files
niels1286 Sep 9, 2020
58f1751
contract database prune disabled
MIMIEYES Sep 9, 2020
1235739
跨链交易不验证签名部分
lijunzhou Sep 9, 2020
c9040ee
跨链交易验证资产是否已经注册成跨链资产
lijunzhou Sep 9, 2020
3ffcf1e
test
lijunzhou Sep 9, 2020
b7b5573
add bool
MIMIEYES Sep 9, 2020
2676091
update config
niels1286 Sep 9, 2020
b9fdcaa
Merge remote-tracking branch 'origin/2.7.0' into 2.7.0
niels1286 Sep 9, 2020
a7413e9
update config
niels1286 Sep 9, 2020
43eec80
update config
niels1286 Sep 9, 2020
f919c6f
update config
niels1286 Sep 9, 2020
932e545
add test logs
niels1286 Sep 10, 2020
a8c9cb2
add test logs
niels1286 Sep 10, 2020
0d0a0b6
add test logs
niels1286 Sep 10, 2020
7651224
update ps coinData decimals
zhouwei1985 Sep 10, 2020
c162352
single thread pool
MIMIEYES Sep 11, 2020
5522f3b
跨链重新进行拜赞庭签名
lijunzhou Sep 11, 2020
126f5d5
跨链重新进行拜赞庭签名
lijunzhou Sep 11, 2020
e3430f2
跨链重新进行拜赞庭签名
lijunzhou Sep 14, 2020
4b08c0f
Merge branch '2.6.0.2' into 2.6.1-beta-cc
lijunzhou Sep 14, 2020
42187c5
跨链重新进行拜赞庭签名
lijunzhou Sep 14, 2020
6c59427
跨链重新进行拜赞庭签名
lijunzhou Sep 14, 2020
9e82e54
跨链重新进行拜赞庭签名
lijunzhou Sep 14, 2020
a99a64c
跨链重新进行拜赞庭签名
lijunzhou Sep 14, 2020
824752b
Merge branch '2.7.0' into 2.6.1-beta-cc
lijunzhou Sep 14, 2020
454b4fe
recovery
MIMIEYES Sep 14, 2020
bbc81a2
Merge branch '2.6.1-beta-cc' into 2.7.0
lijunzhou Sep 15, 2020
a3b7efc
add boolean of contract cross asset
MIMIEYES Sep 15, 2020
27621e3
fix red punish bug
niels1286 Sep 17, 2020
18e0be2
Merge remote-tracking branch 'origin/2.7.0' into 2.7.0
niels1286 Sep 17, 2020
32dbafe
update ps-module getBlockTxList
zhouwei1985 Sep 23, 2020
1b086b6
update ps-module getBlockTxList
zhouwei1985 Sep 23, 2020
a037b63
add boolean of contract cross asset
MIMIEYES Sep 24, 2020
2f426f8
update ps-module getTxList
zhouwei1985 Sep 28, 2020
9ef0031
update ps-module getAcctTxs
zhouwei1985 Oct 10, 2020
9a4eb3d
测试验证人列表异常问题
lijunzhou Oct 12, 2020
4ada129
update corsschain tx
zhouwei1985 Oct 13, 2020
d98751a
修复因变更跨链资产造成的平行链验证人列表重置问题。
lijunzhou Oct 14, 2020
b7afa16
Merge branch '2.6.0.2' into 2.7.0
lijunzhou Oct 14, 2020
b412967
修复因变更跨链资产造成的平行链验证人列表重置问题。
lijunzhou Oct 14, 2020
2c25bc5
修改协议号
lijunzhou Oct 16, 2020
3723026
Merge branch '2.7.0-beta' of github.com:nuls-io/nuls-v2 into 2.7.0-beta
lijunzhou Oct 16, 2020
a4354e9
update disable asset
MIMIEYES Oct 20, 2020
8e82f0a
beta config
lijunzhou Oct 26, 2020
bfea436
兼容验证人恢复的交易
lijunzhou Oct 28, 2020
8614472
兼容验证人恢复的交易
lijunzhou Oct 28, 2020
6b9ef83
配置文件
lijunzhou Oct 28, 2020
827d9e8
修复nuls-api依赖provider接口版本错误问题
lijunzhou Oct 28, 2020
b7edbc9
修复nulstar在window上启动问题
lijunzhou Oct 28, 2020
5305647
update config
zhouwei1985 Oct 29, 2020
51789c4
update ps-module getContract
zhouwei1985 Oct 29, 2020
72adb5f
contract multi-asset transfer
MIMIEYES Oct 29, 2020
0bdd1e1
contract multi-asset test and fix bug
MIMIEYES Oct 30, 2020
ecb2f82
fix bug about balance of contract
MIMIEYES Oct 30, 2020
2d701f4
fix bug and update test case
MIMIEYES Nov 2, 2020
cd2c9c7
test case updated
MIMIEYES Nov 3, 2020
cca42e4
update ps-module getAccountTokenInfo
zhouwei1985 Nov 4, 2020
2f103f6
update ps-module getAccountTokenInfo
zhouwei1985 Nov 4, 2020
3c9cb6d
update ps-module getAccountTokenInfo
zhouwei1985 Nov 4, 2020
1356980
fix bug about contract transfer merge
MIMIEYES Nov 4, 2020
afe6e2c
update test case
MIMIEYES Nov 5, 2020
827c6a4
add cmd error log
zhouwei1985 Nov 6, 2020
8b7206c
update test case
MIMIEYES Nov 9, 2020
40a8a69
add ImportKeyStoreFilesProcessor cmd
zhouwei1985 Nov 9, 2020
8f13f47
dev
MIMIEYES Nov 9, 2020
6c9826f
dev
MIMIEYES Nov 9, 2020
cdf7e33
fix bug about contract transfer locked
MIMIEYES Nov 10, 2020
143d69c
update contract call validation
MIMIEYES Nov 10, 2020
048e086
update contract call validation
MIMIEYES Nov 11, 2020
7e107c5
update module connection
MIMIEYES Nov 11, 2020
22abd3a
optimize ledger
MIMIEYES Nov 11, 2020
040415e
Merge branch 'feature/contract-asset' into feature/contract-asset-v2
MIMIEYES Nov 11, 2020
9aa2064
transaction block height update
MIMIEYES Nov 12, 2020
b0c1f80
recovery versions
MIMIEYES Nov 12, 2020
4c59bc5
update vm sdk classes
MIMIEYES Nov 16, 2020
0c6d91d
update package
MIMIEYES Nov 17, 2020
abd8965
优化跨链交易重新处理机制
lijunzhou Nov 17, 2020
fc9e80f
Merge branch '2.7.0.1' into 2.7.0.2
lijunzhou Nov 17, 2020
9745722
优化跨链交易重新处理机制
lijunzhou Nov 17, 2020
f9f41f9
优化跨链交易重新处理机制
lijunzhou Nov 17, 2020
288ab00
version
lijunzhou Nov 17, 2020
90dfc3d
update validation of contract args
MIMIEYES Nov 17, 2020
d916660
Merge branch '2.7.0.2' into 2.7.2
lijunzhou Nov 17, 2020
8b0ee17
fix bug
MIMIEYES Nov 17, 2020
a3db5b3
Merge branch '2.7.0' into 2.7.2
lijunzhou Nov 17, 2020
6a0751e
Merge branch '2.7.2' of github.com:nuls-io/nuls-v2 into 2.7.2
lijunzhou Nov 17, 2020
5469cfd
add CrossChainAssetRegMngRepository cmd
zhouwei1985 Nov 19, 2020
b0be965
Merge branch '2.7.2' into 2.7.0.1
zhouwei1985 Nov 19, 2020
031a228
v2.7.3
niels1286 Nov 20, 2020
520ffb4
update multi-asset in contract
MIMIEYES Nov 20, 2020
d06e606
v2.7.3
niels1286 Nov 20, 2020
2fb19c1
update package
lichao23 Nov 20, 2020
475d10a
single thread in contract
MIMIEYES Nov 20, 2020
d84588e
revert
MIMIEYES Nov 20, 2020
5a5a31b
update
MIMIEYES Nov 21, 2020
25df1b4
update max count
MIMIEYES Nov 21, 2020
4f9a5c6
暂时关闭跨链交易
lijunzhou Nov 21, 2020
b4432ab
暂时关闭跨链交易
lijunzhou Nov 21, 2020
77caebc
暂时关闭跨链交易
lijunzhou Nov 21, 2020
ea87750
support many assets transfer to contract
MIMIEYES Nov 21, 2020
a41b067
update vm cache settings
MIMIEYES Nov 22, 2020
27de3ff
update setting
MIMIEYES Nov 22, 2020
a289c85
remove debug logs
niels1286 Nov 23, 2020
f99041e
update log
MIMIEYES Nov 23, 2020
75ec14d
重置本链验证人列表交易
lijunzhou Nov 23, 2020
3f9e6a1
update data source in contract
MIMIEYES Nov 23, 2020
9f3b12e
Merge remote-tracking branch 'origin/2.7.3' into 2.7.3
niels1286 Nov 23, 2020
0b35da6
重置本链验证人列表交易
lijunzhou Nov 24, 2020
447cf23
重置本链验证人列表交易
lijunzhou Nov 24, 2020
f018949
重置本链验证人列表交易
lijunzhou Nov 24, 2020
5707757
普通跨链交易饱和签名数在最少签名数的基础上上浮30%。
lijunzhou Nov 24, 2020
615d12e
交易模块基础验证中验证手续费获取交易size时, 去掉交易签名的size(针对所有交易)
lichao23 Nov 24, 2020
2fee4c3
重置本链验证人后创建一笔初始化验证人交易重置平行链存储的主链验证人列表
lijunzhou Nov 24, 2020
51230a9
重置本链验证人后创建一笔初始化验证人交易重置平行链存储的主链验证人列表
lijunzhou Nov 24, 2020
cfb03f6
重置本链验证人后创建一笔初始化验证人交易重置平行链存储的主链验证人列表
lijunzhou Nov 24, 2020
e5ff7ba
rm
lijunzhou Nov 24, 2020
c7c2449
重置本链验证人后创建一笔初始化验证人交易重置平行链存储的主链验证人列表
lijunzhou Nov 24, 2020
0af6c97
重置本链验证人后创建一笔初始化验证人交易重置平行链存储的主链验证人列表
lijunzhou Nov 25, 2020
c0e004a
普通跨链交易饱和签名数在最少签名数的基础上上浮30%。
lijunzhou Nov 25, 2020
df4d659
Merge branch 'reset_local_verifier_list' into 2.7.3
lijunzhou Nov 26, 2020
2ccb932
普通跨链交易饱和签名数在最少签名数的基础上上浮5%。
lijunzhou Nov 26, 2020
1a7de92
Merge branch 'reset_local_verifier_list' into 2.7.3
lijunzhou Nov 26, 2020
1409d32
update MongoAccountServiceImpl change AddressLIst
zhouwei1985 Nov 28, 2020
c71034e
打开跨链交易
lijunzhou Nov 28, 2020
e37d0ee
update config
zhouwei1985 Nov 30, 2020
2a7cb1f
Merge branch '2.7.3' into 2.7.2
zhouwei1985 Nov 30, 2020
1e8d835
gas price coding
MIMIEYES Dec 1, 2020
23cce1f
update vm class code load
MIMIEYES Dec 1, 2020
f55ff34
update mongodb.estimatedDocumentCount()
zhouwei1985 Dec 2, 2020
2746230
普通跨链交易饱和签名数在最少签名数的基础上上浮30%。
lijunzhou Dec 2, 2020
251885c
fix bug about contract multi-asset
MIMIEYES Dec 2, 2020
cf0c310
修改回滚逻辑,临时,后续需要仔细重构
niels1286 Dec 3, 2020
5057b67
remove ps module
lijunzhou Dec 3, 2020
6b41d26
update contract execution way
MIMIEYES Dec 3, 2020
e265c5c
Merge branch 'feature/contract-asset-v2' into feature/contract-asset-v3
MIMIEYES Dec 4, 2020
06d033f
update package logic of contract transactions
MIMIEYES Dec 4, 2020
e815476
test case
MIMIEYES Dec 7, 2020
491ac78
Merge branch 'feature/contract-asset-v3' into 2.8.0
MIMIEYES Dec 7, 2020
020a7b9
尝试修改切换分叉链失败时,区块模块停止的问题
niels1286 Dec 7, 2020
d938178
Merge remote-tracking branch 'origin/2.8.0' into 2.8.0
niels1286 Dec 7, 2020
4156b14
fix bug about multi-asset transfer into contract
MIMIEYES Dec 7, 2020
60304d9
update contract db and transfer
MIMIEYES Dec 8, 2020
4e9f1b4
fix NPE
MIMIEYES Dec 8, 2020
4de19be
update memory rule in contract
MIMIEYES Dec 8, 2020
9d25730
update result
MIMIEYES Dec 8, 2020
b2a252f
update contract transfer back tx
MIMIEYES Dec 8, 2020
77979a5
update ChainAssetCmd
zhouwei1985 Dec 9, 2020
1b8e615
Merge remote-tracking branch 'origin/2.8.0' into 2.8.0
zhouwei1985 Dec 9, 2020
4600895
启动脚本增加动态JVM参数
lijunzhou Dec 10, 2020
ae7e4dc
nrc721 support coding in contract module
MIMIEYES Dec 10, 2020
c8c59d4
启动脚本增加动态JVM参数
lijunzhou Dec 10, 2020
933642e
调整window启动脚本
lijunzhou Dec 10, 2020
f4f99a2
nrc721 parse
MIMIEYES Dec 10, 2020
c3ccdc3
update validation of call in nuls-api
MIMIEYES Dec 10, 2020
1fad30d
update nuls api
MIMIEYES Dec 11, 2020
596d471
fix bug about token cross chain
MIMIEYES Dec 11, 2020
b6d09d9
recovery package count (#614)
MIMIEYES Dec 11, 2020
fc572c3
修改协议升级的延迟块数 (#615)
lijunzhou Dec 14, 2020
437864c
update test case
MIMIEYES Dec 14, 2020
0ba027b
Merge branch 'feature/nrc721-v2' into 2.8.1
MIMIEYES Dec 14, 2020
84b8c6f
add log trace
MIMIEYES Dec 18, 2020
3c69f69
重新处理跨链交易增加token跨链
lijunzhou Dec 19, 2020
dd66b56
重新处理跨链交易增加token跨链
lijunzhou Dec 19, 2020
059b234
重新处理跨链交易增加token跨链
lijunzhou Dec 19, 2020
ce51e03
重新处理跨链交易增加token跨链
lijunzhou Dec 19, 2020
03aff61
add log trace
MIMIEYES Dec 24, 2020
01a17b5
update 3g mem of contract module
MIMIEYES Dec 24, 2020
3879532
contract db query optimize
MIMIEYES Dec 29, 2020
988a51a
update log
MIMIEYES Dec 29, 2020
bc2c062
remove log trace
MIMIEYES Dec 29, 2020
b74a685
add txType
zhouwei1985 Dec 30, 2020
79b96d3
contract db query optimize testing
MIMIEYES Dec 30, 2020
3d35990
update cross token system contract
MIMIEYES Dec 31, 2020
1a66be7
调试主网配置
niels1286 Dec 31, 2020
f344f03
Merge remote-tracking branch 'origin/2.8.1' into 2.8.1
niels1286 Dec 31, 2020
7b587ef
es commit
niels1286 Dec 31, 2020
738c96e
version
lijunzhou Dec 31, 2020
38e14ae
优化协议版本切换逻辑
niels1286 Jan 4, 2021
e37af88
update
lichao23 Jan 4, 2021
26233a5
support multy asset with contract in nuls api module
MIMIEYES Jan 5, 2021
1ce2087
update offline contract transaction
MIMIEYES Jan 5, 2021
3e10a7f
add contract time out
MIMIEYES Jan 6, 2021
102b329
测试日志
lichao23 Jan 6, 2021
98a7490
clear old cache
MIMIEYES Jan 7, 2021
8dc9c1e
update
MIMIEYES Jan 7, 2021
7261584
test
MIMIEYES Jan 7, 2021
f79cc8c
Merge branch '2.8.2' into contract-storage
MIMIEYES Jan 7, 2021
4e32c0a
update
MIMIEYES Jan 7, 2021
192a600
update db initial
MIMIEYES Jan 8, 2021
1b61b6e
Merge branch '2.8.2' into contract-storage
MIMIEYES Jan 8, 2021
e391f82
fix bug
MIMIEYES Jan 11, 2021
1facb04
fix bug about conflict contract transaction
MIMIEYES Jan 11, 2021
e761f03
去掉多余日志
lijunzhou Jan 12, 2021
659b34d
fix bug about setContractGenerateTxTypes
MIMIEYES Jan 12, 2021
070d6ba
Merge branch '2.8.2' into contract-storage
MIMIEYES Jan 12, 2021
b017e73
修复本地验证人丢失的问题
lijunzhou Jan 12, 2021
0f31bac
修复本地验证人丢失的问题
lijunzhou Jan 12, 2021
8d6d307
Merge branch '2.8.2' into contract-storage
MIMIEYES Jan 12, 2021
5a6f0b1
add time out
MIMIEYES Jan 14, 2021
3140375
remove test code
MIMIEYES Jan 19, 2021
6d4ceea
remove test log
MIMIEYES Jan 19, 2021
f628ac5
remove unused code
MIMIEYES Jan 19, 2021
a3e4d0f
remove test code
MIMIEYES Jan 19, 2021
f5442b9
extend transaction sync time out
MIMIEYES Jan 26, 2021
7ae67a7
beta setting
MIMIEYES Jan 26, 2021
9ab4b06
smart contract 5G mem
lijunzhou Jan 26, 2021
798e478
version
lijunzhou Jan 26, 2021
9356be1
smart contract 3G mem
lijunzhou Jan 26, 2021
f8a501c
update config
zhouwei1985 Jan 27, 2021
fb0b700
Merge pull request #621 from nuls-io/release/pre-prod
lijunzhou Jan 27, 2021
b3eec36
2.9.0 (#622)
lijunzhou Mar 15, 2021
0460fc9
V2.9.1 (#626)
lijunzhou Apr 1, 2021
c37b66b
Release/pre prod (#629)
zhouwei1985 May 20, 2021
fa32792
update nuls.ncf (#634)
zhouwei1985 Jul 12, 2021
e877cfc
Develop (#640)
niels1286 Oct 11, 2021
646d584
Develop (#641)
niels1286 Oct 25, 2021
e1d4f14
Prod limit (#643)
MIMIEYES Nov 18, 2021
82121cf
add getBalanceList (#644)
zhouwei1985 Dec 3, 2021
ca5d8b2
V2.10.0 (#645)
niels1286 Dec 13, 2021
5e049d4
Prod api (#647)
zhouwei1985 Dec 17, 2021
c3b0850
Develop-v2.10.2 (#649)
niels1286 Jan 7, 2022
35a5017
2.10.2 (#650)
niels1286 Jan 10, 2022
0c691fe
Release/beta (#652)
niels1286 Jan 18, 2022
3595561
Prod 19 (#653)
lijunzhou Jan 19, 2022
505f0ed
Develop add api (#654)
niels1286 Jan 23, 2022
0cef233
Release/pre prod (#655)
niels1286 Jan 27, 2022
a610666
Release/pre prod 1.12.1 (#656)
niels1286 Feb 16, 2022
ea15b14
Release/pre prod (#657)
niels1286 Mar 10, 2022
709e026
Release/pre prod (#658)
niels1286 Mar 11, 2022
4c71d6f
Release/pre prod (#659)
niels1286 Mar 11, 2022
a9b5222
2.12.5 (#660)
niels1286 Apr 10, 2022
41ad279
Release/pre prod -- 2.13.0 (#661)
niels1286 Apr 22, 2022
7da411a
Release/pre prod (#662)
niels1286 Apr 22, 2022
9546182
cmd client add command (#664)
lijunzhou May 9, 2022
b1eb867
remove dependency-fastjson --- v2.13.1 (#671)
niels1286 May 25, 2022
9990eab
2.14.0 (#674)
niels1286 Jul 1, 2022
e370cdb
2.15.0 (#677)
niels1286 Aug 25, 2022
0b5534f
Release/pre prod (#680)
niels1286 Oct 14, 2022
b37069d
Release/pre prod (#682)
niels1286 Jan 17, 2023
7156471
Pre prod codehash (#685)
niels1286 May 16, 2023
2fececa
2.16.0 (#689)
niels1286 Jul 10, 2023
d087717
Fix crosschain (#692)
lijunzhou Jul 20, 2023
0fa60de
Release/pre prod (#695)
niels1286 Oct 23, 2023
ac3f719
Modify "Contact Us"
niels1286 Oct 23, 2023
524c4b6
Merge branch '2.17.0' into pre_master
niels1286 Oct 23, 2023
2ca5fa7
Modify "Contact Us"
niels1286 Oct 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 10 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@

## Welcome to NULS! ##

NULS — Making It Easier To Innovate

## Introduction

NULS is a blockchain infrastructure
that provides customizable services
and is also a global open-source
community blockchain project. NULS
adopts micro-services to achieve a
highly modular underlying
architecture, using smart contracts
and cross-chain technologies,
combined with the ability of Chain
Factory to quickly build chains, reduce
development costs, and accelerate
blockchain business application
landing.
NULS is a blockchain infrastructure that provides customizable services and is also a global open-source community blockchain project. NULS adopts micro-services to achieve a highly modular underlying architecture, using smart contracts and cross-chain technologies, combined with the ability of ChainBox to quickly build chains, reduce development costs, and accelerate blockchain business application landing.

## Getting Started

Expand Down Expand Up @@ -60,30 +49,16 @@ Note: The command will automatically end when all modules are started.

Stay tuned

## Explorer and Web Wallet
## Explorer

Explorer URL: [http://beta.nulscan.io/](http://beta.nulscan.io/)

Web Wallet: [http://beta.wallet.nuls.io/](http://beta.wallet.nuls.io/)
Explorer URL: [https://nulscan.io/](https://nulscan.io/)

## ChainBox Tutorial

Please check the following documents:

[https://docs.nuls.io/NULS2.0/chainBoxGuide.html](https://docs.nuls.io/NULS2.0/chainBoxGuide.html)

## Debug

Stay tuned

## Configuration

Stay tuned

## Interfaces

Stay tuned

## Modules Description

Please check the following documents:
Expand All @@ -101,15 +76,11 @@ Contributions to NULS are welcomed! We sincerely invite developers who are exper
Nuls is released under the [MIT](http://opensource.org/licenses/MIT) license.
Modules added in the future may be released under a different license specified in their module library path.

## Community
## Contact Us

- [nuls.io](https://nuls.io/)
- [@Twitter](https://twitter.com/nulsservice)
- [Discord](https://discord.com/invite/aRCwbj47WN/)
- [Website](https://nuls.io/)
- [Telegram](https://t.me/Nulsio/)
- [Reddit](https://www.reddit.com/r/nulsservice/)
- [Twitter](https://twitter.com/Nuls/)
- [Facebook](https://www.facebook.com/nulscommunity/)
- [YouTube channel](https://www.youtube.com/channel/UC8FkLeF4QW6Undm4B3InN1Q?view_as=subscriber)
- Telegram [NULS Community](https://t.me/Nulsio)
- Telegram [NULS 中文社区](https://t.me/Nulscn)

####

test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package io.nuls.block.constant;

import io.nuls.base.data.Block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public class ContractContext {
public static short PROTOCOL_14 = 14;
public static short PROTOCOL_15 = 15;
public static short PROTOCOL_16 = 16;
public static short PROTOCOL_17 = 17;
private static final LoadingCache<String, ContractAddressInfoPo> CONTRACT_INFO_CACHE;
private static ContractHelper contractHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,12 @@ private static Result invokeExternalCmd(MethodCode methodCode, MethodArgs method
String[] args = (String[]) frame.heap.getObject(argsRef);
return getAddressByPublicKey(args, methodCode, frame);
}
} else if ("keccak".equals(cmdName)) {
// add by pierre at 2023/10/07 p17
if(ProtocolGroupManager.getCurrentVersion(currentChainId) >= ContractContext.PROTOCOL_17 ) {
String[] args = (String[]) frame.heap.getObject(argsRef);
return keccak(args, methodCode, frame);
}
}
String[] args = (String[]) frame.heap.getObject(argsRef);

Expand Down Expand Up @@ -690,6 +696,18 @@ private static Result getCodeHash(String[] args, MethodCode methodCode, Frame fr
}
}

private static Result keccak(String[] args, MethodCode methodCode, Frame frame) {
try {
String hex = args[0];
String resultStr = KeccakHash.keccak(hex);
Object resultValue = frame.heap.newString(resultStr);
Result result = NativeMethod.result(methodCode, resultValue, frame);
return result;
} catch (Exception e) {
throw new ErrorException("Invoke external cmd failed. When keccak.", frame.vm.getGasUsed(), e.getMessage());
}
}

private static Result getAddressByPublicKey(String[] args, MethodCode methodCode, Frame frame) {
try {
int currentChainId = frame.vm.getProgramExecutor().getCurrentChainId();
Expand Down
5 changes: 5 additions & 0 deletions module/nuls-cores/src/main/resources/protocol/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,10 @@
"version": "16",
"effectiveRatio": "80",
"continuousIntervalCount": "10"
},
{
"version": "17",
"effectiveRatio": "80",
"continuousIntervalCount": "10"
}
]

This file was deleted.

2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.16.2
2.17.0