Skip to content

fix: relayer fork handling #531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jul 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c3c5280
fix: relayer fork handling
sander2 Mar 11, 2025
8ef5866
Merge remote-tracking branch 'origin/master' into fix/relayer-fork-ha…
gregdhill Jun 9, 2025
6dc4d99
chore: align submodules
gregdhill Jun 9, 2025
4d6a616
chore: fmt
gregdhill Jun 9, 2025
b983940
chore: clippy
gregdhill Jun 10, 2025
0339d1d
feat(relayer): add lib.rs
Nuhvi Jun 10, 2025
f9dcdc3
feat(relayer): make Relayer::new() less dependent on generics
Nuhvi Jun 11, 2025
92064eb
feat(relayer): add get_heaviest_relayed_block_header_regtest
Nuhvi Jun 11, 2025
d45f971
feat(relayer): add deploy_contract helper function
Nuhvi Jun 11, 2025
08d02bb
feat(fullrelay_contract): remove required difficulty
Nuhvi Jun 11, 2025
14d0505
chore: bindings
Nuhvi Jun 11, 2025
1ae6b98
feat(relayer): reduce run interval for regtest
Nuhvi Jun 12, 2025
2c59391
feat(relayer): add contract_address() getter
Nuhvi Jun 12, 2025
59c3a8a
feat(relayer): replace println! with tracing::debug
Nuhvi Jun 13, 2025
6973533
feat(relayer): make some getters public
Nuhvi Jun 13, 2025
b01be4d
feat(relayer): add relayed_blockhash() and use larger HEADERS_PER_BAT…
Nuhvi Jun 13, 2025
7ec814c
feat(relayer): change info! to debug
Nuhvi Jun 16, 2025
2012cf9
Update relayer/src/relayer.rs
Nuhvi Jul 2, 2025
e8785da
review feedback
Nuhvi Jul 2, 2025
1e6ae7f
chore: fix clippy
sander2 Jul 2, 2025
c63f7e7
chore: fix clippy
sander2 Jul 2, 2025
1571857
chore: fixed bindings
sander2 Jul 2, 2025
a2019c4
fix: updated 'make bind' command
sander2 Jul 2, 2025
6a78f08
chore: satisfy clippy
sander2 Jul 2, 2025
b7c3e15
Merge pull request #639 from bob-collective/feat/relayer-lib
sander2 Jul 2, 2025
a4843f1
Merge branch 'master' into fix/relayer-fork-handling
sander2 Jul 3, 2025
42f256f
chore: allow clippy::too_many_arguments
sander2 Jul 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ bindings:
rm -rf $(BINDINGS_OUT_PATH)

# Generate new bindings
@forge bind --root $(CONTRACTS_PATH) --crate-name $(BINDINGS_FOLDER) --select FullRelay --alloy --force
@forge bind --root $(CONTRACTS_PATH) --crate-name $(BINDINGS_FOLDER) --select "(FullRelay\$$)|(FullRelayWithVerify\$$)" --alloy --force

# Move bindings to the correct location
@mv -f $(BINDINGS_OUT_PATH) $(CRATES_FOLDER)

# undo changes to the Cargo.toml file
git checkout $(BINDINGS_CRATES_FOLDER)/Cargo.toml

# Target for building the project
build: bindings
@$(CARGO) build
Expand Down
5 changes: 0 additions & 5 deletions contracts/src/relay/FullRelay.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ contract FullRelay is IFullRelay {
require(isHeaderValidLength(_genesisHeader), "Bad genesis block");
bytes32 _genesisDigest = _genesisHeader.hash256();

require(
_periodStart & bytes32(0x0000000000000000000000000000000000000000000000000000000000ffffff) == bytes32(0),
"Period start hash does not have work. Hint: wrong byte order?"
);

relayGenesis = _genesisDigest;
bestKnownDigest = _genesisDigest;
lastReorgCommonAncestor = _genesisDigest;
Expand Down
5 changes: 0 additions & 5 deletions contracts/test/fullRelay/FullRelayConstructionTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ contract FullRelayConstructionTest is FullRelayTestUtils {
relay = new TestRelay("", genesisHeight, orphanDigestLe);
}

function testPeriodStartWrongByteOrder() external {
vm.expectRevert(bytes("Period start hash does not have work. Hint: wrong byte order?"));
new TestRelay(genesisHex, genesisHeight, orphanDigestLe);
}

function testStoresGenesisBlockInfo() external view {
assertEq(relay.getRelayGenesis(), genesisDigestLe);

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Loading