Hive Mirrornet (a.k.a. Fakenet) is up and running!

in Blockchain Wizardry2 years ago (edited)

Long story short:
Public Hive Mirrornet seed instance is up and running.

p2p-seed-node = seed.fake.openhive.network:2001
--chain-id 42

https://gtg.openhive.network/get/testnet/mirror/

That’s pretty much all you need to start playing with the mirror. Have fun.

If you don’t understand the above, don’t worry, now I’ll try to explain what is all about.

- Of course, such post is a good excuse to publish yet another Hive logo reveal

Nothing is true on the mirror net

It might look the same, it might feel the same, but it’s fake.
The only purpose of its existence is research and development of the Hive ecosystem.
We will break it, shatter it, and re-create it over and over again.
Of course you are very welcome to join and play in this large scale sandbox, but …

YOU HAVE TO BE CAREFUL WITH THE MIRROR

The most important thing is to remember that everything you see in the mirror is fake. Assets are not real and they have no value. Accounts are fake and you shouldn’t assume that @gandalf in the mirror is the same @gandalf on the Hive. Your actions on the Hive can affect the mirror, but things you do in the mirror can’t affect the Hive.
You can do crazy things with your mirror account without a fear of breaking something in the real world, but that’s true as long as you can distinguish the mirror from reality. Also make sure that tools that you are using for chain interaction can tell such a difference.

It’s not that easy to make such a mistake because while the private keys on both networks might be the same and many transactions are the same, there are different chain IDs and resulting hashes, so the TaPoS keeps us from replay attacks, etc.
Given that, it requires some extra effort to shoot ourselves in the foot, but…

”Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe.”

Well, just be careful please. :-)

Testnet vs Mirrornet

Testnet

  • Easy and quick to set up
  • Low resource requirements:
    • Seed node or witness node takes 2GB for block log and 5GB for shared memory file.
    • API node takes extra 3GB for account history storage
    • Hivemind’s database takes 2GB
  • Bootstrap process creates accounts based on mainnet
  • Tool called tinman-gatling can port live transactions from mainnet to testnet to mimic activity
  • A lot of mimicked transactions are going to fail because of huge difference with the mainnet
  • TESTS and TBD as native assets

Mirrornet

  • Way more time consuming to set up, less tools currently
  • High resource requirements (similar to the mainnet):
    • Seed node or witness node takes 500GB for block log and 16GB for shared memory file.
    • API node takes extra 750GB for account history storage
    • Hivemind’s database takes 650GB
  • Initial “conversion” turns mainnet blocks to mirror (i.e. accounts, balances, transactions)
  • Node based converter ports live transactions from mainnet to mirrornet to mimic activity
  • Some of mimicked transactions are going to fail because of small difference with the mainnet
  • HIVE and HBD as native assets (but of course fake)

Recipe for Copy&Paste Experts

# Go to a directory where you want to set up your node
# Create subdirs
mkdir -pv mirror-consensus/blockchain mirror-consensus/snapshot
# Get the block_log
wget https://gtg.openhive.network/get/testnet/mirror/block_log -O mirror-consensus/blockchain/block_log
# Get the snapshot (unpack on the fly)
wget https://gtg.openhive.network/get/testnet/mirror/mirror-consensus-bootstrap.tar.bz2 -O - | tar -xjvC mirror-consensus/snapshot
# Optionally get the block_log index
wget https://gtg.openhive.network/get/testnet/mirror/block_log.artifacts -O mirror-consensus/blockchain/block_log.artifacts
# Get binaries
wget https://gtg.openhive.network/get/testnet/mirror/hived-mirror-develop
wget https://gtg.openhive.network/get/testnet/mirror/cli_wallet-mirror-develop
# Make them executable
chmod -c 755 {hived,cli_wallet}-mirror-develop
# Get configuration
wget https://gtg.openhive.network/get/testnet/mirror/config.ini -O mirror-consensus/config.ini
# Run it for the first time:
./hived-mirror-develop --chain-id 42 -d mirror-consensus --load-snapshot mirror-consensus-bootstrap
# Next time you just need to run
./hived-mirror-develop --chain-id 42 -d mirror-consensus

What's next?

That's just a seed node and a pack of block producers (I'm pretending to be multiple witnesses until they take over), hopefully soon other peers will join (real fake producers), and once we have a fully featured API node running (in the next week or so) - dApps could start to test their stuff.

Sort:  

so? is it a Test site for developers on HIVE before launching their final product?

Way more than that! Currently it's mostly for witnesses, developers and "power users" who are able to play with hived and cli_wallet, but over time it will grow to be a playground for everyone to tests their apps before going doing the same in the real world.
I had not much time for writing so I tried to keep it short and simple with maximum useful information condensed. You can use mirrornet to test everything Hive-related in the environment that resembles real Hive as close as possible.

It's an extremely useful tool then, great work!

나는 여기서 미래의 REPL을 봅니다. 이전에는 거래를 취소할 수 없었기 때문에 불가능했습니다. 이와 같은 것은 REPL과 같은 새로운 개발 도구를 홍보할 수 있습니다. 미러넷에 대해 VM에서 실행되는 HIVE 블로그의 HIVE 개발 코드 조각을 상상해 보십시오. Jupiter Notebook 같은 것. 콘덴서에 내장된 HIVE 노트북일 수도 있습니다. HIVE 콘덴서에서 HIVE 개발 코드를 실행할 수 있다고 상상해보십시오. 실제로 하는 일은 미러넷에 대해 코드를 실행하는 것뿐입니다. 그것은 굉장할 것입니다.

This will be a very interesting & meaningful attempt.
Looking forward to the launch of the first DAPP, maybe it should be https://fakenet.hive.blog?

Something like that, yes, definitely :-)
One thing to keep in mind is that such apps have to use clear indication that it's FAKE.

Hello sir, it seems you are doing something for backend of Hive blockchain. And here i am commenting because I have a doubt i am running ethereum mining with 6 GPU right now in my home and it was running at 24×7 and is there any way to help hive as it was already on for full time ?

Hive doesn't need such heavy computational power to operate (there's no Proof of Work needed, a.k.a. mining, Hive is based on Delegated Proof of Stake).

Noted with thanks :)

Good job!

We have a similar type environment for our EHR (EPIC) and it is a great asset to build and trial things before putting them into production. This sounds fun to learn on.

Very good post

I'm glad you like it, but to get an idea of what it really means you need to catch up a lot about Hive and its mechanics. Please take your time to read the docs and FAQs. Have a nice journey! :-)

Very cool stuff, HIVE is very alive, love it.

I do run a HoneyComb for Larynx and would love to put some energy into this as well. What cloud hardware should I rent to get started working on a node?

disregardfiat had a link to a privex server that was very suitable.

worth running larynx stuff?

Not making any profit, but it's cheap 10$ a month

how much time for set up? Is the claim server thing right?

Yes, take about 1-2 hours if you know how to handle very basic Linux and have a web hosting provider for the domain.

Thanks, sounds doable :D

I pay in Doge via my Hive-Engine Wallet for a PriveX Server and have a couple of free domains left on my Strato Account. If you want one, just say the word.

:)

Depends on what's your purpose, but 24GB RAM / 600GB fast storage is a good starting point for a seed node with basic API capabilities, to get familiar with cli_wallet, etc.

How is the load on the Network? Can I run it from my Network or should it be at a data center?

If we are talking here about mirrornet just for your personal testing purposes, than network traffic is negligible and it's ok to run it anywhere. Well, except that to get it started you would have to download hundreds of gigabytes.

Cool. Are there any testnet public RPC nodes? Mirror.net may be the closest thing without running your own node.

Soon(-ish) (TM)
The current node is just a seed node, without extra plugins, but in fact it listen on default ports (websocket and http) so it can do basic things such as get a block or broadcast transaction.
Other parts of the infrastructure require way more resources and time to set up and I wanted to give it to the public as soon as possible. I'll be posting updates on that.

I just noticed over on discord there is a testnet https://testnet.openhive.network. It's probably safer to use a testnet than a mirror net.

Loading...

Hive Mirrornet (a.k.a. Fakenet). ¿Is this good or bad? ¿What is that fakenet created for? Sorry for my ignorance, but I've doubts about that kind of... ¿Database? It's a database ¿Not?

This is good, a blockchain is a type of a database, but unlike many other databases with CRUD (Create, Read, Update, Delete) it is more like a journal type, where you don't delete, and updates are actually creations referencing old entries.
Fakenet will let us have a very advanced crash test dummy to perform our experiments on it, rather than on the real Hive network.

Now I understand better. Thank you 😊.

Thanks for setting this up gtg!

I trust your sorcery 👍
Cheers!

This reads like a fantasy book...

Nothing is true on the mirror net
YOU HAVE TO BE CAREFUL WITH THE MIRROR

Ah, the wonder of magical made-up realms, whether they're coded or painted with words. Thanks for all you do! 💖

It's great to have something like this 😊 the transactions we will send on it will be all processed or it's just a read only? How long a transaction created on the mirror exist before to be erased?

Yes, it's meant for writing, because all, even the heaviest the read-only testing can be safely done on a private mainnet nodes.
It will be up as long as we need it, during a heavy development times such as before the HardFork we might want to re-initialize it more frequently when we introduce breaking changes, but it's meant to live in parallel to mainnet and always initial state of the mirror will be very similar to mainnet (i.e. every restart).

Ok, thanks for the explanation which gives me more visibility on what can be done on it :)

I like that logo vid.. very in-your-face! the mirror world seems quite multivers like. very cool! :)

Do I see that correctly, the resource requirements range from a raspberry pi 4 4 GB.
So you could also operate an API?

Unfortunately no. Maybe for a simple testnet instance, not a mirrornet instance.
Mainnet and mirrornet requires at least 16-24GB of RAM to operate.

For the mainnet i have a server with 96GB RAM , only for a simpel testnet with api for any test's

untitled.gif

Wow. That's an applause for the Hive Community. I have been looking forward for this great news for so long. Thanks @gtg you made my day and weekend awesome. I watched the YouTube video and it was great job done.

Screenshot_20220430-223528.png

what the h... I'm shocked! This is awesome !!! BTW, While I was reading it seemed quite particular to me how you wrote it, like I imagine someone whispering to me, yes, yes, sooo niceee but be careful...

  • Your post has been selected for the Day By Day rewards
  • Your post will be reblogged multiple times;
  • Every day you will earn @ecency points.

Congratulations @gtg! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:

Post with the highest payout of the day.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Be ready for the 5th edition of the Hive Power Up Month!
Hive Power Up Day - May 1st 2022

Wow wow this is one of the most interesting achievement I've seen today on hive good job and well done


The rewards earned on this comment will go directly to the person sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

This is very cool stuff! Need to follow on this!

It's more like a dummy Hive?

Yes.

Really cool stuff, thanks for the powerful tool, it's a big opportunity for the community.

I don't understand much about this but I would like to know a little more, I'm a musician but maybe music can also do something out there hahahaha my violin can contribute right?

@gtg , thank you so much! this is really helpful.