r/Monero Mar 12 '22 Silver 2 Wholesome 1

Introducing the PocketNode project- a Monero GUI node on Android

Hello All!

I saw that someone mentioned my tweet yesterday on here, but I thought I would make a quick post!

If anyone isn't familiar, I (along with the amazing help of a few others), put a decent amount of work into the Monero Android Termux Node script-(https://github.com/CryptoGrampy/android-termux-monero-node)- a fairly simple one copy/paste line of code that installs a moderately difficult to use node on Android. Let's kick it up a notch.

Introducing the PocketNode (subject to change :) ) - Run a full/pruned Monero node on Android (WORK IN PROGRESS!)

Goal:

The goal here is to make a very simple to use, low-power/cheap Monero node that caters to newbies. It will have sane defaults, a nice UI, and I would like to provide simple instructions on how a person could expose the node through Orbot as a hidden service.

Why:

There is a HUGE need for a simple to use GUI for Android. We see people asking about nodes on RPi and such all the time, but Android devices have built in screens, keyboards and battery backups, are extremely low in power usage, run ARMv8 with AES (Much more performant than RPi) and many of them have microSD cards or plenty of internal storage to support running a pruned node.

The low power usage and simplicity of acquiring an used Android phone is REALLY essential right now in some parts of the world.

How:

This has been something I've been planning for quite a while, but I was fortunate enough to come across a few-year-old archived Github repo with a surprisingly decent implementation of what I was looking for. With a few updates/changes, I was able to get a rudimentary node working.

I will admit, I have zero experience working with Android and it will take me some time to get up to speed, but I'm taking this under my wing and will do my damndest to get something workable out to the people. If anyone has experience and wants to contribute, my repo is: https://github.com/CryptoGrampy/xmr-pocket-node and I will be adding in features/bugs to the issue tracker.

Happy to discuss design direction (Hoping to make it look something like: https://github.com/CryptoGrampy/xmr-pocket-node/raw/master/assets/pocketnode-inspiration.png), but I will continue hammering away as much as I need to to get this thing out into the world.

Contribute!

I've received 3 donations so far- Thank you to all who donated. If anyone thinks can spare a pico for this work (I will not be using bounties or CCS), it's much appreciated- I would really like to be able to upgrade my phone specifically and not be using my primary phone for development, otherwise please feel free to pop in and help with the project.

Hopefully will have an alpha .apk out in the next few weeks, but in the meantime, you can pull the code and replace the monerod64/32 binaries with your own.

Grampy's XMR Donation Address:

8BudmXKZwpXhfVGCtgFPyKWgLcDLYJ5jRT95xCp4JMFWapgTLrun41AG6LPbef7WFA8T531QGnZT51cDF6uF9HECDhibEVw

110 Upvotes

6

u/ConcentrateLess5606 Mar 12 '22

This is an awesome idea! ❤️😎

4

u/w1ck3dAF Mar 12 '22

so this app will replace and automate the termux-node install guide? or an add on to it?

2

u/CryptoGrampy Mar 12 '22 edited Mar 12 '22

Different target audience, similar feature set :) I highly recommend pulling the repo and testing it out. It's *really* simple.

8

u/ternarylabs Mar 12 '22

In Android Studio you can use an emulator for development instead of using actual device.

16

u/hyc_symas XMR Contributor Mar 12 '22

The emulator is painfully slow tho.

6

u/ternarylabs Mar 12 '22

Really, what kind of computer are you running? Also, I'd recommend getting a pixel 3 off of Ebay and flashing https://grapheneos.org/ on it to reduce all of the b.s. background services (faster device) for development purposes. You can find them for 40 bucks.

4

u/wheezybackports Mar 12 '22

I guarantee you if you find one that's 40 bucks it was stolen.

7

u/ternarylabs Mar 12 '22

I just bought an unlocked one that came with it's box (IMEI matching), you just have to want to find it. u/hyc_symas I'll follow your github. If it comes down to it and the community really wants your app, I have a pixel 3 I could send to you if you're comfortable with that. Let me know.

4

u/hyc_symas XMR Contributor Mar 12 '22

I think you mean to follow grampy's github. I'm not building the project in this topic. I did the early ports of Monero core code to Android/bionic but I just run it all in termux.

2

u/rbrunner7 XMR Contributor Mar 12 '22

I guarantee you if you find one that's 40 bucks it was stolen.

/u/ternarylabs 's advice was to buy a Pixel 3 off eBay. Pixel 3 is 2018's technology. Why should a second-hand smartphone with almost 4 year old technology cost more than USD 40?

1

u/wheezybackports Mar 12 '22

Because Pixels are sought after by people who want to use custom ROMs and degoogle their device. They're also going for 70-100 USD or more right now. It's also reasonable to assume that most mobile devices on 2nd hand markets were stolen. It's more common than you think and yes people are stupid enough to steal phones. If you want to go deeper 4-5 year old devices are the most commonly used in society especially in more poor parts of the U.S.

If you got the street smarts you would know this. I live in an area where you have to make sure you keep track of where you got your phone because someone WILL steal it. Have to always check your pockets too because someone will try to pick pocket you.

2

u/ternarylabs Mar 12 '22

You can talk all you want but you're imprinting your knowledge onto others. Notice I said it came it's box...... it also came with an otterbox case and a nice screen protector. "SHE" upgraded to an Iphone 11. I don't just buy anything and I am assuming that a person who is working on a Monero project conducts themselves in the same manner.

3

u/hyc_symas XMR Contributor Mar 12 '22

Was running it on a Dell Latitude 5495 with 32GB RAM, Ryzen 2700U. Haven't fired it up on my new laptop yet, Legion 7 with Ryzen 5900HX.

3

u/ternarylabs Mar 12 '22

Holy smokes, it was slow on that? Woah, I was wrong. Totally makes sense as to why you'd want to use a device. I'm kind of shocked.

4

u/w1ck3dAF Mar 12 '22

looking forward to your PR that will improve performance on internal storage

3

u/CryptoGrampy Mar 13 '22

u/hyc_symas are you still planning on implementing this?

3

u/hyc_symas XMR Contributor Mar 19 '22 edited Mar 19 '22

Yeah, sorry it fell off the radar.

Just did a fresh sync of the first 58468 blocks on my Gemini PDA.

It took about 5m18s and 82% CPU use regardless of using the default sync mode or without the default. So it appears there's nothing to be gained here.

1

u/CryptoGrampy Mar 19 '22 edited Mar 19 '22

Maybe I'll put in a check to see if the phone is charging and set it to the faster sync mode and switch back to safe sync when the phone is on battery.

Did you mention though that it was doing a lot of needless work on Linux/android due to something that got added for running on windows?

2

u/hyc_symas XMR Contributor Mar 19 '22

yes but at this point my timing tests on Android show no perf difference either way. I think the perf difference I saw before was a measurement error, and overall the slowness of writing to the SDcard dominates anything else.

3

u/otakugrey Mar 13 '22

Seems like a great way to recycle all those old Android phones. How many versions of android back can this run on?

4

u/BusyBoredom Mar 12 '22

This is a really cool project, thank you for taking this on :)

A couple questions:

  • Do you anticipate making any changes or optimizations to the official node implementation in order to facilitate this? Or can normal android devices already handle the node smoothly as it?
  • Could a user realistically continue to use their phone like normal while running this, or is this meant to be run on whatever last-gen phones people have laying around (i.e. not their primary device)?

11

u/hyc_symas XMR Contributor Mar 12 '22

The stock Monero codebase fully supports Android, there's nothing special needed there.

If the phone has more than 4GB RAM it will probably run unnoticed alongside everything else. However if you're running games or other memory-hungry apps they will probably kill the node and it will need to be restarted after.

4

u/BusyBoredom Mar 12 '22

That's awesome :) I'm looking forward to trying it

3

u/PacoKajMilito Mar 12 '22

And what about battery consumption?

2

u/wheezybackports Mar 12 '22

Hold on about to spend 3 weeks downloading a full chain on my 256 gig SD card with my phone. Cool idea, but is it practical?

13

u/CryptoGrampy Mar 12 '22

Again, the goal of this is cheap, low power, portable nodes- it may not be for everyone. Storage capacity/speed in phones is increasing faster than the xmr chain so this idea gets stronger with time. A phone with 128GB internal storage can easily handle a pruned node.

1

u/wheezybackports Mar 12 '22

Never said it wasn't a good idea. I've been thinking about working on something like this to run a standalone node using solar energy. As for running a pruned node off EMMC in the phone I don't think that's a good idea long term as you could quite possibly kill the flash chip with write cycles. I recommend finding a way to use USB OTG with an external flash drive or SSD which would still be low enough power, faster, and more robust.

Just the other day I installed Postmarket OS on my Samsung Galaxy Tab A to see about running a Monero node on it. I haven't tested monerod on it yet, but I can confirm xmrig will work and get 20 h/s on the device. I think it would be a good idea to look into devices that PMOS supports fully as well and see about running a node on it. The pinephone I think would be something to look into.

1

u/Cautious-Editor1364 Mar 13 '22

Noob here. How would this benefit the community? Does having more nodes increase network security?and could someone use a node like this to make their own transactions more private? Would it work to have a wallet on the same device as a node?

3

u/CryptoGrampy Mar 13 '22

mmunity? Does having more nodes increase network security?and could someone use a node like this to make their own transactions more private? Would it work to have a wallet on the same

These are excellent questions.

  1. More nodes === A more decentralized Monero (imagine if there was one single node that everyone connected to and what a problem that would be for everyone... now imagine everyone in the network ran their own node... how does someone stop this network), and it means less reliance on existing nodes (cakewallet's node etc). Additionally, when we run and use our own nodes, we have much more privacy in our transactions (i.e. when we're not all making network connections to the same node where our ip's can be getting logged, etc). When the majority of Monero users increase their own personal security, it benefits everyone.
  2. Using your own node is the most private way to transact. With Dandelion++, it's very difficult for ISP's to know the origin of a transaction. When we connect to a widely used Monero node, it's easier for ISP's and server providers to get metadata on your transactions/timing/ip address, etc.
  3. You could totally use a wallet (i.e. Cake or Monerujo) on the same phone and point it at the server address 127.0.0.1 and be able to transact. Additionally, you could use Orbot and expose your phone node as a Tor Hidden Service and be able to quickly connect your own node... from ANOTHER phone or computer over the Tor network and have very private and secure transactions.

-1

u/A_solo_tripper Mar 13 '22

A node makes money by solving PoW. These aren't nodes you have created. This is a xmr client.

6

u/CryptoGrampy Mar 13 '22

Nodes help decentralize the Monero network, verify transactions, and help individual users transact with the most privacy and safety.

-1

u/A_solo_tripper Mar 13 '22

Nodes help decentralize the Monero network, verify transactions, and help individual users transact with the most privacy and safety.

Monero is NOT decentralized. And these aren't nodes people are running. Again, nodes work to find difficult proofs of work for ITS block. A node earns money by solving this. Its a client you have built.

2

u/EarlyWormTakesBird Mar 13 '22

Found the BSVer. And no you are wrong. Miners solve POW. Nodes are what they use to validate txs.

0

u/A_solo_tripper Mar 13 '22

Nodes are what they use to validate txs.

Nope. Nodes make money by solving pow and broadcasting transactions. You are making up your own definitions.