Skip to content

Conversation

@nazar-pc
Copy link
Member

@nazar-pc nazar-pc commented Nov 9, 2022

This is a huge PR that updates Substrate. Due to long time since last update there were quite a bit of changes that required many small and medium size tweaks, primarily caused by following:

  • New type for weights (lots of updates everywhere)
  • Runtime, Call and Origin were renamed in many places (again lots of updates everywhere)
  • Trie level cache replaced state cache (small tweaks in a few places)
  • BlockId replaced with Block::Hash in numerous places (lots of updates)
  • libp2p was updated in Substrate, so I had to update it in our networking and there were a few deprecations that I avoided with type aliases, also Sr25519 crypto is replaced with stock Ed25519
  • Clap was also updated for consistency (had to update it in node, updated in farmer as well, though wasn't strictly necessary, fixed some CLI argument conflicts), criterion is still pulling an old version though, so we didn't get rid of it completely just yet

There were some other tweaks upstream that I applied to our codebase as well in commits after the first one that compiles and runs. One interesting side effect was with temporary directories due to Substrate reusing it rather than generating a new one on each invocation, so our execution tests were all competing for the same directory, had to make paths explicit there.

This PR is a mess, but thankfully most of the changes are either in lock file or trivial.

Substrate fork we have was rebased against upstream that contains many of the tweaks we carried, we only have two patches on top of upstream right now, please take a look if you want:

Code contributor checklist:

@i1i1
Copy link
Contributor

i1i1 commented Nov 9, 2022

Can you update the CI and install protoc for libp2p? Here is a good action for that:

      - name: Install Protoc
        uses: arduino/setup-protoc@v1

@nazar-pc nazar-pc marked this pull request as ready for review November 9, 2022 14:34
@nazar-pc
Copy link
Member Author

nazar-pc commented Nov 9, 2022

Should be good for review now

vedhavyas
vedhavyas previously approved these changes Nov 9, 2022
Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

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

Amazing work!
LGTM!

liuchengxu
liuchengxu previously approved these changes Nov 9, 2022
@nazar-pc nazar-pc dismissed stale reviews from liuchengxu and vedhavyas via 45fa7fc November 10, 2022 01:32
@nazar-pc
Copy link
Member Author

Fixed docs compilation (to a degree) and some warnings (that were there before), but now stuck with brson/wasm-opt-rs#114
Will update PR once this is fixed upstream.

@nazar-pc
Copy link
Member Author

UPD: We're simply running out of disk space now on Windows 🤔

@nazar-pc
Copy link
Member Author

Added one more patch to Substrate fork (also submitted as paritytech/substrate#12672) that should allow us to decrease disk space usage, especially with growing number of runtimes. Let's see if it helps.

Copy link
Contributor

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

LGTM.

I tested the DSN version of the bootstrap node, farmer, and node. All works as expected.

i1i1
i1i1 previously approved these changes Nov 10, 2022
@nazar-pc nazar-pc dismissed stale reviews from i1i1 and shamil-gadelshin via b986209 November 14, 2022 19:02
@nazar-pc
Copy link
Member Author

Okay, force-pushed one last time, just added workaround for Windows not deleting files (see last commit mentioned in PR description).
CI should pass now, if it does I'll merge main in later and it should be good to go.

Thanks for the patience here everyone!

# Conflicts:
#	crates/sp-domains/src/lib.rs
#	crates/subspace-networking/src/create.rs
#	domains/client/domain-executor/src/system_bundle_producer.rs
#	domains/client/relayer/Cargo.toml
#	domains/client/relayer/src/lib.rs
#	domains/client/relayer/src/worker.rs
#	domains/pallets/domain-tracker/src/tests.rs
#	domains/primitives/domain-tracker/Cargo.toml
@nazar-pc
Copy link
Member Author

Conflicts were minor, fixed them and this should be ready to go

@nazar-pc nazar-pc merged commit 15f318e into main Nov 15, 2022
@nazar-pc nazar-pc deleted the update-substrate branch November 15, 2022 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants