Skip to content

Commit

Permalink
fix proof params
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schultz committed Dec 27, 2023
1 parent b7ef2b7 commit e7623d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion badList.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"format":"standard-v1","tree":["0x25848b65aede00ffec0b06e883ff20b2010d96bff66fb33f994128cf4c78cbc1","0x49128a401834f23fd22af717548e79c2583695e0a57ad12c2a55a3626efe04d9","0x8aedbbb99621f2187785624f974561ce3ae9e242dba3688ba15a54e78e598ad6","0xd5e4f054036f8fa2dbd47d5b67a1827e5ab031b7f72a75db56b4b52065ce5020","0xaf8144ed290171ca2e0cad7209f3fbdf411fd95f51558971adcfdcb0c7a91e94","0x49c46890c25712bff52fed8e82bf617d9fd19ffea13bcd3b38ddf2870e6f0ad9","0xa88ee9dd12d90d750e8fd3d4b69d904347eb968e3c9ac07aba4d33718e0ddf40","0x606bebfcd627cd8b9096628647546b12e729e2f1d7a1080dd15e27abdba6d3a9","0x99fef1403ea327b68f922415ff8abfd2ae974262a89aef7ce2c4f12c782f120b","0x8b111e51863ab787d2d056f3dae4faf3bdf89406b14ff7f5959b5fd7f1c13f51","0xcb10f8c26e9f8666702320df512444520fab7011dcf2e6f648683a5a8ba77c8d","0xb25aca321477cf82000f263fac30f5b5ee4ed03c4b71460759021932be8cbc54","0xd190b963cc81f18160e45e60bafc2c761d4645612a4de3c6e70553da0f33c12a","0xe7b22412ba272615a32a6c5ed10830afc2d85ed864f055cfee2c1a84b28142f4","0xcc90100726c91d4b545a44f81fe5b2dc887bfa5e611f99680949a74c4d5052a3","0xb674253972c8251412104b3b84ab690e612db8fccd3e6cc6412a589f4fca24fc","0xb050d730564f43a280b743000405215f5be04a742e33073d7c2f236a2b7eb5ff","0xa309e317e76779dc870a45c53abf83edbf027ba8656b55e028a10bd5026e08d8","0x7a5f2e5518852d93a37c5955f7b6d052798c830f03751df0a5324156720487fb","0x76d9bb1247c370d6d9d250aec68f8763414190eaa2521d8c56490c05ada65a29","0x720819e85beb14c5eeffda6b410cff9e04c7415f8686a6114adf4ad043e1ddf4","0x5be3d8ed7b491d378222fd5698443f20c4636e20d960c70ead915d88eb40cbff","0x3916c54a2082cc81e11c7d20beb22f9a966c1fb399dabe69086dcea0a70af5cc","0x367e04de763579f6e1df281c1a665173d63c2fff47357b935a7516db23d9c548","0x27c2bcbfc6f7a44cd2d5cfb6607048a99d8269b100fd590e97c1badc0838daec","0x1a2e8320d23f16ac0c0ff3161c91cb70d0ada5d59693896995221cd3df7122de","0x0722b34488e17d83e1b8a6770fb49ab1d3238c88fb6542cbbe581e3c0117f509"],"values":[{"value":["0x14dC79964da2C08b23698B3D3cc7Ca32193d9955","119096571092301921719253721560231391405901977941"],"treeIndex":20},{"value":["0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f","201990263407130541861732429012178345511141645967"],"treeIndex":17},{"value":["0xa0Ee7A142d267C1f36714E4a8F75612F20a79720","918756735253610709936507276127632253845124912928"],"treeIndex":26},{"value":["0xBcd4042DE499D14e55001CcbB24a551F3b954096","1078018386962683210833080912426859325347918594198"],"treeIndex":19},{"value":["0x71bE63f3384f5fb98995898A86B02Fb2426c5788","649361805570585991432183860154126180479862069128"],"treeIndex":21},{"value":["0xFABB0ac9d68B0B445fB7357272Ff202C5651694a","1431418871862876925181802361878557621142999361866"],"treeIndex":15},{"value":["0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec","164071735471096495022318073447543169725534292460"],"treeIndex":14},{"value":["0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097","1274489751712037608509761039581936044807219343511"],"treeIndex":24},{"value":["0xcd3B766CCDd6AE721141F452C550Ca635964ce71","1171669168259442413243860206195356130559412981361"],"treeIndex":16},{"value":["0x2546BcD3c84621e976D8185a91A922aE77ECEc30","212810159859923545014459052809686498143686683696"],"treeIndex":22},{"value":["0xbDA5747bFD65F08deb54cb465eB87D40e51B197E","1082689025860186422301062612148899595711925655934"],"treeIndex":25},{"value":["0xdD2FD4581271e230360230F9337D5c0430Bf44C0","1262753593150382717471430831644857192119478994112"],"treeIndex":18},{"value":["0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199","765873671610919835980981505307059354946689044889"],"treeIndex":23},{"value":["0x09DB0a93B389bEF724429898f539AEB7ac2Dd55f","56265701518907046320037230111460041352924747103"],"treeIndex":13}],"leafEncoding":["address","uint192"]}
{"format":"standard-v1","tree":["0x1b1fdea6d6a5ee187c3097d3bad61bcd9a27170e4cb6aebb1b24a03e6ad50e69","0x94a013fbf2bc50579e7a03a8aa876ed2653fe1e6d760390da6198a78a7ff5a99","0x3d55e655b268948132c11a40de6c000c4286b1c3bf409e14a8d4e67153f5f23e","0xf3c9e73362f19f1862e5084557b94ed67a049d129f056fb427eb0ba6851128ff","0x5f79db879af91d8a048e0939cbbd392e7992564fa04b5ffff814edeeaeed5e51","0xcc364facb706a7e2b9f4f8c31e68d2aaa1a8ee0cdfca73e1c7933f2fa4050b4e","0xe26c1b79a170caaad55fc0fd199819f5e46aea591ef83df932c638b317f81d40","0xbe7256b8b1584c49d47a9a0267704f22c1582aa2da6964f54a36c4acfd9ecd29","0x462e2414f21c7142c1362f783f76f22c55f7abc23d9f17dfe88b8c677f94cfac","0x656cf1dc90777feed0afa7593b28b5b604c742ced4d13f7bcf8584f0e7d1830d","0x227774b3c57a2f290ef708939678e77b8c0f65c009d32497610b26b021cef146","0x2d27e03c02d8e9f64286fc897e586e3d1685595b27f4a0286f150704932cea2e","0x1ab98fa97241523fdf1f772a633e0107190eda734a4a72574cabc906891b4170","0xf2d8af966361250fc02bba28ca978692434f705725b7b761630173c39ca27fd0","0xf112f7c045fd440dcb057a4bd4be38b3126b47b1659eaf9053d56fc0a51e20bf","0xef5f225309b09c1bcfd94fbdaeaeb34ed15496a9514239fd2b0d1c521bee3a30","0xe2e0f1ced9c27c486eab7fafb37be2ae62ceb3c0e9609f0e41dababe40214ea4","0xaefd3a9fa38f6a6e00be2867e5d5661736fdf1cbb06346466734dad61af7499a","0xabb45fa36a9a98a1b01bbe5a2fe3897acb5d748f2cb46b40147aa2741191c6ac","0xa7b42dd23b5e3fc86ad961c05d69a4ee7eaf5e98158bf6b6ea82b8f4155cdb00","0xa0165f79b9d65c93e44649f5e90dcd3d579f01c6d0a411d7b560b14f5e9ca2ee","0x9e621119d5797394a8ecc07dafe27e8776772a12a4c4c9dd1e600025acbf1be5","0x82da5ad1c7f11d007d4f286cb0a7dc601d14634b879154f0f61f03d1ce4ca0b8","0x6f5229bfb64fd205775623f238dbfc185b433eef86dc91bf672d4932043a9e82","0x6d53293066987d900cdd1d37d4d7956b0d28b4e19538e7a590b34c524ae2d0c3","0x65f5e5ecfb080abe7dafdb614d25e453e6f6ddd10d74d66396535eb833a82f61","0x21beff03bec6f1aeed05639ca75f8350bbb259b79393d3b6c090d00f7c652996"],"values":[{"value":["0x14dC79964da2C08b23698B3D3cc7Ca32193d9955","7"],"treeIndex":17},{"value":["0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f","8"],"treeIndex":19},{"value":["0xa0Ee7A142d267C1f36714E4a8F75612F20a79720","9"],"treeIndex":24},{"value":["0xBcd4042DE499D14e55001CcbB24a551F3b954096","10"],"treeIndex":14},{"value":["0x71bE63f3384f5fb98995898A86B02Fb2426c5788","11"],"treeIndex":16},{"value":["0xFABB0ac9d68B0B445fB7357272Ff202C5651694a","12"],"treeIndex":23},{"value":["0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec","13"],"treeIndex":25},{"value":["0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097","14"],"treeIndex":15},{"value":["0xcd3B766CCDd6AE721141F452C550Ca635964ce71","15"],"treeIndex":18},{"value":["0x2546BcD3c84621e976D8185a91A922aE77ECEc30","16"],"treeIndex":26},{"value":["0xbDA5747bFD65F08deb54cb465eB87D40e51B197E","17"],"treeIndex":22},{"value":["0xdD2FD4581271e230360230F9337D5c0430Bf44C0","18"],"treeIndex":13},{"value":["0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199","19"],"treeIndex":21},{"value":["0x09DB0a93B389bEF724429898f539AEB7ac2Dd55f","20"],"treeIndex":20}],"leafEncoding":["address","uint192"]}
4 changes: 3 additions & 1 deletion contracts/GitcoinIdentityStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ contract GitcoinIdentityStaking is
revert StakeIsLocked();
}

bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(msg.sender))));
bytes32 leaf = keccak256(
bytes.concat(keccak256(abi.encode(msg.sender, stakeId)))
);

console.logBytes32(leaf);
console.logBytes32(slashUserMerkleRoot);
Expand Down
2 changes: 1 addition & 1 deletion test/GitcoinIdentityStakingMerkle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const buildBadListMerkleTree = (
let slashTotal = 0;
const values: [string, string][] = users
.filter((user, i) => !shouldSlash(numUsers, i))
.map((user) => [user.address, BigInt(user.address).toString()]);
.map((user) => [user.address, BigInt(user.stakeId).toString()]);

const merkleTree = StandardMerkleTree.of(values, ["address", "uint192"]);

Expand Down

0 comments on commit e7623d3

Please sign in to comment.