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

Fix fendermint compilation issues #499

Merged
merged 16 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 15 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
6 changes: 1 addition & 5 deletions .github/workflows/fendermint-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ jobs:
cache-prefix: publish-${{ hashFiles('rust-toolchain', 'rust-toolchain.toml') }}
cache-suffix: ${{ hashFiles('**/Cargo.lock') }}

- name: Cache Solidity ABI arfiacts
uses: actions/cache@v2
with:
path: ./contracts/out
key: contracts-abi-${{ hashFiles('./contracts/src/**/*.sol') }}
# Not restoring Solidity artifact cache because of supply side attack potential.

# - name: Docker Build
# run: make docker-build
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ipc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,15 @@ jobs:
cache-prefix: ipc-${{ matrix.make.name }}-${{ matrix.os }}-${{ matrix.rust }}-${{ hashFiles('rust-toolchain', 'rust-toolchain.toml') }}
cache-suffix: ${{ hashFiles('**/Cargo.lock') }}

- name: Cache Solidity ABI arfiacts
uses: actions/cache@v2
with:
path: ./contracts/out
key: contracts-abi-${{ hashFiles('./contracts/src/**/*.sol') }}

- name: Generate Solidity ABI artifacts
run: >-
[ -d contracts/out ] || (cd contracts && make compile-abi)

- name: ${{ matrix.make.name }}
run: cd ipc && make ${{ matrix.make.task }}
10 changes: 10 additions & 0 deletions .github/workflows/ipld-resolver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,15 @@ jobs:
cache-prefix: ipld-resolver-${{ matrix.make.name }}-${{ matrix.os }}-${{ matrix.rust }}-${{ hashFiles('rust-toolchain', 'rust-toolchain.toml') }}
cache-suffix: ${{ hashFiles('**/Cargo.lock') }}

- name: Cache Solidity ABI arfiacts
uses: actions/cache@v2
with:
path: ./contracts/out
key: contracts-abi-${{ hashFiles('./contracts/src/**/*.sol') }}

- name: Generate Solidity ABI artifacts
run: >-
[ -d contracts/out ] || (cd contracts && make compile-abi)

- name: ${{ matrix.make.name }}
run: cd ipld-resolver && make ${{ matrix.make.task }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Each major sub-repository in this monorepo has their own Makefiles;
# instead of making an even more compilicated common one, let's delegate to them.

SUBTREES := contracts fvm-utils ipc ipld-resolver fendermint
SUBTREES := fendermint ipc ipld-resolver fvm-utils contracts

test: $(patsubst %, test/%, $(SUBTREES))

Expand Down
1 change: 1 addition & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ crytic-export/
.env
broadcast/
out/
binding/src
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aakoshh When contracts/bindings change and a dev is adjusting the SDK and other downstream components, is the expectation that they'll locally generate the bindings and adapt the dependent code, but only check in the latter and not the former? Then the CI build would generate these before trying to build and would push the updated bindings?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is up for debate, but currently I tried to follow what you said about not checking in generated code at all. So you are expected to update the SDK and Fendermint, check in those changes, but not check in the Ethers generated bindings, and CI will build it but also not push it either, it will never appear on Github.

That said, if it's useful to be able to share links to the Rust code, we can check it in. The reason I didn't do it is because people reported it changes for no reason.

However today I noticed that binding/src/lib.rs changes in a predictable way: when @cryptoAtwill pushes the modules are in alphabetical order; when I push they are in the order of appearance in build.rs. So I think there is something that formats the generated code on his end, it's not the fault of ethers being different.


node_modules

Expand Down
1 change: 0 additions & 1 deletion contracts/.out/AccountHelper.sol/AccountHelper.json

This file was deleted.

1 change: 0 additions & 1 deletion contracts/.out/Address.sol/Address.json

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion contracts/.out/ConsensusType.sol/ConsensusType.json

This file was deleted.

1 change: 0 additions & 1 deletion contracts/.out/Constants.sol/Constants.json

This file was deleted.

Loading
Loading