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) Synthetic change to test CI #3

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci-bridge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI for Product Bridge"
name: "CI for Product Bridge - synthetic change for testing"

on:
push: {}
Expand Down Expand Up @@ -27,5 +27,5 @@ jobs:
version: nightly

- name: Run Foundry tests
run: forge test
run: forge test --disable-block-gas-limit
working-directory: smart-contracts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Debug/

.trunk/**
!.trunk/trunk.yaml
**/.env
27 changes: 27 additions & 0 deletions docs/zilbridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Zilbridge/XBridge integration

Check failure on line 1 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

prettier

Incorrect formatting, autoformat by running 'trunk fmt'


Check notice on line 3 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD012)

[new] Multiple consecutive blank lines
## CrossChainManager extensions

The currently deployed CCM on Ethereum does not contain functions to register lockProxy extensions.

Check notice on line 6 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD013)

[new] Line length

These can be run remotely from the `counterpartChainId` (in `lockProxy`), currently set to 5 (which is presumably Carbon).

Check notice on line 8 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD013)

[new] Line length

This means we need to either proxy or replace it.

Replacing it is undesirable, because the address of the CCM is baked into the configuration files for the relayers.

Check notice on line 12 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD013)

[new] Line length

My first attempt was to proxy it with a `CCMExtendProxy`, but this doesn't work, because:

Check notice on line 14 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD013)

[new] Line length

* To upgrade you have to call `ccmProxy::upgradeEthCrossChainManager()`

Check notice on line 16 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation
* (side-note: this calls the _current_ `eccm.upgradeToNew()` which hands ownership of the CCM data (proxied by the CCM contract) to the CCMExtendProxty, which now needs to hand it back to the old `ccm`)

Check notice on line 17 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation

Check notice on line 17 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD013)

[new] Line length
* Subsequent calls through the `CCMExtendProxy` need to use the original `ccm` state, and therefore have the `CCMExtendProxy` as `msg.sender`.

Check notice on line 18 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation

Check notice on line 18 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD013)

[new] Line length
* But there is no way to make the `CCMExtendProxy` an owner of the `ccm`.

Check notice on line 19 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation

The second attempt is to write a new CCM contract which duplicates the
original CCM and contains the new functions. Sadly, this means that
someone needs to remember what the whitelist parameters were, because
it is a map that does not emit events and we thus can't work out what
is in it.


Check notice on line 27 in docs/zilbridge.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD012)

[new] Multiple consecutive blank lines
16 changes: 16 additions & 0 deletions smart-contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# UCCB Contracts

Check failure on line 1 in smart-contracts/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

prettier

Incorrect formatting, autoformat by running 'trunk fmt'

The contracts are split into 2 sections:

Expand Down Expand Up @@ -134,6 +134,22 @@

To deploy the `TokenManagers` on new chains the `LockAndReleaseTokenManagerUpgradeableV3` and `MintAndBurnTokenManagerUpgradeableV3` on each end of the chain if not already there. The initializer function needs to be added to these functions to initialize the owner and setting the gateways necessary. Then a new deployment script can be created and used accordingly.

### ZilBridge

`zilbridge` contains contracts used to assume the functionality of
ZilBridge. The tests for zilbridge are mostly over in the parallel
`zilbridge-hardhat` directory, because a lot of them depend on Scilla
contracts and forge does not yet support Scilla.

`zilbridge/1` are taken from:

- [lockproxy.sol](https://etherscan.io/address/0x9a016ce184a22dbf6c17daa59eb7d3140dbd1c54#code)

Check notice on line 146 in smart-contracts/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation
- [ccmproxy.sol](https://etherscan.io/address/0x5a51E2ebF8D136926b9cA7b59B60464E7C44d2Eb#code)

Check notice on line 147 in smart-contracts/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation
- [ccmCrossChainManager.sol](https://etherscan.io/address/0x14413419452Aaf089762A0c5e95eD2A13bBC488C#code)

Check notice on line 148 in smart-contracts/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD007)

[new] Unordered list indentation

And modified for a modern solc so that they will run in our environment.


Check notice on line 152 in smart-contracts/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD012)

[new] Multiple consecutive blank lines
## Creating custom cross-chain messaging protocols

Essentially there are 2 main interfaces on contracts that need to be satisfied to send a cross-chain message from a source chain to the target chain:
Expand Down
Loading
Loading