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

Setup Testnet #38

Open
prosus-money opened this issue Nov 17, 2021 · 8 comments
Open

Setup Testnet #38

prosus-money opened this issue Nov 17, 2021 · 8 comments
Assignees
Labels
test test new features before publish code

Comments

@prosus-money
Copy link
Collaborator

@driquelme

@driquelme
Copy link
Contributor

The error I get when I try to start the linux daemon using the --testnet parameter is:

                                                                     
                            PROSUS MONEY                             
                                                                     
 =================================================================   
                                                                     

2021-Dec-02 14:18:05.738784 INFO    Module folder: ./prosus-daemon
2021-Dec-02 14:18:05.738810 INFO    Starting in testnet mode!
2021-Dec-02 14:18:05.740157 INFO    Initializing p2p server...
2021-Dec-02 14:18:05.740260 INFO    Generated new peer ID: 3899158987322942767
2021-Dec-02 14:18:05.740292 INFO    Network: 44525950-544f-4e4f-5445-001210110110
2021-Dec-02 14:18:05.740322 INFO    Binding on 0.0.0.0:16180
2021-Dec-02 14:18:05.740431 INFO    Net service binded on 0.0.0.0:16180
2021-Dec-02 14:18:05.740459 INFO    P2p server initialized OK
2021-Dec-02 14:18:05.740483 INFO    Initializing core...
2021-Dec-02 14:18:05.740784 INFO    Blockchain not loaded, generating genesis block.
2021-Dec-02 14:18:05.758336 ERROR   Coinbase transaction doesn't use full amount of block reward: spent 8.796093022207, block reward is 70.368744177663
2021-Dec-02 14:18:05.758435 INFO    Block-hash 3bec24663b05b9433e3b226069f6c4a562dbb3ffb62806e2e20c932ff62c0436 has invalid miner transaction
2021-Dec-02 14:18:05.758473 ERROR   Failed to add genesis block to blockchain
2021-Dec-02 14:18:05.758502 ERROR   Failed to initialize blockchain storage
2021-Dec-02 14:18:05.758531 ERROR   Failed to initialize core
2021-Dec-02 14:18:05.758608 INFO    Mining has been stopped, 0 finished
SwappedVector cache hits: 0, misses: 0 (-nan%)
daniel@miner-2:~/prosus.money$ ```

@yerkobits
Copy link
Member

Some blockchains like Bitcoin, Ethereum, BSC... have their own testnet network (preconfigured).
Bitcoin: https://blockstream.info/testnet/
Ethereum: https://ropsten.etherscan.io/
BSC: https://testnet.bscscan.com/

Prosusmoney does not have an official testnet, so any developer can create one. Someday (now?) we must create a public testnet, like those other mentioned projects.

In my next comment I leave the guidelines to compile a testnet version.

@yerkobits
Copy link
Member

yerkobits commented Dec 2, 2021

To compile a Prosusmoney Testnet, we need two machines:

Machine 01

... with the previous hash saved.

... and change with your host-port value for Machine 2 . For example:
const std::initializer_list<const char*> SEED_NODES = { "192.168.0.20:26180" };

... and erase (or do comment) the chekcpoints.

const std::initializer_list<CheckpointData> CHECKPOINTS = {
//	{ 1000000, "0000000000000000000000000000000000000000000000000000000000000000" }
};
  • Compile and build.

Machine 02

... change with your host-port value for Machine 1 . For example:
const std::initializer_list<const char*> SEED_NODES = { "192.168.0.10:26180" };

  • Compile and build.

@driquelme
Copy link
Contributor

driquelme commented Dec 3, 2021

Can we pass the host and port parameters in the command line instead of modifying CryptoNoteConfig.h?

@yerkobits
Copy link
Member

Can we pass the host and port parameters in the command line instead of modifying CryptoNoteConfig.h?

Yes, but I recommend testing this on a "Machine 03"

@driquelme
Copy link
Contributor

driquelme commented Dec 11, 2021

The following error shows up when connecting with the cli wallet after following the instructions and setting up two daemons.

Error line: Failed to query blocks: NodeErrorCategory:5, Internal node error

In context:

2021-Dec-10 20:59:35.404806 INFO    Starting...
2021-Dec-10 20:59:35.405183 INFO    Removing outdated pool transactions...
2021-Dec-10 20:59:35.406139 INFO    Outdated pool transactions processed
2021-Dec-10 20:59:35.406390 INFO    Generated new wallet: Prosus1kR45Qpz....
2021-Dec-10 20:59:35.406390 INFO    view key: 
2021-Dec-10 20:59:35.408482 ERROR   Failed to query blocks: NodeErrorCategory:5, Internal node error
2021-Dec-10 20:59:35.412070 INFO    **********************************************************************
Your wallet has been generated.

@driquelme
Copy link
Contributor

I followed the instructions and rebuilt everything from scratch, but the error still appears when I generate a wallet.

@yerkobits yerkobits added test test new features before publish code bug Something isn't working labels Dec 11, 2021
@driquelme
Copy link
Contributor

Ok so after applying all modifications I got it working. I wasn't using a prosus-wallet that was compiled with the modifications.

@yerkobits yerkobits removed the bug Something isn't working label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test test new features before publish code
Projects
None yet
Development

No branches or pull requests

3 participants