diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-18 13:12:16 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:49:53 +0800 |
commit | f8969c0635452e2610995ffef8f7417d7051c43e (patch) | |
tree | e5c929c58fd8435fd8404ac22e11450ae17b821d /params | |
parent | 96cbe2f0f1cbfb44649178b32fba8bd4d0859747 (diff) | |
download | dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.gz dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.bz2 dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.lz dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.xz dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.zst dexon-f8969c0635452e2610995ffef8f7417d7051c43e.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. |