Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SLX, a fork of PIVX #336

Closed
olegmitrakhovich opened this issue Dec 16, 2019 · 17 comments
Closed

Add support for SLX, a fork of PIVX #336

olegmitrakhovich opened this issue Dec 16, 2019 · 17 comments

Comments

@olegmitrakhovich
Copy link

olegmitrakhovich commented Dec 16, 2019

Hello,

Would it be hard to make blockbook work with SLX cryptocurrency? https://github.com/slatecurrency/slate

SLX is a fork of PIVX. It looks like PIVX already works with blockbook, so maybe there is no need to even code anything just setup blockbook as PIVX but run a slated instance instead.

@martinboehm
Copy link
Contributor

Sure, go ahead and create a pull request.

@olegmitrakhovich
Copy link
Author

olegmitrakhovich commented Dec 18, 2019

thank you for the response, is there a pull request number for PIVX? just want to have something follow along. @martinboehm

@martinboehm
Copy link
Contributor

PIVX pull request is in this repo, I am quite sure that you can do the github search for it yourselves :)

@olegmitrakhovich
Copy link
Author

thank you for the response, I found the two commits later :)

random-zebra/PIVX-BlockExplorer@818288c

random-zebra/PIVX-BlockExplorer@24bedfe

@olegmitrakhovich
Copy link
Author

I made this fork https://github.com/SlateEntertainmentGroup/SLX-blockbook. I don't fully understand how the parser_test.go works. I am getting this error:

--- FAIL: TestParseBlock (0.00s)
slateparser_test.go:449: ParseBlock() block size: got 463, want 492
slateparser_test.go:453: ParseBlock() block time: got 1504351235, want 1578427428
slateparser_test.go:457: ParseBlock() number of transactions: got 0, want 2

where is the "463" and "1504351235" are coming from?

Any help is appreciated. please and thank you :) @martinboehm

@martinboehm
Copy link
Contributor

The data to parse are loaded by helperLoadBlock from the folder testdata.

@olegmitrakhovich
Copy link
Author

thank you for the response that got me a lot further.

I am now fully synced and attempting to install blockbook with "sudo apt install ./blockbook-slate_0.3.1_amd64.deb". I am getting this error:

"The following packages have unmet dependencies:
blockbook-slate : Depends: libgflags2v5 but it is not installable
E: Unable to correct problems, you have held broken packages."

I did some research and found this issue:

#45

I did go into this dockerfile and replaced "debian: 9" with "debian: 10" (I am running "Debian GNU/Linux 10 (buster)". here is the commit:

SlateEntertainmentGroup@3847838

I am still getting the same error (depends: libgflags2v5)

Not sure if I have to rebuild and resync again or something else is going on? @martinboehm

@olegmitrakhovich
Copy link
Author

olegmitrakhovich commented Jan 9, 2020

rebuilding did work, blockbook installed successfully :)

"internalState: database is in inconsistent state and cannot be used" is my next error but I think its due to low memory, I checked other issues looks like increasing memory will help. I am assuming this because blockbook stopped syncing around blocks which have over 3k transactions in them and bulk import probably failed due to low memory.

@olegmitrakhovich
Copy link
Author

adding more memory did work! the explorer works great so far on main net....but how do I switch over between nets? I want it to sync with testnet.

@martinboehm
Copy link
Contributor

martinboehm commented Jan 10, 2020

Install 2nd instance of Blockbook for the testnet.

@olegmitrakhovich
Copy link
Author

not sure how to do that, do I just "make all-slate --testnet" ? I added all the code already to make blockbook support slate on testnet. @martinboehm

@martinboehm
Copy link
Contributor

make all-slate_testnet

@olegmitrakhovich
Copy link
Author

perfect. thank you for the quick response. @martinboehm

@olegmitrakhovich
Copy link
Author

what about "systemctl start backend-slate.service" how is that command different when starting blockbook on testnet? at this point "systemctl start backend-slate.service" just starts to sync with main net. @martinboehm

@martinboehm
Copy link
Contributor

martinboehm commented Jan 12, 2020

make all-slate_testnet will create two debian packages, one for backend, one for blockbook. They are called something like backend-slate-testnet_version.deb and blockbook-slate-testnet_0.3.1_amd64.deb. You install and run the backend first, let is synchronize and then install the blockbook package. If your config in slate_testnet.json is correct, everything will work fine.

@olegmitrakhovich
Copy link
Author

thank you for the help. In my slate_testnet.json file I had "protect_memory": false ... and it should have been "protect_memory": true .... testnet explorer is working great now. I will clean up some of my commits and make a pull request soon.

@martinboehm
Copy link
Contributor

Closing. Make a PR when you are ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants