Skip to content
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

feat: v0.2.0 #37

Merged
merged 341 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
341 commits
Select commit Hold shift + click to select a range
5b113c0
refactor(evm): refactors Wormhole Adapter and adds the Reporter
allemanfredi Jan 24, 2024
05102e8
refactor(evm): refactors ZetaChain Adapter and adds the Reporter
allemanfredi Jan 24, 2024
26e40a6
refactor(evm): refactors PNetwork Adapter and adds the Reporter
allemanfredi Jan 25, 2024
4cdd184
refactor(evm): refactors Sygma Adapter and adds the Reporter
allemanfredi Jan 25, 2024
7db15f0
chore(test): rm AMB, PNetwork and Sygma tests
allemanfredi Jan 25, 2024
665cd46
chore(evm): rm HeaderOracleAdapter, HeaderReporter and MessageRelay
allemanfredi Jan 25, 2024
88a5673
refactor(evm): adds InvalidThreshold instead of returning false withi…
allemanfredi Jan 25, 2024
7fbf93a
refactor(evm): adds unchecked for reducing gas cost within Hashi
allemanfredi Jan 25, 2024
d56c700
feat(evm): adds additional checks to checkHashWithThresholdFromOracles
allemanfredi Jan 25, 2024
3fd0802
refactor(evm): normalizes HeaderStorage
allemanfredi Jan 25, 2024
cd00644
feat(evm): reduce gas cost of _dispatchMessagesToAdapters
allemanfredi Jan 25, 2024
55169ed
refactor(evm): lints HeaderStorage
allemanfredi Jan 25, 2024
4e7dbb6
chore(evm): rm MessageRelay left stuff
allemanfredi Jan 25, 2024
1183fb1
chore(evm): rm IHeaderReporter
allemanfredi Jan 25, 2024
b2d2324
refactor(evm): normalizes interfaces
allemanfredi Jan 25, 2024
41dcf9f
Merge branch feat/v0.2.0 into feat/v0.2.0-adapters
allemanfredi Jan 25, 2024
eebc020
refactor(tasks): rm deploy:HashiModule
allemanfredi Jan 26, 2024
544a7ab
refactor(evm): lints
allemanfredi Jan 26, 2024
8d50124
Merge branch 'feat/v0.2.0' into feat/v0.2.0-adapters
allemanfredi Jan 26, 2024
3c55b2f
chore(evm): rn Reporter test file
allemanfredi Jan 26, 2024
6836e2b
Merge pull request #38 from gnosis/feat/v0.2.0-adapters
allemanfredi Jan 29, 2024
4d17dec
feat(evm): adds IShuSho, IShoyuBashi and IGiriGiriBashi
allemanfredi Jan 29, 2024
8061654
refactor(evm): adds missing comment within Hashi
allemanfredi Jan 29, 2024
933c065
fix(evm): fixes _getThresholdHash when the threshold = 1
allemanfredi Jan 29, 2024
583c762
refactor(evm): aligns ShoyuBashi and GiriGiriBashi tests
allemanfredi Jan 29, 2024
eae01e6
refactor(evm): adds fx description to IReporter
allemanfredi Jan 29, 2024
74fb30b
refactor(evm): lints SygmaAdapter
allemanfredi Jan 29, 2024
e5c7465
Merge branch 'feat/v0.2.0' into ref/ownable
allemanfredi Jan 30, 2024
c1266e2
refactor(evm): refactors HeaderStorage events and errors
allemanfredi Jan 30, 2024
eb65993
fix(evm): rm typo within ShuSo
allemanfredi Jan 30, 2024
8acfa29
Merge pull request #39 from gnosis/ref/ownable
allemanfredi Jan 30, 2024
23bfeb8
chore(test): rm not used test
allemanfredi Jan 30, 2024
da29552
chore(test): rm E2E test
allemanfredi Jan 30, 2024
432f870
refactor(evm): updates solidity version to 0.8.20
allemanfredi Jan 30, 2024
f15c915
fix(evm): fixes OracleAdapter test
allemanfredi Jan 30, 2024
1e4532d
Merge pull request #40 from gnosis/feat/sol-0.8.20
allemanfredi Jan 31, 2024
2303722
refactor(evm): rn OracleAdapter into Adapter
allemanfredi Jan 31, 2024
2973b6e
ref(evm): adds events comments within interfaces
allemanfredi Jan 31, 2024
f6ac538
refactor(evm): mv Domain within IShuSho
allemanfredi Jan 31, 2024
5917ee2
refactor(evm): improves ShuSho & IShuSho
allemanfredi Jan 31, 2024
bd5ed25
refactor(evm): sort alphabetically fxs within the interfaces and rm s…
allemanfredi Jan 31, 2024
ccd5be5
refactor(evm): sort alphabetically fxs within the implementations
allemanfredi Jan 31, 2024
76b69fe
refactor(evm): adds missing // solhint-disable no-empty-blocks
allemanfredi Jan 31, 2024
48fd469
refactor(evm): rn toChainId into targetChainId
allemanfredi Feb 1, 2024
f243ab9
Merge pull request #41 from gnosis/ref/oracle-adapter
allemanfredi Feb 1, 2024
bd6b374
refactor(evm): rn fromChainId into sourceChainId
allemanfredi Feb 1, 2024
0d441d8
refactor(evm): rm empty comment lint
allemanfredi Feb 1, 2024
29c7089
chore(evm): rn 02_OracleAdapter.test.ts into 02_Adapter.test.ts and r…
allemanfredi Feb 6, 2024
bff9b15
refactor(evm): rm left ref to zodiac
allemanfredi Feb 7, 2024
1b1dd89
refactor(contracts & test): rm salt and adds nonce
allemanfredi Feb 12, 2024
d6db43b
Merge pull request #43 from gnosis/ref/message-id
allemanfredi Feb 12, 2024
b1cbf25
fix(contracts & test): fixes relying the same message more than once
allemanfredi Feb 12, 2024
e74cc40
Merge pull request #44 from gnosis/fix/double-message-id-relay-messag…
allemanfredi Feb 13, 2024
d27848b
refactor(tasks): improves logs
allemanfredi Feb 13, 2024
fcaa91a
fix(contracts & test): adds missing onlyOwner and fixes a test
allemanfredi Feb 13, 2024
aec6df9
feat(contracts): improves checkHashWithThresholdFromAdapters & _getTh…
allemanfredi Feb 19, 2024
3b7d3ea
feat(contracts): adds domain to settings
allemanfredi Feb 19, 2024
aafcd2e
refactor(contracts): rn uint into uint256
allemanfredi Feb 19, 2024
3557312
refactor(contracts): changes settings mapping
allemanfredi Feb 19, 2024
5d1d3c0
fix(contracts): adds a check to prevent using the same adapters + ord…
allemanfredi Feb 19, 2024
35c53d9
refactor(evm): rn InvalidAdapters into AdaptersCannotContainChallenge…
allemanfredi Feb 19, 2024
872589d
feat(test): adds GiriGiriBashi tests
allemanfredi Feb 20, 2024
8c9b8af
feat(contracts): adds notice comment to _setThreshold within ShuSho
allemanfredi Feb 20, 2024
df77641
fix(contracts & test): adds check to prevent settings the threhold le…
allemanfredi Feb 20, 2024
dc56261
fix(contracts & test): fixes declareNoConfidence
allemanfredi Feb 20, 2024
abb2861
fix(contracts & test): adds check to prevent declareNoConfidence when…
allemanfredi Feb 20, 2024
78a27ac
Merge pull request #45 from gnosis/feat/check-hash-with-threshold-fro…
allemanfredi Feb 21, 2024
fa81aaf
Merge branch 'feat/v0.2.0' into fix/giri-giri-bashi
allemanfredi Feb 21, 2024
d140155
ref(contracts): sets solidity version to ^0.8.0 within the interfaces
allemanfredi Feb 21, 2024
d8368cb
ref(contracts & test): adds getter fxs within GiriGiriBashi and ShuSho
allemanfredi Feb 21, 2024
137db9e
Merge branch 'feat/v0.2.0' into fix/giri-giri-bashi
allemanfredi Feb 21, 2024
d1a057d
Merge pull request #46 from gnosis/fix/giri-giri-bashi
allemanfredi Feb 21, 2024
5b4f85f
feat(contracts & test): adds support for zk adapters within Yaho
allemanfredi Feb 23, 2024
0d463dd
refactor(contracts): changes comments
allemanfredi Feb 26, 2024
5fd1077
refactor(evm): rn vars
allemanfredi Feb 26, 2024
2362a45
refactor(contracts & test): rm try catch within checkHashWithThreshol…
allemanfredi Feb 27, 2024
66a5d99
fix(contracts & test): fixes declareNoConfidence for case equalHashes…
allemanfredi Feb 27, 2024
29bac58
refactor(tasks): refactors amb deploy tasks
allemanfredi Mar 8, 2024
d83fd2a
added Router adapter
Shivam78288 Mar 11, 2024
d2ab149
replaced msg.value check with balance of contract for Router Adapter
Shivam78288 Mar 26, 2024
3828575
added pure decorator to iAck function
Shivam78288 Mar 26, 2024
2d80e92
Merge pull request #49 from router-protocol/feat/v0.2.0
allemanfredi Mar 26, 2024
f1a9fdb
chore(task): rm not used task
allemanfredi Mar 26, 2024
b90c787
chore(hardhat.config.js): rm mnemonic and adds pk
allemanfredi Apr 9, 2024
5618f8f
feat(contracts): mv MockAdapter and MockReporter under adapters
allemanfredi Apr 9, 2024
ec49d9a
doc: add audit report
zengzengzenghuy Apr 22, 2024
9965392
chore: move audit report
zengzengzenghuy Apr 22, 2024
576b321
Merge pull request #52 from gnosis/doc/audit
allemanfredi Apr 22, 2024
b5b66ee
chore(audits): <- mv them into the root of the repo
allemanfredi Apr 22, 2024
e2f138c
refactor(contracts & tasks): formats
allemanfredi Apr 23, 2024
6d57268
Merge pull request #47 from gnosis/feat/yaho-zk-adapters
allemanfredi Apr 23, 2024
1424b73
feat(contracts): adds verifyAndStoreDispatchedMessage within DendrETH…
allemanfredi Apr 23, 2024
6f0cf57
refactor(contracts): adds MESSAGE_DISPATCHED_EVENT_SIG real value
allemanfredi Apr 23, 2024
6833c23
chore(hardhat.config.js): adds support to chiado for verifying contracts
allemanfredi Apr 24, 2024
e9c9ee5
Merge branch 'feat/v0.2.0' into feat/dendreth-verify-message
allemanfredi Apr 24, 2024
0dfcef5
chore(global): changes workspaces settings
allemanfredi Apr 29, 2024
7ca2c3b
Merge pull request #54 from gnosis/chore/workspaces
allemanfredi Apr 29, 2024
66708ab
feat(common): <- starts adding these
allemanfredi Apr 30, 2024
e771a37
chore(global): adds .nvmrc
allemanfredi Apr 30, 2024
b71bec4
feat(relayer): <- starts adding this
allemanfredi Apr 30, 2024
b68f306
feat(common): changes tsconfig.json conf and adds Message
allemanfredi Apr 30, 2024
36469bb
feat(relayer): adds Watcher
allemanfredi Apr 30, 2024
b6d92eb
refactor(relayer): rn ListenerConfigs into WatcherConfigs
allemanfredi Apr 30, 2024
15d5136
refactor(relayer): rn listen into watch and rn startWatching into start
allemanfredi Apr 30, 2024
648b1f5
refactor(common): makes threshold and targetChainId integers within M…
allemanfredi Apr 30, 2024
b7fc364
feat(relayer): adds timestamp within messages
allemanfredi Apr 30, 2024
c0cc299
feat(relayer): add Batcher
allemanfredi Apr 30, 2024
ec16d1c
refactor(relayer): improves logs
allemanfredi May 1, 2024
8698e35
chore(relayer): rm docker stuff
allemanfredi May 1, 2024
9837c69
refactor(common & relayer): mv Watcher and yahoAbi within common
allemanfredi May 1, 2024
abd36be
refactor(relayer): adds dispatch tx hash, rm timestamp and rn message…
allemanfredi May 1, 2024
57dd60b
refactor(common): mv Batcher within common, adds Yaru and makes servi…
allemanfredi May 1, 2024
3003a77
refactor(relayer): changes it based on new Batcher design
allemanfredi May 1, 2024
acc3cb5
refactor(relayer): formats and changes comment
allemanfredi May 1, 2024
b83e084
feat(executor): <- adds first implementation of this
allemanfredi May 1, 2024
3ebce36
refactor(executor): changes comment
allemanfredi May 1, 2024
f4ac4d4
feat(common & relayer): rm values from Batcher.onResult
allemanfredi May 2, 2024
f91388a
feat(executor): adds check to prevent to send messages that revert
allemanfredi May 2, 2024
1efb436
fix(executor): mv message filtering within onGetValues to not send ba…
allemanfredi May 2, 2024
5a5699e
feat(executor): adds BLOCKS_WINDOW
allemanfredi May 2, 2024
def3b33
refactor(relayer): rn BLOCKS_RANGE into BLOCKS_WINDOW
allemanfredi May 2, 2024
f83ea5e
refactor(executor & relayer): changes how dotenv is used to support .…
allemanfredi May 2, 2024
5895106
chore(executor & relayer): updates README files
allemanfredi May 2, 2024
15afa62
chore(executor & relayer): adds missing instruction within README
allemanfredi May 3, 2024
d08cd02
refactor(hardhat.config.js): <- refactor this
allemanfredi May 6, 2024
ead7541
refactor(tasks): refactors l0 adpter/reporter deployment tasks
allemanfredi May 6, 2024
001adf7
refactor(tasks): refactors sygma adpter/reporter deployment tasks
allemanfredi May 6, 2024
9541ec9
Merge branch 'feat/v0.2.0' into feat/relayer
allemanfredi May 6, 2024
5078066
fix(relayer): rm configDotenv
allemanfredi May 6, 2024
1e146b0
feat(contracts): adds fee within LayerZeroReporter
allemanfredi May 6, 2024
633a44e
feat(relayer): adds possibility to filter messages based on msg.sender
allemanfredi May 7, 2024
f6cf9ea
fix(executor): adds chainId within executedMessage selection
allemanfredi May 7, 2024
d3070ec
fix(relayer): adds ? to prevent crashing when whitelistedSenderAddres…
allemanfredi May 7, 2024
914a6f1
Merge pull request #55 from gnosis/feat/relayer
allemanfredi May 9, 2024
4df20f5
feat(evm): creates debridge reporter & adapter
allemanfredi May 9, 2024
ccc83d1
refactor(evm): rn _deBridgeGate into deBridgeGate_
allemanfredi May 9, 2024
2380b6b
feat(evm): adds debridge reporter & adapter deployment tasks
allemanfredi May 9, 2024
e2f46eb
feat(evm): adds fee within CCIPReporter
allemanfredi May 14, 2024
6f5bf9e
feat(common & relayer): adds check to prevent relaying messages alrea…
allemanfredi May 16, 2024
6c36609
refactor(evm): adds SOURCE_CHAIN_ID and rn vars within DendrETHAdapter
allemanfredi Jun 8, 2024
7883414
fix(evm): rn DuplicateThreashold into DuplicateThreshold
allemanfredi Jun 8, 2024
3b66a14
refactor(evm): rm duplicated code within Hashi
allemanfredi Jun 8, 2024
cb80a56
refactor(evm): rm _resetPendingMessageHashesByMessageIds within Yaho
allemanfredi Jun 8, 2024
4832974
chore(evm): rm GiriGiriBashi
allemanfredi Jun 10, 2024
b944a07
chore(evm): rn tests
allemanfredi Jun 10, 2024
ab67976
refactor(evm): rm _setDomainThreshold from ShuSho
allemanfredi Jun 10, 2024
1074307
feat(evm): adds threshold and adapters to onMessage
allemanfredi Jun 13, 2024
b35e7bb
refactor(evm): updates PingPong.onMessage
allemanfredi Jun 13, 2024
760524b
Merge pull request #62 from gnosis/feat/add-threshold-and-adapters-to…
allemanfredi Jun 18, 2024
08f762e
chore(evm): reorgs dependencies and devDependencies
allemanfredi Jun 18, 2024
382ea41
refactor(evm): marks getAdapterLink and getDomain as external
allemanfredi Jun 18, 2024
921ac41
feat(evm): adds threshold to enableAdapters to avoid multiple hashes …
allemanfredi Jun 19, 2024
f64d173
refactor(evm): rm setHashi from ShuSo
allemanfredi Jun 19, 2024
efd21e8
refactor(evm): rn a couple of comments and tests
allemanfredi Jun 19, 2024
e3fe9cf
refactor(evm): adds ccia within Made with comment
allemanfredi Jun 24, 2024
0976475
chore(README): <- rm GiriGiriBashi
allemanfredi Jun 24, 2024
6f140ec
feat(ownable): adds the emission of event ThresholdSet within _enable…
allemanfredi Jul 8, 2024
ba754ea
chore: merge from feat/v0.2.0
zengzengzenghuy Jul 10, 2024
b1a3639
WIP: fix controllers to comply with hashi v0.2.0
zengzengzenghuy Jul 10, 2024
782cf3e
WIP: update StandardReporterController
zengzengzenghuy Jul 10, 2024
22e1961
WIP: fix ElectronController type and add AMB for Sepolia and Chiado
zengzengzenghuy Jul 11, 2024
a0a9abd
feat: CCIP Reporter controller
zengzengzenghuy Jul 11, 2024
adbf1ee
chore: change AMB controller into Standard controller
zengzengzenghuy Jul 11, 2024
f5d5e83
WIP: update LayerZero adapter to LZ v2 & fix controller config
zengzengzenghuy Jul 12, 2024
f215268
fix: LayerZeroV2 Reporter & Adapter
zengzengzenghuy Jul 15, 2024
cb557de
feat: add Base config to LayerZero controller
zengzengzenghuy Jul 15, 2024
da427a4
chore: update tsconfig.json and Dockerfile
zengzengzenghuy Jul 15, 2024
b7177be
chore: add configuration logs in Controller class
zengzengzenghuy Jul 15, 2024
aac37d5
update .env.example
zengzengzenghuy Jul 15, 2024
1aeff54
fix: typo and .env.example
zengzengzenghuy Jul 18, 2024
fc6f62d
feat(reporter): update Wormhole Reporter syntax and address
zengzengzenghuy Jul 26, 2024
10a88b5
chore(evm): update Wormhole deploy task
zengzengzenghuy Jul 26, 2024
ea3bd02
misc(relayer): update .env.example
zengzengzenghuy Jul 26, 2024
77e0275
chore(reporter): update AMB reporter variable name
zengzengzenghuy Jul 26, 2024
99a6a2a
feat(reporter): add Base related addresses
zengzengzenghuy Jul 29, 2024
447abf7
feat(evm): add Arb Header Storage.sol
zengzengzenghuy Jul 31, 2024
9760272
Merge branch 'feat/v0.2.0' into feat/dendreth-verify-message
allemanfredi Aug 20, 2024
ed2e40b
feat(contracts): implement Spectre adapter push flow
mpetrun5 Aug 22, 2024
09a66b0
refactor(evm): refactors Merkle
allemanfredi Aug 22, 2024
c668622
fix(evm): fixes dendreth deployment task
allemanfredi Aug 22, 2024
129fd8b
refactor(evm): rm part of a comment
allemanfredi Aug 22, 2024
7e8179f
Merge pull request #53 from gnosis/feat/dendreth-verify-message
allemanfredi Aug 22, 2024
c6558b2
feat: dockerfile and docker compose for executor and relayer
zengzengzenghuy Aug 25, 2024
926ef27
fix: docker-compose format error
zengzengzenghuy Aug 25, 2024
b1517a2
fix: Executor messageIds type & relayer start script
zengzengzenghuy Aug 30, 2024
2797d11
add Hyperbridge adapter & reporter
seunlanlege Sep 12, 2024
fc9f2e1
remove todos
seunlanlege Sep 12, 2024
de789a1
fix setReporterByChain & comment
seunlanlege Sep 12, 2024
50cb8e2
feat(chore): add deployment task
seunlanlege Sep 13, 2024
10f1856
chore(reporter): update reporters and adapters configs
zengzengzenghuy Sep 13, 2024
60e9359
feat(chore): bump ismp-solidity sdk
seunlanlege Sep 14, 2024
943ae5f
chore: remove unused ABI files
zengzengzenghuy Sep 16, 2024
15a8f46
feat(chore): deploy hyperbridge adapters
seunlanlege Sep 16, 2024
cc5649c
feat(chore): rm new line
seunlanlege Sep 16, 2024
705b8df
Merge pull request #65 from polytope-labs/feat/v0.2.0
allemanfredi Sep 16, 2024
9b895cd
refactor(evm): sorts imported contracts within HyperbridgeReporter an…
allemanfredi Sep 16, 2024
9d0ab4a
chore(global): rm packageManager within evm and sdk and adds it withi…
allemanfredi Sep 16, 2024
12c25cb
Merge pull request #63 from zengzengzenghuy/feat/v0.2.0-ArbReporter
allemanfredi Sep 18, 2024
5d114a8
refactor(evm): adds ARB_SYS constant within ArbHeaderStorage
allemanfredi Sep 18, 2024
c9c300a
Merge pull request #59 from gnosis/feat/debridge-adapter-and-reporter
allemanfredi Sep 18, 2024
0e86e03
chore(reporter): remove redundant addresses in .env.example
zengzengzenghuy Sep 18, 2024
19b0666
chore(evm): rename LayerZeroAdapter.sol enabledReporters mapping
zengzengzenghuy Sep 18, 2024
5e9b58a
chore(reporter): remove SygmaReporterController class
zengzengzenghuy Sep 18, 2024
00e2b98
Merge branch 'feat/v0.2.0' into feat/reporter
allemanfredi Sep 18, 2024
7d03cc0
chore(reporter): delete files unrelated to Hashi v0.2.0
zengzengzenghuy Sep 19, 2024
56bb792
fix(reporter): wormhole reporter ABI file name
zengzengzenghuy Sep 19, 2024
a90cde0
chore(reporter): remove yarn.lock
zengzengzenghuy Sep 19, 2024
681a16f
refactor(reporter,relayer,executor): dockerfile and docker-compose.ym…
zengzengzenghuy Sep 20, 2024
77ff55c
chore(reporter): <- makes it to be part of the workspaces
allemanfredi Sep 20, 2024
c57a4ee
fix(reporter): adds nonce within simulateContract to avoid to generat…
allemanfredi Sep 20, 2024
e43d664
refactor(reporter): update dockerfile and tsconfig.json
zengzengzenghuy Sep 20, 2024
93f96f5
chore: rename image names in docker-compose.yml
zengzengzenghuy Sep 20, 2024
3c0f4f3
docs: update README
zengzengzenghuy Sep 23, 2024
d21c428
chore: delete docker-compose-reporter.yml and merge the code into doc…
zengzengzenghuy Sep 23, 2024
d464ceb
docs: update README
zengzengzenghuy Sep 23, 2024
550f4ba
docs: remove unrelated code in README
zengzengzenghuy Sep 23, 2024
5479b75
Merge pull request #66 from gnosis/feat/reporter
allemanfredi Sep 23, 2024
91b38e0
docs: update readme
zengzengzenghuy Sep 24, 2024
eeb5cb2
Merge pull request #64 from sygmaprotocol/feat/spectre-adapter
allemanfredi Sep 24, 2024
b4d322f
docs: update README
zengzengzenghuy Sep 24, 2024
001f5cd
Merge branch 'feat/v0.2.0' into docs/README
zengzengzenghuy Sep 24, 2024
1058abf
refactor(evm): rm some warnings within LayerZeroAdapter
allemanfredi Sep 24, 2024
4779141
chore(evm): rm not used deps and add new ones needed
allemanfredi Sep 24, 2024
76bd974
chore(global): rm patch-package
allemanfredi Sep 24, 2024
94810c9
chore(evm): bumps version to 0.2.0
allemanfredi Sep 24, 2024
b8bc96e
chore(global): bumps node version to 22
allemanfredi Sep 25, 2024
71d4a2d
fix(reporter): fixes Coordinator imports
allemanfredi Sep 25, 2024
83da4d2
Merge pull request #68 from gnosis/chore/node-22
allemanfredi Sep 25, 2024
6e13d42
feat(evm): adds HashiProver
allemanfredi Sep 25, 2024
d34e8c4
fix(common): fixes logger when service is undefined
allemanfredi Sep 25, 2024
1e3258b
feat(rpc): <- adds first implementation of this
allemanfredi Sep 25, 2024
5392ed2
feat(evm): merges AccountProof and StorageProof into Proof
allemanfredi Sep 27, 2024
438191c
feat(rpc): adds integration of ancestralBlockNumber
allemanfredi Sep 27, 2024
d88c81c
refactor(evm): adds BlockHeaderNotFound within _checkBlockHeaderAgain…
allemanfredi Sep 27, 2024
6669748
Merge branch 'feat/v0.2.0' into docs/README
allemanfredi Sep 27, 2024
392880b
chore(global): <- updates README
allemanfredi Sep 27, 2024
96a1779
Merge branch 'feat/v0.2.0' into docs/README
allemanfredi Sep 27, 2024
a4646a1
Merge pull request #67 from gnosis/docs/README
allemanfredi Sep 27, 2024
4875759
Merge branch 'feat/v0.2.0' into feat/hashi-prover
allemanfredi Sep 27, 2024
2c0a882
refactor(evm): rm check on the number of block header fields within p…
allemanfredi Sep 27, 2024
e1f62c9
refactor(evm): rn _verifyAccountAndStorageProof into verifyForeignSto…
allemanfredi Sep 30, 2024
0a2de9c
feat(rpc): adds support for more chains
allemanfredi Oct 1, 2024
75a82bd
feat(evm): adds rlp decoding within _verifyStorageProof and updates t…
allemanfredi Oct 1, 2024
c6db7b6
Merge pull request #70 from gnosis/fix/prove-ancestral-block-hashes
allemanfredi Oct 1, 2024
5671b31
Merge branch 'feat/v0.2.0' into feat/hashi-prover
allemanfredi Oct 1, 2024
ca95bfd
Merge pull request #69 from gnosis/feat/hashi-prover
allemanfredi Oct 1, 2024
16932b9
feat(rpc): adds Dockerfile
allemanfredi Oct 1, 2024
c6d296a
feat(rpc): adds README.md
allemanfredi Oct 1, 2024
e871dc2
Update README.md
bertani Oct 1, 2024
8102f2b
chore(root): updates hashi.png
allemanfredi Oct 1, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
**/.coverage_contracts
**/dist
**/node_modules
**/types
**/.yarn

# files
*.env
*.env-*
*.log
.pnp.*
coverage.json
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn dlx commitlint --edit $1
npx commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn dlx lint-staged
npx lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22
786 changes: 0 additions & 786 deletions .yarn/releases/yarn-3.2.1.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ nodeLinker: node-modules
plugins:
- path: ".yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs"
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
91 changes: 52 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
> **⚠️ Warning ⚠️**
>
> **⚠️ This code is being actively developed and is not yet production ready.**
>
> **⚠️ DO NOT deploy this code or use deployments of this code for anything valuable.**

---

[![Github Actions][gha-badge]][gha] [![Coverage Status][coveralls-badge]][coveralls]
[![Hardhat][hardhat-badge]][hardhat] [![License: LGPL-3.0-only][license-badge]][license]

![Hashi](hashi.png)

# Hashi 橋

[coveralls]: https://coveralls.io/github/gnosis/hashi?branch=master
[coveralls-badge]: https://coveralls.io/repos/github/gnosis/hashi/badge.svg?branch=main
[gha]: https://github.com/gnosis/hashi/actions
Expand All @@ -22,14 +12,16 @@
[license]: https://www.gnu.org/licenses/lgpl-3.0.en.html
[license-badge]: https://img.shields.io/badge/License-LGPL%20v3.0-blue

# Overview

Hashi is an EVM Hash Oracle Aggregator, designed to facilitate a
[principled approach to cross-chain bridge security](https://ethresear.ch/t/a-principled-approach-to-bridges/14725?u=auryn).

The primary insight being that the vast majority of bridge-related security incidents could have had minimal impact if
the systems relying on them had built in some redundancy. In other words, it's much more secure to require messages be
validated by multiple independent mechanisms, rather than by just one.

We call this setup a **RAIHO** (Redundant Array of Independent Hash Oracles).
For detailed documentation, [read the full guide here](https://crosschain-alliance.gitbook.io/hashi). To explore the real-time cross-chain activity and block headers, visit the Hashi [Explorer](https://hashi-explorer.xyz).

## Features

Expand All @@ -51,52 +43,73 @@ We call this setup a **RAIHO** (Redundant Array of Independent Hash Oracles).
- Query for a unanimously agreed on hash from that full set of oracles.
- Query for a hash agreed upon by a threshold of oracles for a given block on a given chain; the provided oracles must all agree on the hash for the ID, must all be enabled as oracles for the given domain, and must exceed the threshold for the domain.

**GiriGiriBashi** (ギリギリ橋) allows:

- An `owner` account to:
- Initialize the set of oracles for each domain.
- Initialize the threshold of oracles that must agree on a hash for each domain.
- Replace quarantined oracle adapters.
- Set a challenge `bond` `recipient`.
- Anyone to:
- Query for a unanimously agreed on hash from that full set of oracles.
- Query for a hash agreed upon by a threshold of oracles for a given block on a given chain; the provided oracles must all agree on the hash for the ID, must all be enabled as oracles for the given domain, and must exceed the threshold for the domain.
- Challenge an oracle to report on a hash.
- Resolve a challenge, either returning the `bond` to the challenger and quarantining the given oracle, in the case that the oracle does not report in time or reports a conflicting hash, or forwarding the challenge `bond` to the `recipient`.
- Declare a state of no confidence for a given domain, forcing the domain to be re-initialized by `owner`.

**Yaho** (ヤッホー) allows users to:

- dispatch arbitrary messages via Hashi, which:
- emits the hash of arbitrary messages as events
- stores the arbitrary message in storage
- stores the hash of arbitrary message in storage
- relay previously stored messages to any number of message adapters
- dispatch messages and relay them to adapters in a single call

**Yaru** (やる) allows `owner` to:

- execute arbitrary messages passed from Yaho

**Hashi Zodiac Module** allows users to:
# Working with Hashi

- Control an avatar (like a Safe) on one chain from a `controller` address on another chain, via messages passed over hashi.
- Define an instance of Yaho which can pass it messages.
- Define a `chainId` (usually called `domain` elsewhere in this repo).
- Define a foreign `controller` address.
**Node**
This repository targets v18 of node. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your node version.
Once installed, you should change versions automatically with the `.nvmrc` file.

Hashi's additional redundancy obviously comes with a higher gas cost, along with moving only as quickly as the slowest
oracle in a given set. However, this trade-off seems well worth it given the scope and frequency of past bridge-related
security incidents.
**Docker**
Make sure you have the correct version of [Docker](https://www.docker.com/) installed on your machine.
You may refer to `Dockerfile` under each workspace and `docker-compose.yml` on the root for more details regarding the build process.

## Audits
## Project Structure

1. `packages/common`: Common logic that will be used across multiple workspaces.
2. `packages/evm`: On chain components includes Solidity smart contracts, deploy tasks, tests. Built with [Hardhat](https://hardhat.org/).
3. `packages/executor`: A service utilized to execute messages once they have achieved consensus.
4. `packages/relayer`: A service used to relay batches of dispatched messages through Yaho to the reporter contracts.
5. `packages/reporter`: Script to call Reporter contract's `dispatchBlocks` function of different oracle from source chain to destination chain.

Hashi has been audited by the [G0 group](https://github.com/g0-group).
# Workspaces

All issues and notes of the audit have been addressed as of commit hash [9f373635](https://github.com/gnosis/hashi/tree/9f373635730b59478bf23215906fdb5ad525d3b7/packages/evm/contracts).
This monorepo uses [Yarn Workspaces](https://yarnpkg.com/features/workspaces). Installing dependencies can be done from the root directory of the repository.

- Installing dependencies

```sh
git clone https://github.com/gnosis/hashi # Clone the repo
cd hashi
nvm use
yarn install
```

## Build & Run

To build & run each packages, navigate to each package separately, check the README.md in each workspace for more details.

## Run Docker

Before running docker for the workspace, insert the correct environment variable in .env.

```sh
cp .env.example .env
```

Build & run
Run the following command to build and run all the services.

```sh
docker compose up --build
```

## Audits

The audit results are available as a [pdf in this repo](https://github.com/gnosis/hashi/blob/main/packages/evm/contracts/docs/audits/HashiMay2023.pdf).
Hashi has been audited by G0, Omega and Least Authority.

Please note, there have been changes to contract code since this audit. A subsequent audit of the changed code is pending.
The audit results can be found [here](https://crosschain-alliance.gitbook.io/hashi/meta/audits).

## Security and Liability

Expand Down
File renamed without changes.
Binary file added audits/g0-HashiMar2024.pdf
Binary file not shown.
54 changes: 54 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: "3.8"

services:
mongodb:
image: mongo:latest
container_name: mongodb
ports:
- "27017:27017"
networks:
- mongo-network
volumes:
- mongo-data:/data/db

hashi_relayer:
build:
context: .
dockerfile: packages/relayer/Dockerfile
container_name: hashi_relayer
networks:
- mongo-network
depends_on:
- mongodb

hashi_executor:
build:
context: .
dockerfile: packages/executor/Dockerfile
container_name: hashi_executor
networks:
- mongo-network
depends_on:
- mongodb

hashi_reporter:
build:
context: .
dockerfile: packages/reporter/Dockerfile
container_name: hashi_reporter

hashi_rpc:
build:
context: .
dockerfile: packages/rpc/Dockerfile
ports:
- "3000:3000"
container_name: hashi_rpc

networks:
mongo-network:
driver: bridge

volumes:
mongo-data:
driver: local
Binary file modified hashi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 5 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
{
"private": true,
"name": "hashi",
"description": "",
"author": {
"name": "gnosis",
"url": "https://github.com/gnosis"
},
"scripts": {
"prepare": "husky install",
"preinstall": "yarn contracts:install",
"build": "yarn contracts:build",
"test": "yarn contracts:test",
"lint": "yarn contracts:lint",
"coverage": "yarn contracts:coverage",
"contracts:install": "cd packages/evm && yarn install",
"contracts:build": "cd packages/evm && yarn build",
"contracts:test": "cd packages/evm && yarn test",
"contracts:lint": "cd packages/evm && yarn lint",
"contracts:coverage": "cd packages/evm && yarn coverage"
"prepare": "husky install"
},
"devDependencies": {
"@commitlint/cli": "^17.5.1",
Expand All @@ -26,5 +15,8 @@
"prettier": "^2.8.7",
"prettier-plugin-solidity": "^1.0.0"
},
"packageManager": "yarn@3.2.1"
"workspaces": [
"packages/*"
],
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 2 additions & 0 deletions packages/common/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/dist
**/node_modules
21 changes: 21 additions & 0 deletions packages/common/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends:
- "eslint:recommended"
- "plugin:@typescript-eslint/eslint-recommended"
- "plugin:@typescript-eslint/recommended"
- "prettier"
parser: "@typescript-eslint/parser"
parserOptions:
project: "tsconfig.json"
plugins:
- "@typescript-eslint"
root: true
rules:
"@typescript-eslint/no-floating-promises":
- error
- ignoreIIFE: true
ignoreVoid: true
"@typescript-eslint/no-inferrable-types": "off"
"@typescript-eslint/no-unused-vars":
- error
- argsIgnorePattern: "_"
varsIgnorePattern: "_"
2 changes: 2 additions & 0 deletions packages/common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
logs/
tsconfig.tsbuildinfo
2 changes: 2 additions & 0 deletions packages/common/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/dist
**/node_modules
7 changes: 7 additions & 0 deletions packages/common/.prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bracketSpacing: true
printWidth: 120
proseWrap: "always"
singleQuote: false
tabWidth: 2
trailingComma: "all"
semi: false
21 changes: 21 additions & 0 deletions packages/common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Common

Common logic that will be used across multiple workspaces/packages.

## Usage

### Install

Please make sure you have run `yarn install` on the root level.

```sh
cd ../.. # To the root level
nvm use
yarn install
```

### Compile

```sh
yarn compile
```
33 changes: 33 additions & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "@gnosis/hashi-common",
"version": "0.1.0",
"private": true,
"author": {
"name": "gnosis",
"url": "https://github.com/gnosis"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"postinstall": "yarn compile",
"compile": "tsc",
"lint": "eslint --ignore-path ./.eslintignore --ext .js,.ts .",
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\"",
"prettier:write": "prettier --write \"**/*.{js,json,md,sol,ts,yml}\""
},
"dependencies": {
"viem": "^2.9.28",
"winston": "^3.11.0"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@types/node": "^20.8.9",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"prettier": "^3.0.3",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
}
}
Loading
Loading