blockbook icon indicating copy to clipboard operation
blockbook copied to clipboard

Adding Hydra blockckchain support

Open martin-key opened this issue 3 years ago • 7 comments

Incentive

Hydra blockchain is one of the growing projects in Europe. It's using Bitcoin codebase combined with Ethereum capabilities for smart contracts. The chain is using PoS Consensus mechanism.

Implementation

Based on the similarities to QTUM which is already supported by blockbook the only required thing was to change parameters and fix tests. I have already verified locally that everything runs ok and that Hydra Blockbook is being synched correctly.

Notes

  • PR can be merged with squash and merge for clean code history
  • I have added my name and contact as maintainer, so if there are any issues just text me

martin-key avatar Feb 17 '22 12:02 martin-key

@martin-key Hi, it seems to me that the integration tests are missing in the PR.

martinboehm avatar Mar 20 '22 12:03 martinboehm

Hi, sorry, there were some other coins integrated to Blockbook, which caused conflict in the files and also took the ports which you have chosen. Could you please resolve the conflict and choose different ports, for example xx63?

martinboehm avatar Apr 01 '22 21:04 martinboehm

@martinboehm all the requested changes has been implemented. Please check the branch and the tests and let me know if I have to do anything else.

martin-key avatar Apr 08 '22 11:04 martin-key

Hi @martin-key, when I try to build the backend using Docker on Debian11, I get the following errors:

dpkg-shlibdeps: error: cannot find library libboost_filesystem.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydra-cli (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libboost_thread.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydra-cli (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libboost_chrono.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydra-cli (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libevent-2.1.so.7 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydra-cli (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libboost_filesystem.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libboost_program_options.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libboost_thread.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libboost_chrono.so.1.71.0 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libdb_cxx-4.8.so needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libevent_pthreads-2.1.so.7 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libevent-2.1.so.7 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot find library libgmpxx.so.4 needed by debian/backend-hydra/opt/coins/nodes/hydra/bin/hydrad (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: cannot continue due to the errors listed above

Any idea how to resolve it?

martinboehm avatar Apr 30 '22 21:04 martinboehm

I have no idea, but I will try to reproduce it. I've used Debian as well but got no issues.

martin-key avatar May 09 '22 22:05 martin-key

@martin-key I checked and looked at hydrad, but it doesn't seem to be built for debian. Maybe it will be helpful. https://github.com/Hydra-Chain/node/tree/hydra/depends

~/bin$ ls
hydra-cli  hydrad  hydra-qt
~/bin$ ldd hydrad
	linux-vdso.so.1 (0x00007ffe3135c000)
	libboost_filesystem.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 (0x00007faacac00000)
	libboost_program_options.so.1.71.0 => not found
	libboost_thread.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 (0x00007faacabd4000)
	libboost_chrono.so.1.71.0 => not found
	libdb_cxx-4.8.so => not found
	libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007faaca8fe000)
	libevent_pthreads-2.1.so.7 => not found
	libevent-2.1.so.7 => /lib/x86_64-linux-gnu/libevent-2.1.so.7 (0x00007faaca8a6000)
	libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007faaca822000)
	libgmpxx.so.4 => not found
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007faaca640000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faaca4f1000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faaca4d4000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faaca4b1000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faaca2bf000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faaca2b9000)
	/lib64/ld-linux-x86-64.so.2 (0x00007faacbace000)

wakiyamap avatar May 09 '22 23:05 wakiyamap

Thanks for the feedback. I will spend some time to have that one resolved.

martin-key avatar May 16 '22 14:05 martin-key

Hey! I'm closing the PR and we will create another after we have the time to fix the tests. We are using a micro service infrastructure with separated nodes from the explorer orchestrated by Kubernetes and therefore we are not using and managing the tests from the nodes.

martin-key avatar Mar 29 '23 12:03 martin-key