Author

Topic: Is this in any way possible? server side (Read 1981 times)

newbie
Activity: 14
Merit: 8
October 14, 2017, 03:28:51 PM
#1
Is it possible to initialize a blockchain and store to run in its own thread, and add wallets to it as they are created in fullNode Mode? then disconnect a wallet as a user leaves and reconnect, catchup to the chain and display balances when they come back?


i cant just have all wallets constantly added to the blockchain and watched as long as the blockchain is running, there would be millions of event listeners on the blockchain and that could never be done properly. every time a block comes in the server would lag to oblivion alerting 1000000 different event listeners, i need the wallets to catchup when they are added back. i need them to recognize the blocks when they are added back to the peergroup and chain, i can never re-download the blockstore when doing this, its not spv.


So how can i replay the chain to the wallet when it is added in WITHOUT redownloading an entire blockchain, or even any of the blockchain? i only need the blocks after GetEarliestKeyCreationTime() but it seems if i dont have the wallet added when the blocksDownloadedEventListener is called, the wallet does not see any blocks, ever.


if its not possible, when i update bitcoinj to make it possible (if thats even possible) i will post the code.




i could give each wallet its own blockchain but its not working, but i want a centralized store and peergroup. i cant have 1000 user connections each accessing its own peergroup and blockstore, id need a supercomputer server. in theory you would think a blockchain loads the neccessary parts of a store in to memory.

i can grab address balance and UTXOs with a store, is it possible to manually grab all this and load a wallet so i can still sue the wallets send and receive functionality?


I want to use the hundreds of thousands of blocks and transactions i have saved in the database and replay that to the wallet without having to fetch thousands of blocks from the network for every wallet every time it is loaded. i know they all work on event listeners, but what is the point of a store if i can never go back and replay it?


edit: i am also willing to hire somebody for help with some of these issues if it is more advanced.
Jump to: