The renaming matches the forthcoming repo consolidation for the main cpp-ethereum project which we have been talking about for quite some time. That reorganization will see the code for eth return to the cpp-ethereum repo which was its home from its inception until October 2015.
You can read all about the reboot and repo shuffles at the brand new Ethereum C++ Homepage which I’ve been working on for the last week or so.
Are you looking forward for the Homestead transition on Pi Day?
So are we, and if you have any ARM devices (SBCs, Linux mobile, etc) and would like something to play around with this week, here’s a fresh round of Homestead-friendly cross-built eth-v1.2.2 binaries for you to try out.
Thank you, Wanxiang Blockchain Labs, for your generous contribution to the eco-system!
An extract from the funding application
“Bringing Ethereum to the resource-constrained devices which are likely to dominate Edge Computing in the coming era of IoT”
We have seen prototypes in this area from Project ADEPT and Slock.it, but they have all been running full nodes on devices which are near-desktop capability in terms of CPU, storage and network specifications. I want to build the real thing – starting with the Gear S2 smartwatch as a flagship device.
Want to know anything about ARM ABIs? Neither did I, but in the process of trying to get these cross-compiled Eth binaries working across a wide-range of mobile, wearable and SBC devices I have learnt more than I ever wanted to know. I did it for you. And for the children.
And it isn’t over! No sir, it is not. I still haven’t actually got it working on my flagship target device, the Samsung Gear S2 smartwatch. Because the S2 ships with GCC 4.6 runtime libraries. From GCC 4.6.1. Which was released in June 2011. Of course it does. So I will have to go down another rabbit-hole there, of building GCC against a non-default sysroot.
So, what are these “two ABIs”? They are the armel and armhf calling conventions, which can respectively be boiled down to “software floating-point” and “hardware floating-point”. Those form the two “kingdoms” of ARM, with armel dying, but not dead, with older hardware, Android 32-bit and Tizen still clinging onto the carcass. Oh, and there is ARMv6 for the first generation of Raspberry Pi, where everything else in the universe is ARMv7.
You don’t want to hear anymore about this nonsense, and I don’t want to write anymore, but here is a handy table which contains my very hard-won knowledge of “what is what” for our main target platforms, and for the existing binaries which we are generating. Click on the image for a readable version!
The Light Client (LES) sub-protocol is still being refined. When we have working LES implementations the flood-gates will really open on the range of devices which can run Ethereum nodes.
Getting to Light Client on mobile/wearable is the ultimate goal of all the work which doublethinkco is doing, with the Samsung Gear S2 smartwatch as the flagship target device.
Zsolt Felfoldi gave a very interesting presentation on his Light Client progress at the recent devcon1 conference. The YouTube video of his presentation is unavailable at the moment, but will likely be available again in an edited form soon.
To my knowledge there is no C++ implementation of LES underway yet. That was an intentional decision. No doubt the C++ implementation will get underway as soon as the details of the sub-protocol are settled, and the go implementation has been given a decent workout.
Bob Summerwill and Anthony Cros have been working on Ethereum C++ cross builds since September, after the ETHDEV team came to the conclusion that the work-in-progress on Light Client needed to be rebooted as a sub-protocol, rather than as extensions to the existing ETH protocol.
That change of plan left us with no real way to contribute directly to Light Client development. We needed to get ourselves out of the way while that design work was brewing and to do something else which was useful and would help the ultimate end-goal.
So we took a detour, and focused on porting the existing C++ client code to as many mobile and wearable devices as we could, with a primary focus on Linux over Android and iOS.
Having the existing full client available in as many places as possible means that we can just “turn on” Light Client on numerous devices as-and-when the C++ implementation of the new sub-protocol is available.
Perhaps we can even help with that Light Client work directly ourselves?
That was our original intention, but we were just too early for that to be practical. Maybe it makes sense now?
Our detour has gone very much as we expected. That earlier article also talks about what cross-builds are and why they are important.
We realized quite early that our needs were massively aligned with John Gerryts (EthEmbedded), who needed to cross-builds for the final phase of his Devgrant for embedded devices. So we’ve been working closely together most of the time, and especially in the last week or so, as we have had binaries to share.
We’ve been working with both the go and C++ development teams, but because of Péter Szilágyi‘s excellent work with xgo, there has been close to no need for us to do any work there.
Why not just leave things to the go team?
It’s because C/C++ is the foundation of all systems programming and performance critical applications, and it has been that way since the very first UNIX releases, and will likely be that way for many years to come. C/C++ is always the first language on any new platform so code written in C/C++ has universal reach, all the way down to the very smallest of devices.
We are finally starting to get some innovation and competition in the systems programming space with go and rust, but it is exceedingly unlikely that those languages will ever make a significant dent in the wearable, embedded and IoT space.
With the renaissance of Modern C++, it is possible to write C++ which is maintainable and understandable as long as you are disciplined and stick to best practices. It isn’t easy, and elements of C++ like the pre-processor, compilation model, lack of cross-platform build system and lack of cross-platform packaging system make C++ “not fun” to work with. Bob has been doing it for nearly 20 years though. Not a problem.
Doesn’t Moore’s Law mean that this kind of “close to the metal” performance doesn’t matter anymore?
Nope, because we’re running into Amdahl’s Law, which essentially states that the potential speedups for a given application are ultimately limited by the work which can only happen in a serial manner. Having 16 or 32 cores doesn’t help if your application isn’t of a type which can benefit from massive parallelism.
In addition, raw performance is going to be critical for the resource-constrained devices which are going to be spawning in their billions in the next few years with the growth of IoT and smart devices.
Why the focus on mobile Linux, not Android?
Isn’t Android an open source platform, and shouldn’t that be the primary focus?
Everybody already knows about Apple’s control-freak nature. Ethereum may or may not ever be allowed into the App Store. They have got form. Don’t be surprised if they ban iOS and watchOS applications which use Ethereum. It is a mortal threat to their monopolistic control of all commerce and applications on THEIR platform. We’ll port to iOS and watchOS, but it might never be shippable.
Anyway, to get to the point, we’re nearly done. We’ve got our first running C++ code-compiled builds working now, and will extend that across the rest of the test matrix in the coming days and weeks (months? I hope not!)
So what have you built?
Dockerfiles which let you cross-build ARM binaries which are already known to be working on Raspberry Pi 2, Raspberry Pi Zero, Odroid XU3 and Wandboard Quad. We are working towards working binaries for a very significant range of devices.
Following the go team’s lead, we are likely to start publishing cross-build binaries too, as soon as they are in a stable enough state for that to be worthwhile. It would be very useful to have matching cross-build binaries for the forthcoming eth-1.2.0 release, for example.
If you have further mobile/wearable/embedded devices which you think need some Ethereum love, please tweet us and we’ll see what we can do!
Yesterday I spent some time improving that front-page so that the project is close to self-describing. We’re getting very close to having working binaries, and are attacking multiple platforms in parallel. We have (currently broken) releases which anybody is welcome to use to help to with our debugging efforts.
We’re working with EthEmbedded to get this cross-build infrastructure working for single-board-computers as well as for our mobile/wearable target devices. Join us in the Gitter porting channel if you would like to help out, or just follow along.
I know I’m a bit late to the party, and that it is November 2015, not November 2013, but my Jolla Phone has arrived in Vancouver!
I had to order the phone indirectly, for delivery to my parent’s house in the UK, and then re-mailed from there. I have heard some whispers of 3G working for people in Canada, and will report back on whether I can get that going with my Rogers provider, or if I’m tied to 2G.
Ironically, getting the Sailfish cross-build working on the Jolla Phone is likely my quickest route to a Tizen Gear S2 version. Because the whole platform is built for developers, not for dumb consumers! No GDB on the Gear S2, for example.