Skip to content

Commit

Permalink
Release/pre prod (#710)
Browse files Browse the repository at this point in the history
* 2.16.1

* add api of contract code (#684)

Co-authored-by: MIMIEYES <[email protected]>

* Modify a document

* en

* p19

* 2.19.0

* 2.19.0

* 2.19.0

---------

Co-authored-by: niels1286 <[email protected]>
Co-authored-by: MIMIEYES <[email protected]>
Co-authored-by: Jason <[email protected]>
Co-authored-by: cobble586 <[email protected]>
  • Loading branch information
5 people authored Feb 18, 2024
1 parent d9125e6 commit d508870
Show file tree
Hide file tree
Showing 1,517 changed files with 23,445 additions and 23,413 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ NULS-Wallet-linux64-alpha*
genesis-block_*.json
module_*.ncf
nuls-v2.zip
*.w
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Modules added in the future may be released under a different license specified
- [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)
- Telegram [NULS Chinese community](https://t.me/Nulscn)

####

Expand Down
106 changes: 53 additions & 53 deletions build/default-config.ncf
Original file line number Diff line number Diff line change
Expand Up @@ -4,105 +4,105 @@ language=en
logPath=Logs
logLevel=INFO
dataPath=data
#默认本链ID
#Default This ChainID
chainId=2
#地址前缀
#Address prefix
addressPrefix=tNULS
#默认本链主资产ID
#Default main asset of this chainID
assetId=1
#默认链名称
#Default Chain Name
chainName=nuls2
#本链默认资产符号
#The default asset symbol for this chain
symbol=NULS
#默认资产的小数精确位数
#The exact decimal places of default assets
decimals=8
#主网链id
#Main network chainid
mainChainId=2
#主网主资产id
#Main network assetsid
mainAssetId=1
#主网主资产符号
#Main network main asset symbol
mainSymbol=NULS
blackHolePublicKey=000000000000000000000000000000000000000000000000000000000000000000

[network]
port=18001
crossPort=18002
#魔法参数
#Magic parameters
packetMagic=20190917
#种子节点
#Seed node
selfSeedIps=39.98.226.51:18001,47.244.186.65:18001,47.254.234.223:18001,47.74.86.85:18001,192.168.1.145:18001
#主网的跨链种子连接节点
#Cross chain seed connection nodes of the main network
moonSeedIps=39.98.226.51:18002,47.244.186.65:18002,47.254.234.223:18002,47.74.86.85:18002
#最大入网连接数
#Maximum number of network connections
maxInCount=100
#最大出网连接数
#Maximum number of outbound connections
maxOutCount=20

[account]
keystoreFolder=/keystore/backup

[block]
#区块最大字节数
#Maximum number of bytes in a block
blockMaxSize=5242880
#区块扩展字段最大字节数
#Maximum number of bytes for block extension fields
extendMaxSize=1024
#引发分叉链切换的高度差阈值
#Threshold of height difference that triggers fork chain switching
chainSwtichThreshold=3
#最小链接节点数,当链接到的网络节点低于此参数时,会持续等待
#Minimum number of linked nodes,When the network node linked to is below this parameter,Will continue to wait
minNodeAmount=2
#区块同步过程中,每次从网络上节点下载的区块数量
#During block synchronization process,The number of blocks downloaded from nodes on the network each time
downloadNumber=10
#从网络节点下载单个区块的超时时间
#The timeout for downloading a single block from a network node
singleDownloadTimeout=15000
#区块同步过程中缓存的区块字节数上限(20M)
#Maximum number of cached block bytes during block synchronization process(20M)
cachedBlockSizeLimit=20971520
#创世块文件路径(支持绝对路径与相对路径,相对路径相对于此配置文件的目录)
#Genesis block file path(Supports absolute and relative paths,Relative path relative to the directory of this configuration file)
genesisBlockPath=genesis-block.json

[consensus]
#种子节点列表
#Seed node list
seedNodes=tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp,tNULSeBaMoGr2RkLZPfJeS5dFzZeNj1oXmaYNe,tNULSeBaMmShSTVwbU4rHkZjpD98JgFgg6rmhF
#出块地址密码
#Block address password
password=nuls123456
#出块间隔时间(单位:s)
#Block output interval time(unit:s)
packingInterval=10
#共识委托抵押资产链ID
#Consensus entrusted mortgage asset chainID
agentChainId=2
#共识委托抵押资产ID
#Consensus entrusted mortgage assetsID
agentAssetId=1
#共识奖励资产ID(共识奖励必须为本链资产)
#Consensus reward assetsID(Consensus rewards must be assets of the same chain)
awardAssetId=1
#共识交易手续费单价
#Consensus transaction fee unit price
feeUnit=100000
#总通胀量
#Total Inflation
totalInflationAmount=11000000000000000
#初始通胀金额500w/265*30
#Initial inflation amount500w/265*30
inflationAmount=41095890410959
#通胀开始计算时间(单位:S)2020-07-12 00:00:00
#Inflation start calculation time(unit:S)2020-07-12 00:00:00
initTime=1594483200
#通缩比例(如果没有通缩则设为100)
#Deflationary ratio(If there is no deflation, set to100)
deflationRatio=99.6
#通缩间隔时间(单位:S),30天
#Deflation interval time(unit:S),30day
deflationTimeInterval=2592000

[smart-contract]
#合约视图方法调用最大消耗的Gas
#The maximum consumption of contract view method callsGas
maxViewGas=100000000

[public-service]
#public-service模块对外的rpc端口号
#public-serviceModule ExternalrpcPort number
rpcPort=18003
#数据库url地址
#databaseurladdress
databaseUrl=127.0.0.1
#数据库端口号
#Database port number
databasePort=27017
#连接池最大数
#Maximum number of connection pools
maxAliveConnect=20
#连接最大等待时间
#Maximum waiting time for connection
maxWaitTime=120000
#连接最大持续时间
#Maximum duration of connection
socketTimeout=300000
#连接超时时间
#Connection timeout
connectTimeOut=30000
developerNodeAddress=tNULSeBaMuKuKY4UstKpXvGxd7LEvEBtd3NXAG,tNULSeBaMns1C6kTePxcQS7rGAu37foAwAMpri
ambassadorNodeAddress=tNULSeBaMhWyQBHc54oXLXB13WhJsyrTobMYYU,tNULSeBaMtCmUuBHMDAjKVSoVBsAEvLoWCspyE
Expand All @@ -112,27 +112,27 @@ teamAddress=tNULSeBaMqTvaS2NEEZfdrmPzoRvd8zN6T57LH
communityAddress=tNULSeBaMm9RQLKKUBXKJ1rQ7g4iobmWAB73mS

[cross-chain]
#跨链节点链接的最小值
#The minimum value of cross chain node links
minNodeAmount=2
#跨链节点链接的最大值
#Maximum value of cross chain node links
sendHeight=6
#跨链交易拜占庭比例
#Byzantine proportion of cross chain transactions
byzantineRatio=66
#主网跨链种子节点列表
#Main network cross chain seed node list
crossSeedIps=39.98.226.51:18002,47.244.186.65:18002,47.254.234.223:18002,47.74.86.85:18002,192.168.1.145:18002
#主网验证人列表
#List of main network validators
verifiers=tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp,tNULSeBaMmShSTVwbU4rHkZjpD98JgFgg6rmhF,tNULSeBaMoGr2RkLZPfJeS5dFzZeNj1oXmaYNe
#主网签名拜占庭比列
#Main network signature Byzantine comparison
mainByzantineRatio=66
#主网最大签名数
#Maximum number of signatures on the main network
maxSignatureCount=100

[nuls-api]
#httpServer的启动ip
#httpServerStart ofip
serverIp=127.0.0.1
#httpServer的启动port
#httpServerStart ofport
serverPort=18004

[protocol-update]
#每隔多少个区块统计一次协议占比
interval=10
#How many blocks do we count the proportion of protocols per second
interval=10
2 changes: 1 addition & 1 deletion build/genesis-block.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"extend": "01000000010076c8775d0100010001005a64002056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"remark": "4f70656e2c204c69626572616c2c204175746f6e6f6d6f75732c2053656c662d45766f6c76696e670ae5bc80e694beefbc8ce887aae794b1efbc8ce887aae6b2bbefbc8ce8bf9be58c960a4f75766572742c204c696272652c204175746f6e6f6d652c20c389766f6c757469660ae382aae383bce38397e383b3e38081e38395e383aae383bce38081e887aae6b2bbe38081e980b2e58c960ad09ed182d0bad180d18bd182d18bd0b92c20d0a1d0b2d0bed0b1d0bed0b4d0bdd0b0d18f2c20d090d0b2d182d0bed0bdd0bed0bcd0bdd0b0d18f2c20d18dd0b2d0bed0bbd18ed186d0b8d18f0aeab09cebb0a9eca0812020eca784ebb3b4eca08120ec9e90ec9ca8eca08120ed9881ebaa85eca0810a4162696572746f2c204c696272652c20417574c3b36e6f6d6f2c2045766f6c757469766f0ad981d8aad8ad20d88c20d8add8b120d88c20d985d8b3d8aad982d98420d88c20d8aad8b7d988d8b10a4f6666656e2c20667265692c206175746f6e6f6d2c2045766f6c7574696f6e0a45766f6c75c3a7c3a36f206162657274612c206c69767265206520617574c3b36e6f6d610ac39670706e612c20667269612c206175746f6e6f6d612c2065766f6c7574696f6e0ace91cebdcebfceb9cebacf84ceae2c20ceb5cebbceb5cf8dceb8ceb5cf81ceb72c20ceb1cf85cf84cf8ccebdcebfcebcceb72c20ceb5cebeceadcebbceb9cebeceb70a41c3a7c4b16b2c20c3b67a67c3bc722c20c3b67a65726b2c20657672696d0a4f736361696c2c2073616f7220696e2061697363652c206e65616d6873706c65c3a163682c20c3a96162686cc3b36964",
"privateKey": "009cf05b6b3fe8c09b84c13783140c0f1958e8841f8b6f894ef69431522bc65712"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-07 15:11
* @Description: 功能描述
* @Description: Function Description
*/
public class BaseReq {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-07 19:46
* @Description: rpc provider 基础类
* @Description: rpc provider Basic class
*/
public abstract class BaseRpcService extends BaseService {

public static final ErrorCode RPC_ERROR_CODE = ErrorCode.init("10016");

/**
* 调用其他模块rpc接口
* @param module 模块名称
* @param method rpc接口名称
* @param req 业务参数对象
* @param callback 回调函数
* @param <T> 返回值泛型类型
* Call other modulesrpcinterface
* @param module Module Name
* @param method rpcInterface Name
* @param req Business parameter object
* @param callback Callback function
* @param <T> Return value generic type
* @return
*/
protected <T,R> Result<T> callRpc(String module,String method,Object req,Function<R,Result> callback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-06 15:44
* @Description: 功能描述
* @Description: Function Description
*/
public abstract class BaseService {

/**
* 默认chainId
* 从配置文件中注入
* defaultchainId
* Inject from configuration file
*/
private int chainId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-06 14:36
* @Description: 功能描述
* @Description: Function Description
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(value={ElementType.TYPE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-06 15:45
* @Description: 功能描述
* @Description: Function Description
*/
public class Result<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-06 14:34
* @Description: 功能描述
* @Description: Function Description
*/
public class ServiceManager {

/**
* 初始化标记
* Initialize markers
*/
public static boolean inited = false;


public static Map<Class,Object> serviceImpls = new HashMap<>();

/**
* 获取服务实现类
* Get Service Implementation Class
* @param serviceClass
* @param <T>
* @return
Expand All @@ -38,7 +38,7 @@ public static <T> T get(Class<T> serviceClass){
}

public static void init(Integer defaultChainId, Provider.ProviderType providerType) {
//1.初始化提供器类型
//1.Initialize provider type
// Provider.ProviderType providerType;
// Integer defaultChainId;
// try {
Expand All @@ -51,7 +51,7 @@ public static void init(Integer defaultChainId, Provider.ProviderType providerTy
// } catch (IOException e) {
// throw new RuntimeException("api provider init fail, load module.properties fail");
// }
//2.加载服务提供类实例
//2.Load service provider class instances
List<Class> imps = ScanUtil.scan("io.nuls.base.api.provider");
imps.forEach(cls->{
Provider annotation = (Provider) cls.getAnnotation(Provider.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* @Author: zhoulijun
* @Time: 2019-03-07 18:33
* @Description: 在请求参数中注入默认chainId
* @Description: Inject default in request parameterschainId
*/
public class ServiceProxy implements MethodInterceptor {

Expand Down
Loading

0 comments on commit d508870

Please sign in to comment.