Megadrive Update

in blurt •  4 years ago  (edited)

Working image released:

https://megadrive.blurt.foundation

Problem Identified

Although readline is specified in conanfile.txt, cmake is still configuring make to link to the readline and libncurses shared object files in the build system filesystem. It is possible to embed the built readline and ncurses libraries and when that is done, builds go back down to taking 1.5 minutes.

But now builds take 34 minutes, and everything works because we build in a special purpose Arch container and then run the built binaries built there.

Basically today's state is:

Arch (build) ----> Arch (run)
Debian (build) ----> Debian (run)
Ubuntu (build) ----> Ubuntu (run)

It is also possible to run the build inside a container, and mount a volume so that ccache is used successfully despite building in a container, and possible to use a cross-compiler.

New Build System Created

Screen Shot 2020-12-19 at 12.38.27 AM.png

Lite Image Coming

Currently the build is 1.6GB. It is too much. It could be as little as 100MB I reckon, but initially the lite image is more like 500mb. The images are downloaded after boot time. So it's like:

  • Boot
  • First boot script runs
  • Docker starts
    • Blurtd starts
    • Condenser starts

It runs Blurt and condenser in docker, using Systemd.

For fun, it'll run a whaleshares node by default, as well. Why not make a splash?

PS: WLS NEEDS WITNESSES!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  
  ·  4 years ago  ·   (edited)

Hi dear development departement.

Downloaded Megadrive, flashed the SD, then logged in with SSH to Megadrive, 50 min after Pi boot. Only Power and LAN are connected to the box.

systemctl shows me a lot of units but two red lines:

UNIT LOAD ACTIVE SUB DESCRIPTION
blurtd.service loaded failed failed blurtd
firstboot.service loaded failed failed Starport Pi - firstboot configuration

Maybe this is okay but you told me once, the node will start up all automaticly. Condenser.service is loaded and running.

Going to bed now. Be back just in a few hrs.

Always yours
Crashtest Dummy afrog

Well we can see from that is that it is not working.

You may wish to try rebooting.

  ·  4 years ago  ·   (edited)

Woohoo!

After starting blurtd manually Blurt Network started. But there are 10 assert exceptions. I guess, I just have to wait until the database is completly loaded.

STARTING BLURT NETWORK


initminer public key: BLT5QRsKZp7TFNQdTj7VbpGHWxNL3Eq4zmfER4vJPBpK5VMbrprn8
chain id: cd8d90f29ae273abec3eaa7731e25934c63eb654d55080caff2ebb7f5df6381f
blockchain version: 0.2.0


2236242ms chain_plugin.cpp:486 plugin_startup ] Starting chain with shared_file_size: 8589934592 bytes
2236242ms chain_plugin.cpp:616 plugin_startup ] Opening shared memory from /root/.blurtd/blockchain
2236473ms database.cpp:198 open ] 10 assert_exception: Assert Exception
boost::filesystem::exists(snapshot_path): Snapshot '/root/.blurtd/blockchain/../snapshot.json' was not found.
{"path":"/root/.blurtd/blockchain/../snapshot.json"}
database.cpp:2461 init_genesis

{}
database.cpp:2625 init_genesis
2236473ms database.cpp:198 open ] args.data_dir: /root/.blurtd/blockchain args.shared_mem_dir: /root/.blurtd/blockchain args.shared_file_size: 8589934592
2236474ms chain_plugin.cpp:625 plugin_startup ] Error opening database. If the binary or configuration has changed, replay the blockchain explicitly using --replay-blockchain.
2236474ms chain_plugin.cpp:626 plugin_startup ] If you know what you are doing you can skip this check and force open the database using --force-open.
2236474ms chain_plugin.cpp:627 plugin_startup ] WARNING: THIS MAY CORRUPT YOUR DATABASE. FORCE OPEN AT YOUR OWN RISK.
2236474ms chain_plugin.cpp:628 plugin_startup ] Error: {"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"database.cpp","line":2461,"method":"init_genesis","hostname":"","timestamp":"2020-12-19T10:37:16"},"format":"boost::filesystem::exists(snapshot_path): Snapshot '${path}' was not found.","data":{"path":"/root/.blurtd/blockchain/../snapshot.json"}},{"context":{"level":"warn","file":"database.cpp","line":2625,"method":"init_genesis","hostname":"","timestamp":"2020-12-19T10:37:16"},"format":"","data":{}},{"context":{"level":"warn","file":"database.cpp","line":198,"method":"open","hostname":"","timestamp":"2020-12-19T10:37:16"},"format":"rethrow","data":{"args.data_dir":"/root/.blurtd/blockchain","args.shared_mem_dir":"/root/.blurtd/blockchain","args.shared_file_size":"8589934592"}}]}

  ·  4 years ago  ·  

Yes.

Now, after the blurtd command again, I see the blockchain is loading. This will take one or two days until the database is complete.
Then I will try to start condenser.
By the way, how will I start this part?

Condenser should already be running:

http://megadrive.local:8080

ought to take you there, should even be able to click that link.

  ·  4 years ago  ·   (edited)

Is not working on http://megadrive.local:8080
nor on http://alarm.local:8080

But I am in megadrive-light modus now!

  ·  4 years ago  ·   (edited)

get one of the new images:

https://megadrive.blurt.foundation/megadrive-light/

"light" may prove more reliable anyhow. runs everything in containers.

Check status with

docker ps

  ·  4 years ago  ·  

[root@alarm ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8cb545436d0a faddat/wls-pi "/usr/bin/whaled --d…" 4 minutes ago Up 4 minutes gifted_hermann
[root@alarm ~]#

  ·  4 years ago  ·  

252ec3096c71 faddat/wls-pi "/usr/bin/whaled --d…" 35 minutes ago Up 34 minutes zealous_lalande

There's an issue with that image....

And with the one that I made to fix it.

I'll get it straight but it surely isn't straight yet.

  ·  4 years ago  ·  

I can wait. Call the crashtest dummy when you think it works. Or shall I test the last one (megadrive-light2020-12-19-17:21:04.img.xz)?

  ·  4 years ago  ·  

Good morning dear world!

Thanks Jacob. Aha, aha! After reboot (10 minutes after first boot):

first-boot-complete.target loaded inactive dead First Boot Complete
Yes, it seems this part has done its work.

blurtd.service loaded failed failed blurtd
Does it fail, or do I have just to wait, until the chain is completly downloaded?

Give my regards to your hardworking boy. May you always be well fed with chips while you work.

It shouldn't fail.

can you debug like:

journalctl -u blurtd --no-pager

and post the log here? If it is an older image it could be a permissions issue.

  ·  4 years ago  ·  

[root@alarm ~]# journalctl -u blurtd --no-pager
-- Journal begins at Tue 2020-12-15 00:20:35 UTC, ends at Sat 2020-12-19 13:18:28 UTC. --
Dec 19 13:15:00 alarm systemd[1]: Started Whaleshares.
Dec 19 13:15:02 alarm docker[239]: WARNING: Error loading config file: .dockercfg: $HOME is not defined
Dec 19 13:15:27 alarm docker[239]: docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/usr/bin/blurt": stat /usr/bin/blurt: no such file or directory: unknown.
Dec 19 13:15:27 alarm docker[239]: time="2020-12-19T13:15:27Z" level=error msg="error waiting for container: context canceled"
Dec 19 13:15:27 alarm systemd[1]: blurtd.service: Main process exited, code=exited, status=127/n/a
Dec 19 13:15:27 alarm systemd[1]: blurtd.service: Failed with result 'exit-code'.
Dec 19 13:15:27 alarm systemd[1]: blurtd.service: Failed to schedule restart job: Unit Docker.service not found.
Dec 19 13:15:27 alarm systemd[1]: blurtd.service: Failed with result 'exit-code'.

  ·  4 years ago  ·  

I did a restart before. You know, the same with the last Megadrive image.

  ·  4 years ago  ·  

It is a great effort on your part all the work you are doing, however this should enhance the creation of nodes and especially strengthen the blockchain. Hopefully more enthusiasts will decide to take a step towards the future of Blurt.

Megadrive will be the consolidation of a better future for the block chain. Blurt to the Moon

  ·  4 years ago  ·  

why will it be running the whaleshares node initially...?

It runs both.

It'll run more, sooner than later.

  ·  4 years ago  ·  

This would certainly add up to help strengthen our ecosystem. It's a matter of time.
Kudos @jacobgadikian

  ·  4 years ago  ·  

please tell me, where to put these html files in your megadrive-light folder?

Loading...