Bitcoin Forum
April 19, 2024, 09:52:54 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [req] Thin bicoin deamon  (Read 1373 times)
rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 06, 2012, 08:07:37 PM
 #1

It is possible to change bitcoin daemon to use less memory and disk space?
I`m thinking about loading and keeping last 24hrs of block, not a full blockchain.
It would be awesome for fresh quick installation ie to make one transaction on some random machine, also for mining (solo or local pool) purposes.

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
1713563574
Hero Member
*
Offline Offline

Posts: 1713563574

View Profile Personal Message (Offline)

Ignore
1713563574
Reply with quote  #2

1713563574
Report to moderator
1713563574
Hero Member
*
Offline Offline

Posts: 1713563574

View Profile Personal Message (Offline)

Ignore
1713563574
Reply with quote  #2

1713563574
Report to moderator
1713563574
Hero Member
*
Offline Offline

Posts: 1713563574

View Profile Personal Message (Offline)

Ignore
1713563574
Reply with quote  #2

1713563574
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713563574
Hero Member
*
Offline Offline

Posts: 1713563574

View Profile Personal Message (Offline)

Ignore
1713563574
Reply with quote  #2

1713563574
Report to moderator
austonst
Member
**
Offline Offline

Activity: 76
Merit: 10



View Profile
June 06, 2012, 10:21:43 PM
 #2

I think the "bitcoin daemon" is tied in strongly to the Satoshi client and couldn't be too easily adapted to be lighter. Have you looked into lighter clients such as Electrum? Most of them use a client/server approach so the server can quickly tell the client their transaction history without the client needing the full blockchain. Sounds like what you're looking for. Also, I don't think it would be as simple as storing the last 24 hours of blocks as a lighter blockchain. What if all of the inputs to your address took place a few days ago? How would you know how many bitcoins you had to spend? I'm pretty sure there are other technical problems with transaction verification and stuff, but I don't know enough details.

rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 06, 2012, 10:31:51 PM
 #3

Electrum is a GUI client, i need only a daemon.
Mostly to make low-demanding mining host. No need for history, just get work, current block and pass found one to network Smiley

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
austonst
Member
**
Offline Offline

Activity: 76
Merit: 10



View Profile
June 06, 2012, 10:48:03 PM
 #4

Electrum does have a full featured command line interface. You can use `electrum addresses`, `electrum balance`, and more complex commands for creating wallets, sending transactions, and so on. I have electrum and its dependencies (python and a few crypto tools) installed on a flash drive for quick command line usage.

I don't know about mining, though. I would think in mining from a pool, the pool's server would send out the block to be hashed so the clients don't need the whole blockchain. Then again, I haven't mined in ages and could be mistaken.

rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 06, 2012, 11:02:20 PM
 #5

Yes, it have command line utility... but I`m trying to setup a p2pool node and need RPC daemon functionality. Smiley

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
austonst
Member
**
Offline Offline

Activity: 76
Merit: 10



View Profile
June 06, 2012, 11:08:49 PM
 #6

Alrighty then, sorry I wasn't much help. Good luck with the project.

Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
June 07, 2012, 10:44:53 AM
 #7

Wthout the full blockchain database, you cannot verify whether incoming blocks are valid. As a miner, it is exactly your task to do that.

If you'd use a more lightweight bitcoin node, you would potentially create blocks which contain invalid transactions, which would cause your generated blocks to be stale.

I do Bitcoin stuff.
rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 07, 2012, 07:05:40 PM
 #8

RU sure? In my understanding of protocol only last valid block is need to try close next one.
If client will download from network last 100 blocks and verify them what are the odds that something will be wrong? To make it potentially dangerous someone have to create many invalid blocks in chain in network - and this is impossible.

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
June 07, 2012, 08:24:19 PM
 #9

There are different levels of checking of the blocks.

You can check whether the block is well formed by checking the nonce is correct and that the previous block hash in the new block actually matches a previous block you have received.  This is the level of checking that the lightweight clients typically do.

The miners do a much deeper check - they go through each transaction checking that each of the inputs is actually available to spend (ie no other transaction ANYWHERE spends it). To do this level of checking you need all the transactions i.e the whole blockchain.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 07, 2012, 09:17:59 PM
 #10

Miners have to do that? I`m not convinced... Last time I check miners only searching nonce to close current block on network, not digging in history to check that transaction is possible.
But in fact checking for possibility of transaction is doable is on bitcoin client side... Thin client I thinking of need have that ability (sending BTC) disabled - because he can not check for that...
In  fact  for thin mining daemon I need:
Code:
getaccountaddress
getblock
getblockcount
getblockhash
getblocknumber
getdifficulty
getinfo
getmininginfo
getwork

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
June 07, 2012, 10:36:25 PM
 #11

Say you are bitcoin node and only know about the last 100 blocks.

I send you a transaction that double spends a transaction output from a block 200 blocks ago. If you put it into your block, solve it and broadcast it, it would not get accepted by other nodes as it has a double spend in it.  You have to eliminate that transaction from your list of unconfirmed transactions that you are solving for.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 07, 2012, 10:41:47 PM
 #12

Ok, my bad. Looks like I not read scpec too carefully...
It is impossible then?

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
June 08, 2012, 09:38:19 AM
 #13

I think the confusion comes from what you understand under "miner".

Originally, it meant a bitcoind node that ran generation routines. After time, the generation code was split off to specialized programs that communicate with bitcoind using getwork. After time, that bitcoind became hidden behind a pool interface, and the only thing miners did was connect somewhere to request a candidate block, and check nonces.

However, when you're mining using p2pool, you need to run that bitcoind yourself. The fact that miners do verify transactions before putting them in a block is essential to the bitcoin system. You risk creating a block that will not be accepted by other nodes.

I do Bitcoin stuff.
ThePok
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
June 08, 2012, 09:59:31 AM
 #14

BUT you could create Blocks without Transaction, just generating the 50BTC Smiley

Uncool but sure possible without the hole blockchain Smiley
rav3n_pl (OP)
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 08, 2012, 10:43:41 AM
 #15

However, when you're mining using p2pool, you need to run that bitcoind yourself. The fact that miners do verify transactions before putting them in a block is essential to the bitcoin system. You risk creating a block that will not be accepted by other nodes.
Then if I found a block I need to verify all transactions inside it b4 I can spread "block solved" message?
Looks like my idea is a fail :/

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!