Skip to content

Commit

Permalink
Merge pull request #126 from ElrondNetwork/rc-2022-june
Browse files Browse the repository at this point in the history
RC june 2022 compatible branch
  • Loading branch information
iulianpascalau authored Jun 28, 2022
2 parents 18d1d28 + f3f4d2b commit f4267e1
Show file tree
Hide file tree
Showing 12 changed files with 242 additions and 63 deletions.
61 changes: 60 additions & 1 deletion api.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@

# /network/delegated-info will return a list containing delegated list of addresses
# and their staked values on the system delegation smart contracts
{ Name = "/delegated-info", Open = true}
{ Name = "/delegated-info", Open = true},

# /network/ratings will return metrics related to ratings config
{ Name = "/ratings", Open = true },

# /network/genesis-nodes will return the genesis nodes public keys
{ Name = "/genesis-nodes", Open = true }
]

[APIPackages.log]
Expand Down Expand Up @@ -157,6 +163,9 @@
# /transaction/cost will receive a single transaction in JSON format and will return the estimated cost of it
{ Name = "/cost", Open = true },

# /transaction/pool will return the hashes of the transactions that are currently in the pool
{ Name = "/pool", Open = true },

# /transaction/:txhash will return the transaction in JSON format based on its hash
{ Name = "/:txhash", Open = true },
]
Expand All @@ -173,6 +182,56 @@
{ Name = "/by-round/:round", Open = true },
]

[APIPackages.internal]
Routes = [
# /internal/raw/metablock/by-nonce/:nonce will return the meta block in raw format based on its nonce
{ Name = "/raw/metablock/by-nonce/:nonce", Open = true },

# /internal/raw/metablock/by-hash/:hash will return the meta block in raw format based on its hash
{ Name = "/raw/metablock/by-hash/:hash", Open = true },

# /internal/raw/metablock/by-round/:round will return the meta block in raw format based on round
{ Name = "/raw/metablock/by-round/:round", Open = true },

# /internal/raw/startofepoch/metablock/by-epoch/:epoch will return the start of epoch meta block in raw format based on epoch
{ Name = "/raw/startofepoch/metablock/by-epoch/:epoch", Open = true },

# /internal/raw/shardblock/by-nonce/:nonce will return the shard block in raw format based on its nonce
{ Name = "/raw/shardblock/by-nonce/:nonce", Open = true },

# /internal/raw/shardblock/by-hash/:hash will return the shard block in raw format based on its hash
{ Name = "/raw/shardblock/by-hash/:hash", Open = true },

# /internal/raw/shardblock/by-round/:round will return the shard block in raw format based on round
{ Name = "/raw/shardblock/by-round/:round", Open = true },

# /internal/json/metablock/by-round/:nonce will return the meta block in JSON format based on nonce
{ Name = "/json/metablock/by-nonce/:nonce", Open = true },

# /internal/json/metablock/by-round/:hash will return the meta block in JSON format based on hash
{ Name = "/json/metablock/by-hash/:hash", Open = true },

# /internal/json/metablock/by-round/:round will return the meta block in JSON format based on roud
{ Name = "/json/metablock/by-round/:round", Open = true },

# /internal/json/startofepoch/metablock/by-epoch/:epoch will return the start of epoch meta block in json format based on epoch
{ Name = "/json/startofepoch/metablock/by-epoch/:epoch", Open = true },

# /internal/json/shardblock/by-round/:nonce will return the shard block in JSON format based on nonce
{ Name = "/json/shardblock/by-nonce/:nonce", Open = true },

# /internal/json/shardblock/by-round/:hash will return the shard block in JSON format based on hash
{ Name = "/json/shardblock/by-hash/:hash", Open = true },

# /internal/json/shardblock/by-round/:round will return the shard block in JSON format based on round
{ Name = "/json/shardblock/by-round/:round", Open = true },

# /internal/raw/miniblock/by-hash/:hash will return the miniblock in raw format based on hash for a specified epoch
{ Name = "/raw/miniblock/by-hash/:hash/epoch/:epoch", Open = true },

# /internal/json/miniblock/by-hash/:hash will return the miniblock in JSON format based on hash for a specified epoch
{ Name = "/json/miniblock/by-hash/:hash/epoch/:epoch", Open = true }
]

[APIPackages.proof]
Routes = [
Expand Down
2 changes: 1 addition & 1 deletion binaryVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tags/v1.3.28
tags/v1.3.31
59 changes: 20 additions & 39 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
# than this value, then the validators rating decrease should stop so they won't get jailed
MaxConsecutiveRoundsOfRatingDecrease = 600

# SyncProcessTimeInMillis is the value in milliseconds used when processing blocks while synchronizing blocks
SyncProcessTimeInMillis = 12000

[Versions]
DefaultVersion = "default"
VersionsByEpochs = [
Expand Down Expand Up @@ -300,32 +303,6 @@
MaxBatchSize = 100
MaxOpenFiles = 10

[AccountsTrieStorageOld]
[AccountsTrieStorageOld.Cache]
Name = "AccountsTrieStorage"
Capacity = 500000
Type = "SizeLRU"
SizeInBytes = 52428800 #50MB
[AccountsTrieStorageOld.DB]
FilePath = "AccountsTrie/MainDB"
Type = "LvlDBSerial"
BatchDelaySeconds = 2
MaxBatchSize = 45000
MaxOpenFiles = 10

[PeerAccountsTrieStorageOld]
[PeerAccountsTrieStorageOld.Cache]
Name = "PeerAccountsTrieStorage"
Capacity = 5000
Type = "SizeLRU"
SizeInBytes = 52428800 #50MB
[PeerAccountsTrieStorageOld.DB]
FilePath = "PeerAccountsTrie/MainDB"
Type = "LvlDBSerial"
BatchDelaySeconds = 2
MaxBatchSize = 1000
MaxOpenFiles = 10

[AccountsTrieStorage]
[AccountsTrieStorage.Cache]
Name = "AccountsTrieStorage"
Expand Down Expand Up @@ -389,19 +366,10 @@
MaxBatchSize = 100
MaxOpenFiles = 10

[TrieSnapshotDB]
FilePath = "TrieSnapshot"
Type = "LvlDBSerial"
BatchDelaySeconds = 2
MaxBatchSize = 40000
MaxOpenFiles = 10

[TrieStorageManagerConfig]
PruningBufferLen = 100000
SnapshotsBufferLen = 1000000
SnapshotsGoroutineNum = 200
MaxSnapshots = 3
KeepSnapshots = false
CheckpointHashesHolderMaxSize = 52428800 #50MB

[HeadersPoolConfig]
Expand Down Expand Up @@ -506,6 +474,10 @@
Capacity = 10000
Type = "LRU"

[PeersRatingConfig]
TopRatedCacheCapacity = 5000
BadRatedCacheCapacity = 5000

[TrieSyncStorage]
Capacity = 300000
SizeInBytes = 104857600 #100MB
Expand Down Expand Up @@ -588,6 +560,9 @@
SameSourceRequests = 10000
# SameSourceResetIntervalInSec time frame between counter reset, in seconds
SameSourceResetIntervalInSec = 1
# TrieOperationsDeadlineMilliseconds represents the maximum duration that an API call targeting a trie operation
# can take.
TrieOperationsDeadlineMilliseconds = 10000
# EndpointsThrottlers represents a map for maximum simultaneous go routines for an endpoint
EndpointsThrottlers = [{ Endpoint = "/transaction/:hash", MaxNumGoRoutines = 10 },
{ Endpoint = "/transaction/send", MaxNumGoRoutines = 2 },
Expand Down Expand Up @@ -707,6 +682,8 @@

[VirtualMachine]
[VirtualMachine.Execution]
TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds
WasmerSIGSEGVPassthrough = false # must be false for release
ArwenVersions = [
{ StartEpoch = 0, Version = "v1.2" },
{ StartEpoch = 326, Version = "v1.3" },
Expand All @@ -715,15 +692,19 @@

[VirtualMachine.Querying]
NumConcurrentVMs = 1
TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds
WasmerSIGSEGVPassthrough = false # must be false for release
ArwenVersions = [
{ StartEpoch = 0, Version = "v1.2" },
{ StartEpoch = 326, Version = "v1.3" },
{ StartEpoch = 432, Version = "v1.4" },
]
[VirtualMachine.GasConfig]
# MaxGasPerVmQuery defines the maximum amount of gas to be allocated for VM Queries coming from API
# If set to 0, then MaxUInt64 will be used
MaxGasPerVmQuery = 1500000000 #1.5b

[VirtualMachine.GasConfig]
# The following values define the maximum amount of gas to be allocated for VM Queries coming from API
# If set to 0, then MaxUInt64 will be used
ShardMaxGasPerVmQuery = 1500000000 #1.5b
MetaMaxGasPerVmQuery = 0 #unlimited

[Hardfork]
EnableTrigger = true
Expand Down
13 changes: 8 additions & 5 deletions enableEpochs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@
# FrontRunningProtectionEnableEpoch represents the epoch when the first version of protection against front running is enabled
FrontRunningProtectionEnableEpoch = 613

# DisableOldTrieStorageEpoch represents the epoch when the old trie storage implementation will be disabled
DisableOldTrieStorageEpoch = 615

# IsPayableBySCEnableEpoch represents the epoch when a new flag isPayable by SC is enabled
IsPayableBySCEnableEpoch = 613

Expand Down Expand Up @@ -193,12 +190,18 @@
# CheckCorrectTokenIDForTransferRoleEnableEpoch represents the epoch when the correct token ID check is applied for transfer role verification
CheckCorrectTokenIDForTransferRoleEnableEpoch = 669

# CheckValueOnExecByCallerEnableEpoch represents the epoch when the check on value is enabled on exec by caller
CheckValueOnExecByCallerEnableEpoch = 676
# DisableExecByCallerEnableEpoch represents the epoch when the check on value is disabled on exec by caller
DisableExecByCallerEnableEpoch = 676

# RefactorContextEnableEpoch represents the epoch when refactoring/simplifying is enabled in contexts
RefactorContextEnableEpoch = 680

# FailExecutionOnEveryAPIErrorEnableEpoch represent the epoch when new protection in VM is enabled to fail all wrong API calls
FailExecutionOnEveryAPIErrorEnableEpoch = 706

# ManagedCryptoAPIsEnableEpoch represents the epoch when new managed crypto APIs are enabled in the wasm VM
ManagedCryptoAPIsEnableEpoch = 706

# MaxNodesChangeEnableEpoch holds configuration for changing the maximum number of nodes and the enabling epoch
MaxNodesChangeEnableEpoch = [
{ EpochEnable = 0, MaxNumNodes = 2169, NodesToShufflePerShard = 143 },
Expand Down
12 changes: 6 additions & 6 deletions external.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#the node might loose rating (even facing penalties) due to the fact that
#the indexer is called synchronously and might block due to external causes.
#Strongly suggested to activate this on a regular observer node.
Enabled = false
IndexerCacheSize = 0
Enabled = false
IndexerCacheSize = 0
BulkRequestMaxSizeInBytes = 4194304 # 4MB
URL = "http://localhost:9200"
UseKibana = false
Username = ""
Password = ""
URL = "http://localhost:9200"
UseKibana = false
Username = ""
Password = ""
# EnabledIndexes represents a slice of indexes that will be enabled for indexing. Full list is:
# ["rating", "transactions", "blocks", "validators", "miniblocks", "rounds", "accounts", "accountshistory", "receipts", "scresults", "accountsesdt", "accountsesdthistory", "epochinfo", "scdeploys", "tokens", "tags", "logs", "delegators", "operations"]
EnabledIndexes = ["rating", "transactions", "blocks", "validators", "miniblocks", "rounds", "accounts", "accountshistory", "receipts", "scresults", "accountsesdt", "accountsesdthistory", "epochinfo", "scdeploys", "tokens", "tags", "logs", "delegators", "operations"]
Expand Down
25 changes: 23 additions & 2 deletions gasSchedules/gasScheduleV1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
ESDTNFTUpdateAttributes = 500000
ESDTNFTMultiTransfer = 1000000


[MetaChainSystemSCsCost]
Stake = 5000000
UnStake = 5000000
Expand Down Expand Up @@ -90,9 +89,9 @@
GetReturnData = 100
GetNumReturnData = 100
GetReturnDataSize = 100
GetOriginalTxHash = 10000
CleanReturnData = 100
DeleteFromReturnData = 100
GetOriginalTxHash = 10000

[EthAPICost]
UseGas = 100
Expand Down Expand Up @@ -212,6 +211,28 @@
MBufferGetArgument = 1000
MBufferFinish = 1000
MBufferSetRandom = 6000
MBufferToBigFloat = 2000
MBufferFromBigFloat = 2000

[BigFloatAPICost]
BigFloatNewFromParts = 3000
BigFloatAdd = 7000
BigFloatSub = 7000
BigFloatMul = 7000
BigFloatDiv = 7000
BigFloatTruncate = 5000
BigFloatNeg = 5000
BigFloatClone = 5000
BigFloatCmp = 4000
BigFloatAbs = 5000
BigFloatSqrt = 7000
BigFloatPow = 10000
BigFloatFloor = 5000
BigFloatCeil = 5000
BigFloatIsInt = 3000
BigFloatSetBigInt = 3000
BigFloatSetInt64 = 1000
BigFloatGetConst = 1000

[WASMOpcodeCost]
Unreachable = 1
Expand Down
25 changes: 23 additions & 2 deletions gasSchedules/gasScheduleV2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
ESDTNFTUpdateAttributes = 500000
ESDTNFTMultiTransfer = 1000000


[MetaChainSystemSCsCost]
Stake = 5000000
UnStake = 5000000
Expand Down Expand Up @@ -90,9 +89,9 @@
GetReturnData = 100
GetNumReturnData = 100
GetReturnDataSize = 100
GetOriginalTxHash = 10000
CleanReturnData = 100
DeleteFromReturnData = 100
GetOriginalTxHash = 10000

[EthAPICost]
UseGas = 100
Expand Down Expand Up @@ -212,6 +211,28 @@
MBufferGetArgument = 1000
MBufferFinish = 1000
MBufferSetRandom = 6000
MBufferToBigFloat = 2000
MBufferFromBigFloat = 2000

[BigFloatAPICost]
BigFloatNewFromParts = 3000
BigFloatAdd = 7000
BigFloatSub = 7000
BigFloatMul = 7000
BigFloatDiv = 7000
BigFloatTruncate = 5000
BigFloatNeg = 5000
BigFloatClone = 5000
BigFloatCmp = 4000
BigFloatAbs = 5000
BigFloatSqrt = 7000
BigFloatPow = 10000
BigFloatFloor = 5000
BigFloatCeil = 5000
BigFloatIsInt = 3000
BigFloatSetBigInt = 3000
BigFloatSetInt64 = 1000
BigFloatGetConst = 1000

[WASMOpcodeCost]
Unreachable = 1
Expand Down
25 changes: 23 additions & 2 deletions gasSchedules/gasScheduleV3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
ESDTNFTUpdateAttributes = 500000
ESDTNFTMultiTransfer = 1000000


[MetaChainSystemSCsCost]
Stake = 5000000
UnStake = 5000000
Expand Down Expand Up @@ -90,9 +89,9 @@
GetReturnData = 100
GetNumReturnData = 100
GetReturnDataSize = 100
GetOriginalTxHash = 10000
CleanReturnData = 100
DeleteFromReturnData = 100
GetOriginalTxHash = 10000

[EthAPICost]
UseGas = 100
Expand Down Expand Up @@ -212,6 +211,28 @@
MBufferGetArgument = 1000
MBufferFinish = 1000
MBufferSetRandom = 6000
MBufferToBigFloat = 2000
MBufferFromBigFloat = 2000

[BigFloatAPICost]
BigFloatNewFromParts = 3000
BigFloatAdd = 7000
BigFloatSub = 7000
BigFloatMul = 7000
BigFloatDiv = 7000
BigFloatTruncate = 5000
BigFloatNeg = 5000
BigFloatClone = 5000
BigFloatCmp = 4000
BigFloatAbs = 5000
BigFloatSqrt = 7000
BigFloatPow = 10000
BigFloatFloor = 5000
BigFloatCeil = 5000
BigFloatIsInt = 3000
BigFloatSetBigInt = 3000
BigFloatSetInt64 = 1000
BigFloatGetConst = 1000

[WASMOpcodeCost]
Unreachable = 1
Expand Down
Loading

0 comments on commit f4267e1

Please sign in to comment.