diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-18 13:12:16 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 6795fe7ac5b8dedf3d1ce7fdfb7f5113d60f0421 (patch) | |
tree | 25ec550517d0e65e67596238ba9dfe84266642e7 /params | |
parent | cf3c29bd89848492440a0010f6aa6ee79f3f149c (diff) | |
download | dexon-6795fe7ac5b8dedf3d1ce7fdfb7f5113d60f0421.tar.gz dexon-6795fe7ac5b8dedf3d1ce7fdfb7f5113d60f0421.tar.zst dexon-6795fe7ac5b8dedf3d1ce7fdfb7f5113d60f0421.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.go | 1 |
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. |