Skip to content

Commit f5200e1

Browse files
committed
Remove cheaters
1 parent 207235d commit f5200e1

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

rvgo/fast/evm.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import "github.com/ethereum/go-ethereum/crypto"
44

55
var (
66
StepBytes4 = crypto.Keccak256([]byte("step(bytes,bytes,bytes32)"))[:4]
7-
CheatBytes4 = crypto.Keccak256([]byte("cheat(uint256,bytes32,bytes32,uint256)"))[:4]
8-
CheatLocalKeyBytes4 = crypto.Keccak256([]byte("cheatLocalKey(uint256,bytes32,bytes32,uint256,bytes32)"))[:4]
97
LoadKeccak256PreimagePartBytes4 = crypto.Keccak256([]byte("loadKeccak256PreimagePart(uint256,bytes)"))[:4]
108
LoadLocalDataBytes4 = crypto.Keccak256([]byte("loadLocalData(uint256,bytes32,bytes32,uint256,uint256)"))[:4]
119
)

rvsol/src/PreimageOracle.sol

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ contract PreimageOracle is IPreimageOracle {
2424
dat_ = preimageParts[_key][_offset];
2525
}
2626

27-
// TODO(CLI-4104):
28-
// we need to mix-in the ID of the dispute for local-type keys to avoid collisions,
29-
// and restrict local pre-image insertion to the dispute-managing contract.
30-
// For now we permit anyone to write any pre-image unchecked, to make testing easy.
31-
// This method is DANGEROUS. And NOT FOR PRODUCTION.
32-
function cheat(uint256 partOffset, bytes32 key, bytes32 part, uint256 size) external {
33-
preimagePartOk[key][partOffset] = true;
34-
preimageParts[key][partOffset] = part;
35-
preimageLengths[key] = size;
36-
}
37-
3827
// temporary method for localization. Will be removed to PreimageKeyLib.sol
3928
function localize(bytes32 _key, bytes32 _localContext) internal view returns (bytes32 localizedKey_) {
4029
assembly {
@@ -51,19 +40,6 @@ contract PreimageOracle is IPreimageOracle {
5140
}
5241
}
5342

54-
// temporary method for localization. Will be removed to PreimageKeyLib.sol
55-
function cheatLocalKey(uint256 partOffset, bytes32 key, bytes32 part, uint256 size, bytes32 localContext)
56-
external
57-
{
58-
// sanity check key is local key using prefix
59-
require(uint8(key[0]) == 1, "must be used for local key");
60-
61-
bytes32 localizedKey = PreimageKeyLib.localize(key, localContext);
62-
preimagePartOk[localizedKey][partOffset] = true;
63-
preimageParts[localizedKey][partOffset] = part;
64-
preimageLengths[localizedKey] = size;
65-
}
66-
6743
function loadLocalData(uint256 _ident, bytes32 _localContext, bytes32 _word, uint256 _size, uint256 _partOffset)
6844
external
6945
returns (bytes32 key_)

0 commit comments

Comments
 (0)