Skip to content

Commit

Permalink
fix: change depth according to deneb (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrun5 authored Mar 25, 2024
1 parent 68a6549 commit dac584d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/contracts/proxies/SpectreProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "@openzeppelin/contracts/access/AccessControl.sol";
contract SpectreProxy is AccessControl {

uint8 public constant STATE_ROOT_INDEX = 34;
uint8 public constant STATE_ROOT_DEPTH = 4;
uint8 public constant STATE_ROOT_DEPTH = 5;

// source domainID => slot => state root
mapping(uint8 => mapping(uint256 => bytes32)) public stateRoots;
Expand Down
16 changes: 9 additions & 7 deletions test/proxies/spectre/spectreProxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ describe("Spectre Proxy", () => {
"0xcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f";

const validStateRoot =
"0x8c0c3244e0ca8c0e5416a3407787c71b29225723e0f887396ce018f8f38f20d5";
"0x19f9a8c688e5ce7411de0bcd2fb5bd48de9b8c9abdaccf99d466b003b548ce25";
const validStateRootProof = [
"0x0c2e45ec77206f3b0cac1da903c4bc05cf177da367c428c1ba3cab0f654f4f78",
"0xdf581c183b1083cf6be31fde9f6073dfacfc252f8b514577f2ca03955b921552",
"0x59dac95a8278295a3a05d809156f69b45007af3f3df94bcabe4bbbdd9cce5c5a",
"0x4dc9cd52dff9694aed19a73da85386b77d641c81bcb7015dbf7daeec5614f010",
"0x6748266472daf69f43b5b84abfafda3b948225b01af141e19289726063fc3c6c",
"0xb11c0644596de5976fc972b6d736b49319811c3fe82979ee0e9832e6f4db243a",
"0xd015bf510ad0aecc6cf5c9bddca152d895372bc8c4dda07a6d18ba68061c6e8f",
"0x9048454d5dd77a07f0ba1895200689f35c4880f8a4450defbcab4fce007df369",
"0xca6b1e1463286d78aa0a439739befea35e495736654f931b4f97cf115ec18170",
];
const invalidStateRoot =
"0xcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f";
Expand All @@ -29,16 +30,17 @@ describe("Spectre Proxy", () => {
"0xdf581c183b1083cf6be31fde9f6073dfacfc252f8b514577f2ca03955b921552",
"0x59dac95a8278295a3a05d809156f69b45007af3f3df94bcabe4bbbdd9cce5c5a",
"0xcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f",
"0x9048454d5dd77a07f0ba1895200689f35c4880f8a4450defbcab4fce007df369",
];

const stepInput: ISpectre.SyncStepInputStruct = {
finalizedHeaderRoot:
"0xcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f",
"0xb87f5209e312fbecbcb6053883eb03f5d67134f391963543883d28480acdc6b1",
finalizedSlot: 100,
attestedSlot: 101,
participation: 8,
executionPayloadRoot:
"0x9109d68183cb2c2b4d8d769a4263195c153ece0d2bc797f44b8f6cec4814439c",
"0x996348a575957d6a4878681a40e014bcb3c102017462e91c6a83f099b210986c",
};

const constructorDomains = [2, 3];
Expand Down

0 comments on commit dac584d

Please sign in to comment.