aboutsummaryrefslogtreecommitdiffstats
path: root/params
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-18 13:12:16 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:23:39 +0800
commitdb1d03b5c2a6fbe370526dfaf283638773bab032 (patch)
tree305237d4831233521fe46f5901c34c8baccf9d4d /params
parent12eb896a11eaf15712339ffa7eedf2b7c88fdfdd (diff)
downloadgo-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.tar
go-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.tar.gz
go-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.tar.bz2
go-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.tar.lz
go-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.tar.xz
go-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.tar.zst
go-tangerine-db1d03b5c2a6fbe370526dfaf283638773bab032.zip
core: vm: implement RAND opcode support
DEXON has a built-in on chain random oracle that allow one to retrieve a random variable. Add a new opcode `RAND` to load the random variable onto the stack.
Diffstat (limited to 'params')
-rw-r--r--params/protocol_params.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/params/protocol_params.go b/params/protocol_params.go
index c8b6609af..6b1787922 100644
--- a/params/protocol_params.go
+++ b/params/protocol_params.go
@@ -37,6 +37,7 @@ const (
Sha3Gas uint64 = 30 // Once per SHA3 operation.
Sha3WordGas uint64 = 6 // Once per word of the SHA3 operation's data.
+ RandGas uint64 = 36 // Once per random seed load.
SstoreSetGas uint64 = 20000 // Once per SLOAD operation.
SstoreResetGas uint64 = 5000 // Once per SSTORE operation if the zeroness changes from zero.