Time is the most valuable currency, Substrate requires a lot of hardware resources - that is how things are going. I want to rise a bit side topic, but in my opinion important because of time.
What is recommended hardware for Substrate development? According to my research one of the best CPU is: AMD Threadripper 3970X 32 x 3,7 GHz for local environment. I know that it is possible to setup environment remotely via cargo-remote plugin.
Happy to hear about your hardware setup that is Substrate-oriented in long term horizon. Personally I do not recommend Substrate development on only laptop battery…
I started out with an Intel i5-7400 and 16gb of RAM, it was painfully slow for substrate compiling but I got by with it, I have since then upgraded to an AMD Ryzen 9 5950x and 32GB of RAM, plus a MacBook Pro with the m1 pro chip for when I’m traveling. Both of these machines allow me to compile substrate runtimes in under 5 minutes from 0 and a lot less from incremental compiles. I do recommend the Ryzen and also the MacBook Pro, they are both great at the job!
I was using M1 Mac mini and that’s already a good enough developer experience. I am currently using Macbook Pro with M1 Pro and generally ok with the compile time. Note that you are not supposed to compile the whole runtime all the time. Majority of the time are building unit tests which are much faster.
yeah m1 max for me is way faster than my i5 (first time blockchain dev so didn’t even know what machine i needed). what other software based techniques - os-specific linkers, compiler switches, substrate features (as in toml), caching (like sccache) - do you guys use esp for substrate dev? how does your usual dev cycle look like?
i think we should have a talk on setting up the substrate dev env, if it isnt there already, so that newcomers to substrate/other rust-based blockchains can get an idea prior about how to setup the optimum machine.
If you don’t have multiple different target directories that you delete every 5mins, sccache/cachepot don’t bring anything. These are basically tools to have one shared target directory, but they only help when your project local target directory is empty (which isn’t the case after the first build). If you run them sccache/cachepot in some cluster to have distributed compilations it could improve your compile speed.
I also have a MacBook M1 Pro 64Gb with native Linux as mobile dev machine. At home I have a PC with some Ryzen from 2020 and 64Gb as well. In general the early build phase of Substrate benefits from having a lot of CPU cores, but later in the pipeline where we don’t have that much parallism anymore Single core performance is crucial. As you don’t recompile all the crates all the time, single core performance should be the crucial factor for day to day work.
I looked at this recently and zld is now archived. The best linker nowadays is apparently one called sold, but it is paid and I didn’t bother to set it up. But the default linker that comes with Xcode 15 is now much faster than it was.