-
Notifications
You must be signed in to change notification settings - Fork 102
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
Contracts V3 #882
Contracts V3 #882
Conversation
ParaID bridgeHubParaID; | ||
} | ||
|
||
bytes32 internal constant SLOT = keccak256("org.snowbridge.storage.core"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should b versioned?
// Operating mode: | ||
OperatingMode mode; | ||
// Message channels | ||
mapping(ParaID paraID => Channel) channels; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, maybe make this mapping from an agentId instead of paraId?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's enough time before the audit to properly spec the change and implement it.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #882 +/- ##
==========================================
+ Coverage 69.80% 74.72% +4.92%
==========================================
Files 47 40 -7
Lines 1679 1737 +58
Branches 58 74 +16
==========================================
+ Hits 1172 1298 +126
+ Misses 489 419 -70
- Partials 18 20 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -2,18 +2,36 @@ | |||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com> | |||
pragma solidity 0.8.20; | |||
|
|||
type ParaID is uint32; | |||
type ParaID is uint256; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this type correct? ParaId
is still a u32
in the parachain:
pub use polkadot_parachain::primitives::Id as ParaId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Upgrade ssz_rs crate. (#880) * Upgrade ssz_rs crate. * Upgrade ssz_rs crate. --------- Co-authored-by: claravanstaden <Cats 4 life!> * Bump nixpkgs to use its geth package (#885) * Bump nixpkgs to use its geth package * Use source config in PolkadotListener * Match field order in struct def * Move info log to relay creation * Remove unused channel * Whitespace * Add context to errors * Add logs * Bump node & pnpm in workflow * Rename locals * Remove unused variable * Add Troubleshooting README section * Fix up .envrc-example files * Add note about pure shells * Update cumulus submodule (#886) * Inbound queue benchmarks (#876) * Start with inbound channel benchmarks. * Add method to set execution header storage for benchmark test. * Working on benchmarks * Basic working version * Cleanup * Removes cleanup. * Adds some comments for Alistair. * Adds branch name. * Makes note * Test transactions * Cleaning up beacon client deps. * Clean up comments. * Tests cleanup. * Fixes non-benchmark test runs. * Cleanup. * Update fixtures and generates benchmarks. * Revert relayer logs. * Cleanup BenchmarkHelper impl and inbound queue dependencies. * fmt * Cleanup imports. * Cleanup imports. * Touch * Adds weights in inbound queue pallet. * Fix tests. * Update cumulus. --------- Co-authored-by: claravanstaden <Cats 4 life!> * Fix parachain build * Move BalanceOf outside of pallet * remove benchmark for non existing method * downgrade cargo.lock to match cumulus * fix benchmarks --------- Co-authored-by: Clara van Staden <claravanstaden64@gmail.com> Co-authored-by: Alistair Singh <alistair.singh7@gmail.com>
* Halting & resuming bridge pallets * Ignore .env * Remove .env * Some polish * Set owner of bridge pallets * Upgrade ssz_rs crate. (#880) * Upgrade ssz_rs crate. * Upgrade ssz_rs crate. --------- Co-authored-by: claravanstaden <Cats 4 life!> * Update cumulus * Bump nixpkgs to use its geth package (#885) * Bump nixpkgs to use its geth package * Use source config in PolkadotListener * Match field order in struct def * Move info log to relay creation * Remove unused channel * Whitespace * Add context to errors * Add logs * Bump node & pnpm in workflow * Rename locals * Remove unused variable * Add Troubleshooting README section * Fix up .envrc-example files * Add note about pure shells * Relax RANDAO_COMMIT_DELAY for local setup * Update cumulus * Update cumulus submodule (#886) * Update cumulus * Inbound queue benchmarks (#876) * Start with inbound channel benchmarks. * Add method to set execution header storage for benchmark test. * Working on benchmarks * Basic working version * Cleanup * Removes cleanup. * Adds some comments for Alistair. * Adds branch name. * Makes note * Test transactions * Cleaning up beacon client deps. * Clean up comments. * Tests cleanup. * Fixes non-benchmark test runs. * Cleanup. * Update fixtures and generates benchmarks. * Revert relayer logs. * Cleanup BenchmarkHelper impl and inbound queue dependencies. * fmt * Cleanup imports. * Cleanup imports. * Touch * Adds weights in inbound queue pallet. * Fix tests. * Update cumulus. --------- Co-authored-by: claravanstaden <Cats 4 life!> * Fix test * Fix parachain build * Move BalanceOf outside of pallet * remove benchmark for non existing method * downgrade cargo.lock to match cumulus * fix benchmarks * Clara/sno 552 (#887) * Spacing * Spacing * Undo typo. * Minor updates. * Adds comment about IrrelevantUpdate. * One more comment. * Update error name. --------- Co-authored-by: claravanstaden <Cats 4 life!> * Halting & resuming bridge pallets (#883) * Halting & resuming bridge pallets * Ignore .env * Remove .env * Some polish * Set owner of bridge pallets * Update cumulus * Relax RANDAO_COMMIT_DELAY for local setup * Update cumulus * Update cumulus * Fix test * Fix Warnings * Fix test * Fix build & format * Fix benchmark test * Check for duplicate versions of substrate and polkadot (#891) * modified pre-commit * fixes * testing * testing * testing * fixed tests * Format * Some fix * Update cumulus * Update cumulus --------- Co-authored-by: Clara van Staden <claravanstaden64@gmail.com> Co-authored-by: David Dunn <26876072+doubledup@users.noreply.github.com> Co-authored-by: Alistair Singh <alistair.singh7@gmail.com>
* initial * added tests * handle local accounts and pallets
* Catching customized error reverted in solidity * Fix building error * Improve error log * Revert "Fix building error" This reverts commit 5dc75e0. * Some polish
* Update inbound queue benchmarks. * Update inbound queue benchmarks. * Simplify code. * Fix benchmark test. * Updates cumulus. * Cleans up test. --------- Co-authored-by: claravanstaden <Cats 4 life!>
* Improve Beefy tests * Update gas snapshot * Split test fixture * Update snapshot * Decode mmr leaf from commitment file * Regenerate final bitField * Update foundry remove ffi * Update test remove hardcode check
* Check vset len on ticket against relevant vset len * Order methods by expected use * Sort errors * Add mocked tests * Add comments about zero-value tickets * Move helpers back * Swap final length checks for initial id checks * Fix handover stale commitment test
* update gateway to registry * fixed test * fmt * make agents relative to the relaychain * use address(this) * fmt * log out reciept and drop sent amount * update cumulus * use real agent ids * create agents on initialize * Revert "create agents on initialize" This reverts commit e53557d. * update agents and fix abi encode * encode with enum * fmt * update cumulus * fix encoding * fix tests * update cumulus * rustfmt * remove duplicate enum * generate bindings * remove tuple * use framebenchmarking v2 * updated cumulus
* Improve documentation of code comments * Refactor snowbridge-core crate * Add more comments * Add final newline
* Make core/contracts js independent * Clean dependencies * More cleanup * Fix ci * remove submodules * move contracts dir * foo * forge install: forge-std v1.6.0 * forge install: openzeppelin-contracts v4.9.2 * forge install: ds-test * forge install: canonical-weth * Move contracts dir * improve contract-types package * rename * refacta * foo * update docs * fixes * foo * fix imports --------- Co-authored-by: Vincent Geddes <vincent.geddes@hey.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Several major changes:
Gateway.sol
.All in all, I think this is a major improvement over the old code. There's less code, and its easier to reason about.