@@ -24,17 +24,6 @@ contract PreimageOracle is IPreimageOracle {
24
24
dat_ = preimageParts[_key][_offset];
25
25
}
26
26
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
-
38
27
// temporary method for localization. Will be removed to PreimageKeyLib.sol
39
28
function localize (bytes32 _key , bytes32 _localContext ) internal view returns (bytes32 localizedKey_ ) {
40
29
assembly {
@@ -51,19 +40,6 @@ contract PreimageOracle is IPreimageOracle {
51
40
}
52
41
}
53
42
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
-
67
43
function loadLocalData (uint256 _ident , bytes32 _localContext , bytes32 _word , uint256 _size , uint256 _partOffset )
68
44
external
69
45
returns (bytes32 key_ )
0 commit comments