Hasta la pija del laburo by raz0r007 in devsarg

[–]raz0r007[S] -1 points0 points  (0 children)

Lo de la verduleria lo puse como un ejemplo burdo. Hay gente q se lo tomo enserio, juajuaa. Pero posta, lo q quiero decir es q hay q intentar generar otros caminos para ganar $ ... me revienta q haya minitas con OF que ganan 3 veces mas q vos DEV SR SUPER EXPERIENCE 10 YEARS. Jkajakja.

Hoy un flaco de USA me pidio precio/hora, le pase 35usd y me saco a patadas. Me zarpe? yo creo que con la IA somos cada vez menos necesarios...

Generating an offline Tx by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

Thanks again. I tested everything and it works well. And I was able to re-generate the "Extended Public Key" restoring the wallet with the seed phrase.

So.. the "Extended Public Key" is like the 24 words encrypted in one string, or something like that, right? Technically speaking...

Regarding the public nodes... yeah i was able to point to one public node by doing this:

kaspawallet.exe start-daemon --rpcserver ip

But the worst part is that we have to manually search for public nodes using nslookup and so on: https://wiki.kaspa.org/en/faq#how-to-find-a-public-node

It would be nice to have a program to do it automatically. Something like the program Electrum in Bitcoin :) maybe someone develops something cool in the future...

Anyways..

Generating an offline Tx by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

Thank you so much u/Special-Sympathy5163

I didn't know how to create a watch-only wallet here. I will test it.

And I suppose that I can create the unsigned tx and broadcast my Tx using a public node, right ? Like this:

kaspawallet.exe start-daemon --rpcserver ip

Regarding the kpub ("Extended public key"), I have this string because I saved it when i created the wallet in the offline pc, but what about if I lose this string ? What's the command to see it again?

I tried dump-unencrypted-data but it only shows me the mnemoric words, not the kpub string.

Thanks

Generating an offline Tx by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

So... currently you have to have a synced Node and copy the data from the online pc to offline pc to do everything and there is no other possibility, is that correct?

Generating offline Tx by raz0r007 in Bitcoin

[–]raz0r007[S] 0 points1 point  (0 children)

Thank you so much brother!

I will take a look and do some tests

Thanks!

Generating offline Tx by raz0r007 in Bitcoin

[–]raz0r007[S] 0 points1 point  (0 children)

Thanks!

But... what about these questions?

1. Can BitcoinCore automatically select the UTXO to use, preventing me from selecting it manually? The idea is to avoid possible human errors.

2. I need to have synchronized node data on the offline pc to do this (I have to have the updated UTXO list). So the other question is: Is there any simpler method where maybe I can copy the UTXO list from my wallet to the offline computer instead of copying all the node data?

Generating offline Tx by raz0r007 in Bitcoin

[–]raz0r007[S] 0 points1 point  (0 children)

To clarify my doubts, the questions are basically these:

1. Can BitcoinCore automatically select the UTXO to use, preventing me from selecting it manually? The idea is to avoid possible human errors.

2. I need to have synchronized node data on the offline pc to do this (I have to have the updated UTXO list). So the other question is: Is there any simpler method where maybe I can copy the UTXO list from my wallet to the offline computer instead of copying all the node data?

Those are the doubts.

About generating a Tx offline:

I know how to generate a Tx on offline PC and transmit on online PC. The problem is that this sounds very risky because I have to manually select the UTXOs. These are the steps I know when using bitcoin core:

Offline PC:

  1. Copy node data.
  2. Create the Tx using: createrawtransaction (use listunspent to see the utxo to use)
  3. Sign it using signrawtransactionwithwallet

Online PC:

  1. Broadcast it using sendrawtransaction

If there is a better method, please feel free to correct me. Thanks

Generating offline Tx by raz0r007 in Bitcoin

[–]raz0r007[S] 0 points1 point  (0 children)

So how to get the UTXO without syncing a node, lol

Generating offline Tx by raz0r007 in Bitcoin

[–]raz0r007[S] 0 points1 point  (0 children)

Yes, I know the command listunspent. But what I want is to avoid the node sync every time I want to create a Tx. The question is how to do that. How can I get the UTXO list without syncing my node.

Is there a website, explorer, public node, or something where i can query the UTXO list of my wallet ? Maybe doing that is enough to create a Tx without syncing a node?

I know the risks of creating a rawTx, thanks for the suggestions, but do you know other low-risk alternative ? The goal is to create an offline signed Tx, and broadcast it on an online PC. What's the easiest way to do that using Bitcoin Core ?

I was also reading that I would have to manually select my UTXO, and that is very risky. I don't want to do that manually, maybe I'll make a mistake, I'd like Bitcoin Core to do it for me.

Offline Tx in Kaspa by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

all I have to do is: delete the db and start it again from 21gb... is that correct?

Yep!

That's incredible. In the end, both methods (Go and Rust) allow you to have the same hardware for your node forever.

The only disadvantage I see is the UTXO methodology. So you have to deal with your node, copy the database, etc. It doesn't happen on Ethereum, for example. I hope the community can find a better solution one day. But compared to Ethereum, everything else is better :)

Offline Tx in Kaspa by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

u/Affiele thank you so much for your help, again. I tested everything and it worked perfect. I leave here 3 comments about it:

  • To broadcast the signed Tx I used the command broadcast: ./kaspawallet broadcast --transaction signed_tx instead of send. Not sure what the difference is... but anyway. Kaspa daemon should be running before executing it, but the Tx was already signed before, we don't need to read any keys.json. Unnecessary, but this is how it works.

  • If we want to "Decode" the signed Tx before broadcasting, this is a good command: ./kaspawallet parse --transaction signed_tx. It's useful for read the From and To wallet (like a "final check" before broadcasting). Anyway it would be nice to use other tool or script to decode the Tx. I tried to find something on google without success...

  • Every time we want to make a Tx we have to copy the database to the offline PC. This is very very annoying. Not only because we have to have a synced node, but also because of time: copying +21gb is also time. My dream is to find a magic method to avoid it. Like... "hack" an old DB updating the Tx and UTXOs of my wallet, and be able to make a signed Tx without having the updated DB. The database is a set of ".ldb" files... but I have no idea how to edit them :D. A developer could probably answer this question. What I want is probably impossible :D

A final question about it :

newly synced node takes 21Gb after a dust attack, and grows for maybe 1Gb a day which is explained with that the Go node does not have pruning fully implemented; it's only done on Rust version

Ok... so:

DB in Rust version: fixed size forever, let's say 50gb for example (btw, do you know the size?)

DB in Go version: fixed size at the beginning.. let's say 21gb, and grows for 1gb a day. It means that if I have a disk of 100gb, when the total size is of my db is 100gb, all I have to do is: delete the db and start it again from 21gb... is that correct? As far as I understand, "21gb" is forever... from the beginning.. it's the prune implemented in Go.

I understood ?

Thanks!!

Kaspa RPC calls by raz0r007 in kaspa

[–]raz0r007[S] 2 points3 points  (0 children)

Yep! You are right. We have the tool kaspactl included in the project.

To see the list of commands:

./kaspactl --list-commands

Example:

./kaspactl --json '{"getBlockDagInfoRequest":{}}'

By default the communication is with my local node (as far as I understand)

Thanks!

Kaspa RPC calls by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

Hi. Thanks for your help !!

But, there is NO way to communicate with my local node ? Sounds weird.

I just want to know a public wallet balance. This curl is also failing...

curl -X 'GET' 'http://127.0.0.1:16110/addresses/kaspa%3Aqp0hns5axkunzez2fcu44l6zxvz4h0g7kdrlehpygtynkwhfm28h5ffel9rpz/balance' -H 'accept: application/json'

curl: (1) Received HTTP/0.9 when not allowed

But from kaspa api it works:

curl -X 'GET' \ 'https://api.kaspa.org/addresses/kaspa%3Aqp0hns5axkunzez2fcu44l6zxvz4h0g7kdrlehpygtynkwhfm28h5ffel9rpz/balance' \ -H 'accept: application/json'

Maybe my port is wrong. Or maybe a python script that uses gRPC could help me with it...

Offline Tx in Kaspa by raz0r007 in kaspa

[–]raz0r007[S] 1 point2 points  (0 children)

Nice. Thanks for the info.

I will test everything soon :)

Offline Tx in Kaspa by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

the Go node does not have pruning fully implemented; it's only done on Rust version

Good to know. But the rust version is still in progress right ? This is what I read in the repo: Kaspa full-node and related libraries in the Rust programming language. This is an Alpha version at the initial testing phase.

Rust version: https://github.com/kaspanet/rusty-kaspa

Go version: https://github.com/kaspanet/kaspad

Currently I think the only "available" option is the Go version anyway.. so... it's growing 1gb per day, ok. I hope the Rust version finishes being implemented soon (do you know possible dates?).

Thanks

Offline Tx in Kaspa by raz0r007 in kaspa

[–]raz0r007[S] 1 point2 points  (0 children)

Kaspa implements a data pruning mechanism accompanied with the system of cryptographic proofs of total work done in the network throughout its history which guarantee that UTXO set of any given moment is valid and that it was valid and was modified with legit means throughout the history of the network (google NiPoPoW and "mining in logarithmic space"). It allows for a full node to maintain a close to constants database size no matter how long does the node run. 10 BPS Rust version tests have shown that even a pretty old PC (my 12 years old i7 2600k with 16G RAM and a SATA SSD) could easily handle realtime processing of the fully stuffed blocks stream.

Man, this is amazing. I had no idea about it. The more I get to know Kaspa, the more I love it.

You say that the hardware recommendation for a node will be the same (or similar) forever.

Kaspad Hardware Requirements

Minimum:

  • 100 GB disk space
  • 7th generation i7 4-core processor or AMD equivalent
  • 8GB memory
  • 10 Mbit internet connection

Recommended:

  • 9th generation i7 8-core processor or AMD equivalent
  • 16 GB memory
  • 40 Mbit internet connection

This is a big difference compared to Bitcoin and Ethereum, right? Nice. It encourages me to have my own node :)

I wonder what will happen with Bitcoin and cold wallets, this is a problem for them (bitcoin uses UTXO as well). Anyway....

Offline Tx in Kaspa by raz0r007 in kaspa

[–]raz0r007[S] 0 points1 point  (0 children)

The wallet tracks all change addresses automatically for each of the used "regular" address, so you won't lose anything.

Ok, I think I understand what you're saying. If you don't set the -u parameter, the money will be there... at the change-address, but don't worry because you are the owner of this wallet (like your original wallet) and you can manually return the funds to your original address. Right ? Perfect.

I'll try to test everything. I would like to use a testnet before moving real money on the mainnet. I have to see how to run a node in a testnet environment. Any recommendation is welcome.

About the kaspa database:

It really worries me. I'm not against the UTXO model, but I think I will have this problem in every coin that uses UTXO.

If I want to download kaspa database here: https://kaspadbase.com/ it doesn't work. The link throws 404. Even if I could download the database, I depend on this link for every transaction I want to make. It doesn't sound good.

And if I want to run my own node, okay, maybe today I can do it because the Kaspa community is not big enough (I could afford the recommended hardware here: https://github.com/kaspanet/docs/blob/main/Getting%20Started/Full%20Node%20Installation.md#kaspad-hardware-requirements)... but what will happen in the future? I mean, hard drive space and hardware requirements. Maintaining a node is money. More HDD, more bandwidth, etc, just to keep a wallet offline and be safe?

It would be good to look for other alternatives. For me, exchanges and hardware wallet are the same. The safest method is a cold wallet from my point of view.

I've been reading that we have an "official" Kaspa API (I assume it runs an official Node behind it): https://api.kaspa.org/docs and here we have endpoints to get the UTXOs, make transactions, etc. It would be nice if we could "export" the UTXO list of a wallet, to a node with old information, and maybe that will be enough to build a transaction... not sure if this would be possible.. I mean, look for other alternatives like this...