feat(transforms): impl. cluster shuffle transform#143
Open
g4titanx wants to merge 11 commits into
Open
Conversation
Contributor
Decompile Diff AnalysisStatistics (50 iterations)
Full Diff Output─── Storage ───
@@ -1,16 +1,21 @@
- uint256 public constant tokenContract = 0;
- uint256 public constant expectedAmount = 0;
- uint256 public constant unresolved_3d2691bc = 256;
- uint256 public constant unresolved_8677ab23 = 0;
+ bytes32 store_c;
+ uint256 public unresolved_b291a2b2;
+ bytes32 store_o;
+ bytes32 store_m;
+ bytes32 store_p;
+ bytes32 store_j;
+ bytes32 store_k;
+ bytes32 store_a;
+ uint256 public unresolved_59517c37;
+ bytes32 store_b;
+ bytes32 store_e;
+ uint256 public unresolved_b5e6c0b5;
+ bool public unresolved_fd06a29b;
+ bytes32 store_l;
+ uint256 public unresolved_4bbb8e50;
+ bytes32 store_q;
+ bytes32 store_r;
+ bytes32 store_d;
- uint256 public unresolved_8bd03d0a;
- uint256 public executionDeadline;
- uint256 public bondAmount;
- bool public unresolved_308657d7;
- uint256 public totalBondsDeposited;
- uint256 public unresolved_d415b3f9;
- uint256 public currentRewardAmount;
- address public unresolved_1aa7c0ec;
-
- error InvalidRLPList();
+ error CustomError_00000000();
─── Function Unresolved_ede7f6a3 (0xede7f6a3 → 0xbde4f648) ───
@@ -1,77 +1,80 @@
- /// @custom:selector 0xede7f6a3
- /// @custom:signature Unresolved_ede7f6a3(uint256 arg0, uint256 arg1) public view
+
+ /// @custom:selector 0xbde4f648
+ /// @custom:signature Unresolved_bde4f648(uint256 arg0, uint256 arg1) public view
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["uint256", "bytes32", "int256"]
- function Unresolved_ede7f6a3(uint256 arg0, uint256 arg1) public view {
+ function Unresolved_bde4f648(uint256 arg0, uint256 arg1) public view {
+ require(0xf6 == msg.data[0]);
+ require(0 == 0x01);
require(msg.value);
require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x40);
require(arg0 > 0xffffffffffffffff);
require(((msg.data.length - arg0) + 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc) < 0xa0);
require(arg0 + (arg0) > 0xffffffffffffffff);
- require(!(bytes1(unresolved_308657d7 >> 0x08)), CustomError_ded7c80c());
- require(msg.sender == (address(unresolved_1aa7c0ec)), CustomError_ded7c80c());
- require(!(msg.sender == (address(unresolved_1aa7c0ec))), CustomError_ded7c80c());
+ require(!(bytes1(unresolved_fd06a29b >> 0x08)), CustomError_ded7c80c());
+ require(msg.sender == (address(store_a)), CustomError_ded7c80c());
+ require(!(msg.sender == (address(store_a))), CustomError_ded7c80c());
var_a = 0xded7c80c00000000000000000000000000000000000000000000000000000000;
- require(arg1 > block.number, CustomError_58968cf0());
- var_a = 0x58968cf000000000000000000000000000000000000000000000000000000000;
- require((block.number - arg1) > block.number, CustomError_c42a0185());
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ require(arg1 > block.number, CustomError_a7697310());
+ var_a = 0xa769731000000000000000000000000000000000000000000000000000000000;
+ require((block.number - arg1) > block.number, CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_b = 0x11;
require((block.number - arg1) > 0x0100, CustomError_c42a0185());
var_a = 0xc42a018500000000000000000000000000000000000000000000000000000000;
- require(!blockhash(arg1), CustomError_31aed5c2());
- require(arg0 + (arg0) > 0xffffffffffffffff, CustomError_31aed5c2());
+ require(!blockhash(arg1), CustomError_c2e45df7());
+ require(arg0 + (arg0) > 0xffffffffffffffff, CustomError_c2e45df7());
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x41;
- require(((var_c + (uint248((0x20 + (0x1f + (arg0 + (arg0)))) + 0x1f))) > 0xffffffffffffffff) | ((var_c + (uint248((0x20 + (0x1f + (arg0 + (arg0)))) + 0x1f))) < var_c), CustomError_31aed5c2());
+ require(((var_c + (uint248((0x20 + (0x1f + (arg0 + (arg0)))) + 0x1f))) > 0xffffffffffffffff) | ((var_c + (uint248((0x20 + (0x1f + (arg0 + (arg0)))) + 0x1f))) < var_c), CustomError_c2e45df7());
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x41;
uint256 var_c = var_c + (uint248((0x20 + (0x1f + (arg0 + (arg0)))) + 0x1f));
uint256 var_d = (arg0 + (arg0));
var_e = msg.data[36:36];
uint256 var_f = 0;
- require(keccak256(var_e) - blockhash(arg1), CustomError_31aed5c2());
- require(!(arg0 + (arg0)), CustomError_31aed5c2());
- require(bytes1(0x20 + (arg0 + (arg0))) < 0xc000000000000000000000000000000000000000000000000000000000000000, CustomError_31aed5c2());
- require(!(arg0 + (arg0)), CustomError_31aed5c2());
- require(bytes1(0x20 + (arg0 + (arg0))) < 0xf800000000000000000000000000000000000000000000000000000000000000, CustomError_31aed5c2());
- require(!(0 < (arg0 + (arg0))), CustomError_31aed5c2());
- require((bytes1(((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09) > 0xff, CustomError_31aed5c2());
- require((0x01 + (bytes1((((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09))) > 0xff, CustomError_31aed5c2());
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ require(keccak256(var_e) - blockhash(arg1), CustomError_c2e45df7());
+ require(!(arg0 + (arg0)), CustomError_c2e45df7());
+ require(bytes1(0x20 + (arg0 + (arg0))) < 0xc000000000000000000000000000000000000000000000000000000000000000, CustomError_c2e45df7());
+ require(!(arg0 + (arg0)), CustomError_c2e45df7());
+ require(bytes1(0x20 + (arg0 + (arg0))) < 0xf800000000000000000000000000000000000000000000000000000000000000, CustomError_c2e45df7());
+ require(!(0 < (arg0 + (arg0))), CustomError_c2e45df7());
+ require((bytes1(((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09) > 0xff, CustomError_c2e45df7());
+ require((0x01 + (bytes1((((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09))) > 0xff, CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_b = 0x11;
- require(0 > (0 + (bytes1(0x01 + ((((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09)))), CustomError_31aed5c2());
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ require(0 > (0 + (bytes1(0x01 + ((((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09)))), CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_b = 0x11;
require(!(block.chainid == 0xa5bd), CustomError_31aed5c2());
require(block.chainid == 0xa5bd, CustomError_31aed5c2());
require(0 < 0x03, CustomError_31aed5c2());
require(!((0 + (bytes1(0x01 + ((((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09)))) < (arg0 + (arg0))), CustomError_31aed5c2());
require(!((0 + (bytes1(0x01 + ((((0x20 + (arg0 + (arg0))) + 0) >> 0xf8) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09)))) < (arg0 + (arg0))), CustomError_31aed5c2());
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x32;
var_a = 0x31aed5c200000000000000000000000000000000000000000000000000000000;
if (0 < 0x08) {
}
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_b = 0x11;
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x32;
if (!block.chainid == 0xa5bd) {
if (block.chainid == 0xa5bd) {
- require(!(block.chainid == 0xa5bd), CustomError_c0098bd9());
+ require(!(block.chainid == 0xa5bd), CustomError_cd7de59b());
}
- require(block.chainid == 0xa5bd, CustomError_c0098bd9());
+ require(block.chainid == 0xa5bd, CustomError_cd7de59b());
}
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x32;
- var_a = 0xc0098bd900000000000000000000000000000000000000000000000000000000;
+ var_a = 0xcd7de59b00000000000000000000000000000000000000000000000000000000;
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x32;
var_a = 0xff28378700000000000000000000000000000000000000000000000000000000;
- var_a = 0xbfc9f0d300000000000000000000000000000000000000000000000000000000;
- require(executionDeadline, CustomError_ded7c80c());
- require(!(!block.timestamp > executionDeadline), CustomError_ded7c80c());
+ var_a = 0x40360f2d00000000000000000000000000000000000000000000000000000000;
+ require(unresolved_59517c37, CustomError_ded7c80c());
+ require(!(!block.timestamp > unresolved_59517c37), CustomError_ded7c80c());
var_a = 0xded7c80c00000000000000000000000000000000000000000000000000000000;
- var_a = 0xd5ef09ba00000000000000000000000000000000000000000000000000000000;
+ var_a = 0x2a10f64600000000000000000000000000000000000000000000000000000000;
}
─── Function bond (0x9940686e → 0xe28d6888) ───
@@ -1,54 +1,56 @@
- /// @custom:selector 0x9940686e
- /// @custom:signature bond(uint256 arg0) public payable
+ /// @custom:selector 0xe28d6888
+ /// @custom:signature Unresolved_e28d6888(uint256 arg0) public payable
/// @param arg0 ["uint256", "bytes32", "int256"]
- function bond(uint256 arg0) public payable {
+ function Unresolved_e28d6888(uint256 arg0) public payable {
+ require(0x68 == msg.data[0]);
+ require(0 == 0x01);
require(msg.value);
- require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x20, CustomError_253ef1d2());
- require(executionDeadline, CustomError_253ef1d2());
- require(block.timestamp > executionDeadline, CustomError_253ef1d2());
- require(!(bytes1(unresolved_308657d7 >> 0x08)), CustomError_253ef1d2());
- require(bytes1(unresolved_308657d7), CustomError_253ef1d2());
- require(executionDeadline, CustomError_253ef1d2());
- require(!(block.timestamp > executionDeadline), CustomError_253ef1d2());
- var_a = 0x253ef1d200000000000000000000000000000000000000000000000000000000;
- require((currentRewardAmount >> 0x01) > arg0, CustomError_e92c469f());
- var_a = 0xe92c469f00000000000000000000000000000000000000000000000000000000;
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x20, CustomError_24793289());
+ require(unresolved_59517c37, CustomError_24793289());
+ require(block.timestamp > unresolved_59517c37, CustomError_24793289());
+ require(!(bytes1(unresolved_fd06a29b >> 0x08)), CustomError_24793289());
+ require(bytes1(unresolved_fd06a29b), CustomError_24793289());
+ var_a = 0x2479328900000000000000000000000000000000000000000000000000000000;
+ require(unresolved_59517c37, CustomError_dac10e2e());
+ require(!(block.timestamp > unresolved_59517c37), CustomError_dac10e2e());
+ var_a = 0xdac10e2e00000000000000000000000000000000000000000000000000000000;
+ require((unresolved_b5e6c0b5 >> 0x01) > arg0, CustomError_16d3b961());
+ var_a = 0x16d3b96100000000000000000000000000000000000000000000000000000000;
var_b = 0x23b872dd00000000000000000000000000000000000000000000000000000000;
address var_c = msg.sender;
address var_d = address(this);
uint256 var_e = arg0;
(bool success, bytes memory ret0) = address(0).Unresolved_23b872dd(var_c); // call
- require(!0, CustomError_045c4b02());
- unresolved_1aa7c0ec = (uint96(unresolved_1aa7c0ec)) | msg.sender;
- require(block.timestamp > (block.timestamp + 0x012c), CustomError_045c4b02());
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ require(!0, CustomError_c2e45df7());
+ store_a = (uint96(store_a)) | msg.sender;
+ require(block.timestamp > (block.timestamp + 0x012c), CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_f = 0x11;
- executionDeadline = block.timestamp + 0x012c;
- bondAmount = arg0;
- var_a = 0x045c4b0200000000000000000000000000000000000000000000000000000000;
+ unresolved_59517c37 = block.timestamp + 0x012c;
+ store_j = arg0;
+ var_a = 0xfba3b4fe00000000000000000000000000000000000000000000000000000000;
require(0x20 > ret0.length);
require(((var_g + 0x20) > 0xffffffffffffffff) | ((var_g + 0x20) < var_g));
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_f = 0x41;
uint256 var_g = var_g + 0x20;
require(((var_g + 0x20) - var_g) < 0x20);
- require(var_g.length - var_g.length, CustomError_045c4b02());
- require(!var_g.length, CustomError_045c4b02());
- var_a = 0x045c4b0200000000000000000000000000000000000000000000000000000000;
- var_a = 0x2479328900000000000000000000000000000000000000000000000000000000;
- var_a = 0xd5ef09ba00000000000000000000000000000000000000000000000000000000;
- require(currentRewardAmount > (currentRewardAmount + bondAmount), CustomError_9cbc1de1());
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ require(var_g.length - var_g.length, CustomError_fba3b4fe());
+ require(!var_g.length, CustomError_fba3b4fe());
+ var_a = 0xfba3b4fe00000000000000000000000000000000000000000000000000000000;
+ var_a = 0x2a10f64600000000000000000000000000000000000000000000000000000000;
+ require(unresolved_b5e6c0b5 > (unresolved_b5e6c0b5 + store_j), CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_f = 0x11;
- currentRewardAmount = currentRewardAmount + bondAmount;
- require(totalBondsDeposited > (totalBondsDeposited + bondAmount), CustomError_9cbc1de1());
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ unresolved_b5e6c0b5 = unresolved_b5e6c0b5 + store_j;
+ require(store_d > (store_d + store_j), CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_f = 0x11;
- totalBondsDeposited = totalBondsDeposited + bondAmount;
- require(executionDeadline, CustomError_9cbc1de1());
- require(!(block.timestamp > executionDeadline), CustomError_9cbc1de1());
+ store_d = store_d + store_j;
+ require(unresolved_59517c37, CustomError_9cbc1de1());
+ require(!(block.timestamp > unresolved_59517c37), CustomError_9cbc1de1());
var_a = 0x9cbc1de100000000000000000000000000000000000000000000000000000000;
- if (executionDeadline) {
+ if (unresolved_59517c37) {
}
}
─── Function resume (0x046f7da2 → 0xcde1ca8d) ───
@@ -1,10 +1,19 @@
- /// @custom:selector 0x046f7da2
- /// @custom:signature resume() public payable
- function resume() public payable {
+ /// @custom:selector 0xcde1ca8d
+ /// @custom:signature Unresolved_cde1ca8d(uint256 arg0) public payable returns (address)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_cde1ca8d(uint256 arg0) public payable returns (address) {
+ require(!store_l);
+ require(0 == 0x01);
+ require(0xc0 == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ address var_a = address(store_a);
+ return address(store_a);
require(msg.value);
require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
require(msg.sender - 0, CustomError_618bbdd5());
- var_a = 0x618bbdd500000000000000000000000000000000000000000000000000000000;
- unresolved_308657d7 = uint248(unresolved_308657d7);
+ var_b = 0x618bbdd500000000000000000000000000000000000000000000000000000000;
+ unresolved_fd06a29b = uint248(unresolved_fd06a29b);
}
─── Function requestCancellation (0x81972d00 → 0xaa30608a) ───
@@ -1,10 +1,12 @@
- /// @custom:selector 0x81972d00
- /// @custom:signature requestCancellation() public payable
- function requestCancellation() public payable {
+ /// @custom:selector 0xaa30608a
+ /// @custom:signature Unresolved_aa30608a() public payable
+ function Unresolved_aa30608a() public payable {
+ require(!store_p);
+ require(0 == 0x01);
require(msg.value);
require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
require(msg.sender - 0, CustomError_618bbdd5());
var_a = 0x618bbdd500000000000000000000000000000000000000000000000000000000;
- unresolved_308657d7 = 0x01 | (uint248(unresolved_308657d7));
+ unresolved_fd06a29b = 0x01 | (uint248(unresolved_fd06a29b));
}
─── Function withdraw (0x3ccfd60b → 0x0d9cd6b4) ───
@@ -1,40 +1,49 @@
- /// @custom:selector 0x3ccfd60b
- /// @custom:signature withdraw() public payable
- function withdraw() public payable {
+ /// @custom:selector 0x0d9cd6b4
+ /// @custom:signature Unresolved_0d9cd6b4(uint256 arg0) public payable returns (uint256)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_0d9cd6b4(uint256 arg0) public payable returns (uint256) {
+ require(0xd6 == msg.data[0]);
+ require(0 == 0x01);
+ require(!store_c);
+ require(0 == 0x01);
require(msg.value);
require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
- require(!(bytes1(unresolved_308657d7 >> 0x08)), CustomError_618bbdd5());
+ var_a = 0x0100;
+ return 0x0100;
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ require(!(bytes1(unresolved_fd06a29b >> 0x08)), CustomError_618bbdd5());
require(msg.sender - 0, CustomError_618bbdd5());
- var_a = 0x618bbdd500000000000000000000000000000000000000000000000000000000;
- require(executionDeadline, CustomError_9cbc1de1());
- require(!(block.timestamp > executionDeadline), CustomError_9cbc1de1());
- var_a = 0x9cbc1de100000000000000000000000000000000000000000000000000000000;
- unresolved_1aa7c0ec = uint96(unresolved_1aa7c0ec);
- bondAmount = 0;
- executionDeadline = 0;
- require(unresolved_8bd03d0a > (unresolved_8bd03d0a + unresolved_d415b3f9));
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
- var_b = 0x11;
- unresolved_308657d7 = uint248(unresolved_308657d7);
- unresolved_8bd03d0a = 0;
- currentRewardAmount = 0;
- require(!unresolved_8bd03d0a + unresolved_d415b3f9);
- var_c = 0xa9059cbb00000000000000000000000000000000000000000000000000000000;
+ var_b = 0x618bbdd500000000000000000000000000000000000000000000000000000000;
+ require(unresolved_59517c37, CustomError_9cbc1de1());
+ require(!(block.timestamp > unresolved_59517c37), CustomError_9cbc1de1());
+ var_b = 0x9cbc1de100000000000000000000000000000000000000000000000000000000;
+ store_a = uint96(store_a);
+ store_j = 0;
+ unresolved_59517c37 = 0;
+ require(unresolved_b291a2b2 > (unresolved_b291a2b2 + unresolved_4bbb8e50), CustomError_c2e45df7());
+ var_b = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
+ var_c = 0x11;
+ unresolved_fd06a29b = uint248(unresolved_fd06a29b);
+ unresolved_b291a2b2 = 0;
+ unresolved_b5e6c0b5 = 0;
+ require(!unresolved_b291a2b2 + unresolved_4bbb8e50);
+ var_a = 0xa9059cbb00000000000000000000000000000000000000000000000000000000;
address var_d = msg.sender;
- uint256 var_e = unresolved_8bd03d0a + unresolved_d415b3f9;
+ uint256 var_e = unresolved_b291a2b2 + unresolved_4bbb8e50;
(bool success, bytes memory ret0) = address(0).Unresolved_a9059cbb(var_d); // call
- require(!0, CustomError_045c4b02());
- var_a = 0x045c4b0200000000000000000000000000000000000000000000000000000000;
+ require(!0, CustomError_fba3b4fe());
+ var_b = 0xfba3b4fe00000000000000000000000000000000000000000000000000000000;
require(0x20 > ret0.length);
require(((var_f + 0x20) > 0xffffffffffffffff) | ((var_f + 0x20) < var_f));
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
- var_b = 0x41;
+ var_b = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ var_c = 0x41;
uint256 var_f = var_f + 0x20;
require(((var_f + 0x20) - var_f) < 0x20);
- require(var_f.length - var_f.length, CustomError_045c4b02());
- require(!var_f.length, CustomError_045c4b02());
- var_a = 0x045c4b0200000000000000000000000000000000000000000000000000000000;
- var_a = 0x53cd7f7900000000000000000000000000000000000000000000000000000000;
- var_a = 0xd5ef09ba00000000000000000000000000000000000000000000000000000000;
+ require(var_f.length - var_f.length, CustomError_fba3b4fe());
+ require(!var_f.length, CustomError_fba3b4fe());
+ var_b = 0xfba3b4fe00000000000000000000000000000000000000000000000000000000;
+ var_b = 0x53cd7f7900000000000000000000000000000000000000000000000000000000;
+ var_b = 0x2a10f64600000000000000000000000000000000000000000000000000000000;
}
─── Function fund (0xa65e2cfd → 0x4c6b607e) ───
@@ -1,41 +1,43 @@
- /// @custom:selector 0xa65e2cfd
- /// @custom:signature fund(uint256 arg0, uint256 arg1) public payable
+ /// @custom:selector 0x4c6b607e
+ /// @custom:signature Unresolved_4c6b607e(uint256 arg0, uint256 arg1) public payable
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["uint256", "bytes32", "int256"]
- function fund(uint256 arg0, uint256 arg1) public payable {
+ function Unresolved_4c6b607e(uint256 arg0, uint256 arg1) public payable {
+ require(!store_o);
+ require(0 == 0x01);
require(msg.value);
require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x40, CustomError_618bbdd5());
require(msg.sender - 0, CustomError_618bbdd5());
var_a = 0x618bbdd500000000000000000000000000000000000000000000000000000000;
- require(bytes1(unresolved_308657d7 >> 0x08), CustomError_5adf6387());
- var_a = 0x5adf638700000000000000000000000000000000000000000000000000000000;
- require(!arg0);
- require(!arg1);
- currentRewardAmount = arg0;
- unresolved_d415b3f9 = arg0;
- unresolved_8bd03d0a = arg1;
- require(unresolved_d415b3f9 > (unresolved_d415b3f9 + unresolved_8bd03d0a));
- var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
+ require(bytes1(unresolved_fd06a29b >> 0x08), CustomError_a5209c79());
+ var_a = 0xa5209c7900000000000000000000000000000000000000000000000000000000;
+ require(!arg0, CustomError_c2e45df7());
+ require(!arg1, CustomError_c2e45df7());
+ unresolved_b5e6c0b5 = arg0;
+ unresolved_4bbb8e50 = arg0;
+ unresolved_b291a2b2 = arg1;
+ require(unresolved_4bbb8e50 > (unresolved_4bbb8e50 + unresolved_b291a2b2), CustomError_c2e45df7());
+ var_a = 0xc2e45df700000000000000000000000000000000000000000000000000000000;
var_b = 0x11;
var_c = 0x23b872dd00000000000000000000000000000000000000000000000000000000;
address var_d = msg.sender;
address var_e = address(this);
- uint256 var_f = unresolved_d415b3f9 + unresolved_8bd03d0a;
+ uint256 var_f = unresolved_4bbb8e50 + unresolved_b291a2b2;
(bool success, bytes memory ret0) = address(0).Unresolved_23b872dd(var_d); // call
- require(!0, CustomError_045c4b02());
- unresolved_308657d7 = (uint248(unresolved_308657d7)) | 0x0100;
- var_a = 0x045c4b0200000000000000000000000000000000000000000000000000000000;
+ require(!0, CustomError_fba3b4fe());
+ unresolved_fd06a29b = (uint248(unresolved_fd06a29b)) | 0x0100;
+ var_a = 0xfba3b4fe00000000000000000000000000000000000000000000000000000000;
require(0x20 > ret0.length);
require(((var_g + 0x20) > 0xffffffffffffffff) | ((var_g + 0x20) < var_g));
var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
var_b = 0x41;
uint256 var_g = var_g + 0x20;
require(((var_g + 0x20) - var_g) < 0x20);
- require(var_g.length - var_g.length, CustomError_045c4b02());
- require(!var_g.length, CustomError_045c4b02());
- var_a = 0x045c4b0200000000000000000000000000000000000000000000000000000000;
- unresolved_308657d7 = (uint248(unresolved_308657d7)) | 0x0100;
- var_a = 0x932ca0a300000000000000000000000000000000000000000000000000000000;
+ require(var_g.length - var_g.length, CustomError_fba3b4fe());
+ require(!var_g.length, CustomError_fba3b4fe());
+ var_a = 0xfba3b4fe00000000000000000000000000000000000000000000000000000000;
+ unresolved_fd06a29b = (uint248(unresolved_fd06a29b)) | 0x0100;
+ var_a = 0xd205516500000000000000000000000000000000000000000000000000000000;
var_a = 0xea1083a700000000000000000000000000000000000000000000000000000000;
}
─── Added: Unresolved_55558c9c (0x55558c9c) ───
@@ -1,0 +1,12 @@
+
+ /// @custom:selector 0x55558c9c
+ /// @custom:signature Unresolved_55558c9c(uint256 arg0) public pure returns (uint256)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_55558c9c(uint256 arg0) public pure returns (uint256) {
+ require(0x55 == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ uint256 var_a = 0;
+ return 0;
+ }
─── Added: Unresolved_e2d723ad (0xe2d723ad) ───
@@ -1,0 +1,12 @@
+
+ /// @custom:selector 0xe2d723ad
+ /// @custom:signature Unresolved_e2d723ad(uint256 arg0) public view returns (uint256)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_e2d723ad(uint256 arg0) public view returns (uint256) {
+ require(0x23 == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ var_a = store_j;
+ return store_j;
+ }
─── Added: Unresolved_cb071ec3 (0xcb071ec3) ───
@@ -1,0 +1,16 @@
+
+ /// @custom:selector 0xcb071ec3
+ /// @custom:signature Unresolved_cb071ec3(uint256 arg0) public view returns (bool)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_cb071ec3(uint256 arg0) public view returns (bool) {
+ require(0xcb == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ if (unresolved_59517c37) {
+ uint256 var_a = !(block.timestamp > unresolved_59517c37);
+ return !(block.timestamp > unresolved_59517c37);
+ var_a = unresolved_59517c37;
+ return unresolved_59517c37;
+ }
+ }
─── Added: Unresolved_86b38a5a (0x86b38a5a) ───
@@ -1,0 +1,12 @@
+
+ /// @custom:selector 0x86b38a5a
+ /// @custom:signature Unresolved_86b38a5a(uint256 arg0) public pure returns (uint256)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_86b38a5a(uint256 arg0) public pure returns (uint256) {
+ require(0x86 == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ uint256 var_a = 0;
+ return 0;
+ }
─── Added: Unresolved_eb1d289b (0xeb1d289b) ───
@@ -1,0 +1,11 @@
+
+ /// @custom:selector 0xeb1d289b
+ /// @custom:signature Unresolved_eb1d289b() public view returns (uint256)
+ function Unresolved_eb1d289b() public view returns (uint256) {
+ require(!store_c);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ var_a = 0x0100;
+ return 0x0100;
+ }
─── Added: Unresolved_c88c27f3 (0xc88c27f3) ───
@@ -1,0 +1,11 @@
+
+ /// @custom:selector 0xc88c27f3
+ /// @custom:signature Unresolved_c88c27f3() public view returns (uint256)
+ function Unresolved_c88c27f3() public view returns (uint256) {
+ require(!store_b);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ uint256 var_a = 0;
+ return 0;
+ }
─── Added: Unresolved_30c127ba (0x30c127ba) ───
@@ -1,0 +1,12 @@
+
+ /// @custom:selector 0x30c127ba
+ /// @custom:signature Unresolved_30c127ba(uint256 arg0) public view returns (bool)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_30c127ba(uint256 arg0) public view returns (bool) {
+ require(0x30 == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ bytes1 var_a = !(!bytes1(unresolved_fd06a29b));
+ return !(!bytes1(unresolved_fd06a29b));
+ }
─── Added: Unresolved_fed394e5 (0xfed394e5) ───
@@ -1,0 +1,12 @@
+
+ /// @custom:selector 0xfed394e5
+ /// @custom:signature Unresolved_fed394e5(uint256 arg0) public view returns (uint256)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_fed394e5(uint256 arg0) public view returns (uint256) {
+ require(0xfe == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ var_a = store_d;
+ return store_d;
+ }
─── Added: Unresolved_8501c0db (0x8501c0db) ───
@@ -1,0 +1,11 @@
+ /// @custom:selector 0x8501c0db
+ /// @custom:signature Unresolved_8501c0db(uint256 arg0) public view returns (address)
+ /// @param arg0 ["uint256", "bytes32", "int256"]
+ function Unresolved_8501c0db(uint256 arg0) public view returns (address) {
+ require(0xc0 == msg.data[0]);
+ require(0 == 0x01);
+ require(msg.value);
+ require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0);
+ address var_a = address(store_a);
+ return address(store_a);
+ }
Commit e3248ce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClusterShuffle — design, implementation, and fixes
Azoth's pipeline has four transforms that add bytes to the runtime:
ArithmeticChainPushSplitPUSHliteral into two smaller PUSHes combined by an ADD.SlotShuffleStringObfuscateEach of these raises the effort to read a specific instruction sequence, but they leave the physical block layout intact i.e the dispatcher still sits at the start, function bodies follow it in compiler-emitted order, helper functions cluster near their callers. A reverse engineer running sees the same top-to-bottom structure the compiler emitted.
ClusterShuffleis a fifth transform that breaks that structural regularity. It doesn't change any instruction semantics; it just reorders basic blocks so the disassembly no longer reads in source order. The value shows up when it's combined with the other passes:solctie each PC to afile:line:colrange. Tools that consume those (Etherscan's decompiled view, Remix's debugger, Tenderly's trace UI, Slither's offset-indexed analyses) rely on the PC-ordering matching the compiler's output. `ClusterShuffle invalidates every PC in the sourcemap simultaneously.0x0010..0x00e0", "function bodies start after the first JUMP" — break, because the dispatcher-backed clusters are frozen but every other runtime cluster can now appear anywhere.ClusterShuffle alone doesn't fool a CFG-based decompiler (heimdall, panoramix, Dedaub walk edges from the entry point, and ClusterShuffle preserves every edge). Its role is to remove the positional shortcuts that would let an
analyst skip past the other transforms.
1. The "cluster" concept
Cluster-level shuffling is necessary because you can't shuffle individual basic blocks in EVM bytecode. Some blocks are physically married to their successor:
Fallthrough: the block ends without a JUMP. Execution continues at thevery next PC. If you move the block, the code that used to follow it
suddenly isn't there.
Branch: the block ends in aJUMPIwhose true target is an explicitPUSH-loaded address, but whose false target is the next sequential
block. Move either and the branch silently goes to the wrong place.
So before shuffling anything, ClusterShuffle builds an equivalence relation that groups every block with its mandatory successors:
A cluster is a maximal run of blocks, in current
start_pcorder, where every non-final block in the run ends inFallthroughorBranch. "Maximal" means the run is grown until it cannot be extended: we keep absorbing the next block for as long as the current cluster's tail ends inFallthroughorBranch, and we stop only when the tail ends inJump,Terminal, orUnknown— i.e. the first block whose successor-in-memory is irrelevant to execution.2. The shuffle algorithm
Why freeze the entry cluster?
The EVM's deployed runtime begins executing at runtime-relative PC 0. That's whatever block lands at slot 0 in the final layout. If the entry cluster
drifted off slot 0, the EVM would start executing at the wrong block – Azoth's obufscated contracts becomes fingerprintable. The entry is pinned by inserting the smallest-pc block into
pinned_nodesalongside the dispatcher blocks.The bug
The first version of this code set
base = cluster_idx * CLUSTER_GAP, i.e. cluster 0 at PC 0, cluster 1 at 1_000_000, etc. I ran the test and it produced435 invalid jump targetsdetected by the validator.The cause was subtle.
reindex_pcsclassifies each block as runtime or init via:Escrow's runtime bounds are
(637, 9686). After ClusterShuffle, cluster 0's blocks hadstart_pcvalues of0, 1, 2, ...— belowruntime_bounds.0 = 637— sois_runtimereturnedfalsefor every shuffled runtime block.reindex_pcs'sruntime_first_new_pctherefore stayedNone, andruntime_boundsgot wiped toNonevia the warn fallback:With
runtime_bounds = None, every downstream pass that encodes PUSH immediates as runtime-relative (subtractruntime_startto recover the old. PC) switched to absolute interpretation. Thepc_mapping.get(&old_pc)lookups missed because the computed old_pc was wrong. 435 directPUSH; JUMPpatterns ended up pointing to addresses that weren't JUMPDESTs.The fix
After the fix, every shuffled block satisfies
start_pc ∈ runtime_boundsduring reindex.is_runtimereturnstrueas expected, reindex recomputes fresh contiguous bounds correctly, and downstream passes operate on the right base.This was mis-diagnosed earlier as a
push_reaches_jumpfalse-negative issue inremap_orphan_jump_pushes. The 435 failing jumps were all directPUSH; JUMPpatterns, which never go through the orphan remap narrowing path.3. Dispatcher coexistence: pre-sizing stub/decoy/controller PUSHes
The second blocker was that cluster-shuffle could move a dispatcher stub's decoy target past the stored push width's capacity.
When
FunctionDispatcherlays out a tier, it emits a stub block whose JUMPDEST-ending structure is:The layout code used to choose
push_width = minimal_push_width(target_rel)— the narrowest PUSH that fit the current target relative. If a decoy's target was at runtime-relative 0x80, the stub storedpush_width=1. Step 5'sreapply_stub_patcheslater rewrites this PUSH with the remapped target PC:If ClusterShuffle had moved the decoy to runtime-relative
0x5f8, thiformats as"5f8"— three hex chars instead of the two thatpush_width=1implies. The encoder'sfrom_hexrejects this withOddLength.The fix
safe_runtime_push_widthinlayout.rs:Every stub / decoy / controller / invalid-sink PUSH emitted by the dispatcher now uses this width instead of the current target's minimal width. The
.max(0xffff)floor forces PUSH2 for every realistic contract.The byte-extraction controller pattern used to pick its match/fallback widths via an iterative sizing loop. With a uniform width chosen up front, the block size is deterministic:
4. Here's what it looks like
Running
cargo nextest run cluster_shuffle_relocates_clusters --no-captureon the escrow runtime:The value of the
ClusterShuffleis to serve as a multiplier on the other transforms.