├── .clang-format ├── CMakeLists.txt ├── LICENSE ├── Makefile ├── README.md ├── contrib ├── CMakeLists.txt ├── db │ ├── CMakeLists.txt │ ├── liblmdb │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── Doxyfile │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── intro.doc │ │ ├── lmdb.h │ │ ├── mdb.c │ │ ├── mdb_copy.1 │ │ ├── mdb_copy.c │ │ ├── mdb_dump.1 │ │ ├── mdb_dump.c │ │ ├── mdb_load.1 │ │ ├── mdb_load.c │ │ ├── mdb_stat.1 │ │ ├── mdb_stat.c │ │ ├── midl.c │ │ ├── midl.h │ │ ├── mtest.c │ │ ├── mtest2.c │ │ ├── mtest3.c │ │ ├── mtest4.c │ │ ├── mtest5.c │ │ ├── mtest6.c │ │ ├── sample-bdb.txt │ │ ├── sample-mdb.txt │ │ └── tooltag │ └── libmdbx │ │ ├── .circleci │ │ └── config.yml │ │ ├── .clang-format │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CMakeLists.dist-minimal │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── GNUmakefile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── cmake │ │ ├── compiler.cmake │ │ ├── profile.cmake │ │ └── utils.cmake │ │ ├── example │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── example-mdbx.c │ │ └── sample-bdb.txt │ │ ├── mdbx.h │ │ ├── packages │ │ └── rpm │ │ │ ├── CMakeLists.txt │ │ │ ├── build.sh │ │ │ └── package.sh │ │ ├── src │ │ ├── CMakeLists.txt │ │ ├── alloy.c │ │ ├── elements │ │ │ ├── config.h.in │ │ │ ├── core.c │ │ │ ├── defs.h │ │ │ ├── internals.h │ │ │ ├── lck-posix.c │ │ │ ├── lck-windows.c │ │ │ ├── ntdll.def │ │ │ ├── osal.c │ │ │ ├── osal.h │ │ │ └── version.c.in │ │ ├── man1 │ │ │ ├── mdbx_chk.1 │ │ │ ├── mdbx_copy.1 │ │ │ ├── mdbx_dump.1 │ │ │ ├── mdbx_load.1 │ │ │ └── mdbx_stat.1 │ │ └── tools │ │ │ ├── CMakeLists.txt │ │ │ ├── mdbx_chk.c │ │ │ ├── mdbx_copy.c │ │ │ ├── mdbx_dump.c │ │ │ ├── mdbx_load.c │ │ │ ├── mdbx_stat.c │ │ │ ├── wingetopt.c │ │ │ └── wingetopt.h │ │ └── test │ │ ├── CMakeLists.txt │ │ ├── append.cc │ │ ├── base.h │ │ ├── cases.cc │ │ ├── chrono.cc │ │ ├── chrono.h │ │ ├── config.cc │ │ ├── config.h │ │ ├── copy.cc │ │ ├── darwin │ │ ├── LICENSE │ │ ├── README.md │ │ ├── pthread_barrier.c │ │ └── pthread_barrier.h │ │ ├── dead.cc │ │ ├── hill.cc │ │ ├── jitter.cc │ │ ├── keygen.cc │ │ ├── keygen.h │ │ ├── log.cc │ │ ├── log.h │ │ ├── long_stochastic.sh │ │ ├── main.cc │ │ ├── nested.cc │ │ ├── osal-unix.cc │ │ ├── osal-windows.cc │ │ ├── osal.h │ │ ├── pcrf │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── pcrf_test.c │ │ ├── test.cc │ │ ├── test.h │ │ ├── try.cc │ │ ├── ttl.cc │ │ ├── utils.cc │ │ ├── utils.h │ │ └── valgrind_suppress.txt ├── eos_portable_archive │ ├── change_log.txt │ ├── eos │ │ ├── polymorphic_portable_archive.hpp │ │ ├── portable_archive.hpp │ │ ├── portable_archive_exception.hpp │ │ ├── portable_iarchive.hpp │ │ └── portable_oarchive.hpp │ └── release_notes.txt ├── epee │ ├── LICENSE.txt │ ├── README.md │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── README.txt │ │ ├── demo_http_server │ │ │ ├── demo_http_server.cpp │ │ │ ├── demo_http_server.h │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── targetver.h │ │ ├── demo_levin_server │ │ │ ├── demo_levin_server.cpp │ │ │ ├── demo_levin_server.h │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── targetver.h │ │ ├── generate_gcc.sh │ │ ├── generate_vc_proj.bat │ │ └── iface │ │ │ └── transport_defs.h │ ├── include │ │ ├── auto_val_init.h │ │ ├── cache_helper.h │ │ ├── console_handler.h │ │ ├── copyable_atomic.h │ │ ├── file_io_utils.h │ │ ├── global_stream_operators.h │ │ ├── gzip_encoding.h │ │ ├── hmac-md5.h │ │ ├── include_base_utils.h │ │ ├── math_helper.h │ │ ├── md5_l.h │ │ ├── md5_l.inl │ │ ├── md5global.h │ │ ├── misc_helpers.h │ │ ├── misc_language.h │ │ ├── misc_log_ex.h │ │ ├── misc_os_dependent.h │ │ ├── net │ │ │ ├── abstract_tcp_server2.h │ │ │ ├── abstract_tcp_server2.inl │ │ │ ├── http_base.h │ │ │ ├── http_client.h │ │ │ ├── http_client_abstract_invoke.h │ │ │ ├── http_client_base.h │ │ │ ├── http_client_via_api_helper.h │ │ │ ├── http_protocol_handler.h │ │ │ ├── http_protocol_handler.inl │ │ │ ├── http_server_cp.h │ │ │ ├── http_server_cp2.h │ │ │ ├── http_server_handlers_map2.h │ │ │ ├── http_server_impl_base.h │ │ │ ├── http_server_thread_per_connect.h │ │ │ ├── levin_base.h │ │ │ ├── levin_client.h │ │ │ ├── levin_client.inl │ │ │ ├── levin_client_async.h │ │ │ ├── levin_client_async.inl │ │ │ ├── levin_helper.h │ │ │ ├── levin_protocol_handler.h │ │ │ ├── levin_protocol_handler_async.h │ │ │ ├── levin_server_cp.h │ │ │ ├── levin_server_cp2.h │ │ │ ├── local_ip.h │ │ │ ├── multiprotocols_server.h │ │ │ ├── munin_connection_handler.h │ │ │ ├── munin_node_server.h │ │ │ ├── net_helper.h │ │ │ ├── net_parse_helpers.h │ │ │ ├── net_utils_base.h │ │ │ ├── protocol_switcher.h │ │ │ ├── rpc_method_name.h │ │ │ ├── smtp.h │ │ │ ├── smtp.inl │ │ │ └── smtp_helper.h │ │ ├── os_defenitions.h │ │ ├── print_fixed_point_helper.h │ │ ├── profile_tools.h │ │ ├── readwrite_lock.h │ │ ├── reg_exp_definer.h │ │ ├── reg_utils.h │ │ ├── serialization │ │ │ ├── keyvalue_enable_POD_serialize_as_string.h │ │ │ ├── keyvalue_helper_structs.h │ │ │ ├── keyvalue_helpers.h │ │ │ ├── keyvalue_hexemizer.h │ │ │ ├── keyvalue_serialization.h │ │ │ ├── keyvalue_serialization_boost_variant.h │ │ │ ├── keyvalue_serialization_overloads.h │ │ │ └── serialize_base.h │ │ ├── service_impl_base.h │ │ ├── sha1.h │ │ ├── sha1.inl │ │ ├── singleton.h │ │ ├── soci_helper.h │ │ ├── static_helpers.h │ │ ├── storages │ │ │ ├── activity_notifier.h │ │ │ ├── crypted_storage.h │ │ │ ├── gzipped_inmemstorage.h │ │ │ ├── http_abstract_invoke.h │ │ │ ├── levin_abstract_invoke2.h │ │ │ ├── parserse_base_utils.h │ │ │ ├── portable_storage.h │ │ │ ├── portable_storage_base.h │ │ │ ├── portable_storage_extended_for_doc.h │ │ │ ├── portable_storage_from_bin.h │ │ │ ├── portable_storage_from_json.h │ │ │ ├── portable_storage_template_helper.h │ │ │ ├── portable_storage_to_.h │ │ │ ├── portable_storage_to_bin.h │ │ │ ├── portable_storage_to_description.h │ │ │ ├── portable_storage_to_json.h │ │ │ └── portable_storage_val_converters.h │ │ ├── string_coding.h │ │ ├── string_tools.h │ │ ├── sync_locked_object.h │ │ ├── syncobj.h │ │ ├── time_helper.h │ │ ├── tiny_ini.h │ │ ├── to_nonconst_iterator.h │ │ ├── warnings.h │ │ └── zlib_helper.h │ └── tests │ │ ├── data │ │ └── storages │ │ │ ├── invalid_storage_1.bin │ │ │ ├── invalid_storage_2.bin │ │ │ ├── invalid_storage_3.bin │ │ │ ├── invalid_storage_4.bin │ │ │ └── valid_storage.bin │ │ ├── generate_vc_proj.bat │ │ └── src │ │ ├── CMakeLists.txt │ │ ├── misc │ │ └── test_math.h │ │ ├── net │ │ └── test_net.h │ │ ├── storages │ │ ├── portable_storages_test.h │ │ └── storage_tests.h │ │ └── tests.cpp ├── ethereum │ ├── CMakeLists.txt │ └── libethash │ │ ├── CMakeLists.txt │ │ ├── bit_manipulation.h │ │ ├── builtins.h │ │ ├── endianness.hpp │ │ ├── ethash-internal.hpp │ │ ├── ethash.cpp │ │ ├── ethash │ │ ├── ethash.h │ │ ├── ethash.hpp │ │ ├── hash_types.h │ │ ├── hash_types.hpp │ │ ├── keccak.h │ │ ├── keccak.hpp │ │ ├── progpow.hpp │ │ └── version.h │ │ ├── keccak.c │ │ ├── keccakf1600.c │ │ ├── keccakf800.c │ │ ├── kiss99.hpp │ │ ├── managed.cpp │ │ ├── primes.c │ │ ├── primes.h │ │ ├── progpow.cpp │ │ └── support │ │ └── attributes.h └── zlib │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── FAQ │ ├── INDEX │ ├── Makefile │ ├── Makefile.in │ ├── README │ ├── adler32.c │ ├── amiga │ ├── Makefile.pup │ └── Makefile.sas │ ├── compress.c │ ├── configure │ ├── contrib │ ├── README.contrib │ ├── ada │ │ ├── buffer_demo.adb │ │ ├── mtest.adb │ │ ├── read.adb │ │ ├── readme.txt │ │ ├── test.adb │ │ ├── zlib-streams.adb │ │ ├── zlib-streams.ads │ │ ├── zlib-thin.adb │ │ ├── zlib-thin.ads │ │ ├── zlib.adb │ │ ├── zlib.ads │ │ └── zlib.gpr │ ├── amd64 │ │ └── amd64-match.S │ ├── asm686 │ │ ├── README.686 │ │ └── match.S │ ├── blast │ │ ├── Makefile │ │ ├── README │ │ ├── blast.c │ │ ├── blast.h │ │ ├── test.pk │ │ └── test.txt │ ├── delphi │ │ ├── ZLib.pas │ │ ├── ZLibConst.pas │ │ ├── readme.txt │ │ └── zlibd32.mak │ ├── dotzlib │ │ ├── DotZLib.build │ │ ├── DotZLib.chm │ │ ├── DotZLib.sln │ │ ├── DotZLib │ │ │ ├── AssemblyInfo.cs │ │ │ ├── ChecksumImpl.cs │ │ │ ├── CircularBuffer.cs │ │ │ ├── CodecBase.cs │ │ │ ├── Deflater.cs │ │ │ ├── DotZLib.cs │ │ │ ├── DotZLib.csproj │ │ │ ├── GZipStream.cs │ │ │ ├── Inflater.cs │ │ │ └── UnitTests.cs │ │ ├── LICENSE_1_0.txt │ │ └── readme.txt │ ├── gcc_gvmat64 │ │ └── gvmat64.S │ ├── infback9 │ │ ├── README │ │ ├── infback9.c │ │ ├── infback9.h │ │ ├── inffix9.h │ │ ├── inflate9.h │ │ ├── inftree9.c │ │ └── inftree9.h │ ├── inflate86 │ │ ├── inffas86.c │ │ └── inffast.S │ ├── iostream │ │ ├── test.cpp │ │ ├── zfstream.cpp │ │ └── zfstream.h │ ├── iostream2 │ │ ├── zstream.h │ │ └── zstream_test.cpp │ ├── iostream3 │ │ ├── README │ │ ├── TODO │ │ ├── test.cc │ │ ├── zfstream.cc │ │ └── zfstream.h │ ├── masmx64 │ │ ├── bld_ml64.bat │ │ ├── gvmat64.asm │ │ ├── inffas8664.c │ │ ├── inffasx64.asm │ │ └── readme.txt │ ├── masmx86 │ │ ├── bld_ml32.bat │ │ ├── inffas32.asm │ │ ├── match686.asm │ │ └── readme.txt │ ├── minizip │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── MiniZip64_Changes.txt │ │ ├── MiniZip64_info.txt │ │ ├── configure.ac │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── iowin32.c │ │ ├── iowin32.h │ │ ├── make_vms.com │ │ ├── miniunz.c │ │ ├── miniunzip.1 │ │ ├── minizip.1 │ │ ├── minizip.c │ │ ├── minizip.pc.in │ │ ├── mztools.c │ │ ├── mztools.h │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ └── zip.h │ ├── pascal │ │ ├── example.pas │ │ ├── readme.txt │ │ ├── zlibd32.mak │ │ └── zlibpas.pas │ ├── puff │ │ ├── Makefile │ │ ├── README │ │ ├── puff.c │ │ ├── puff.h │ │ ├── pufftest.c │ │ └── zeros.raw │ ├── testzlib │ │ ├── testzlib.c │ │ └── testzlib.txt │ ├── untgz │ │ ├── Makefile │ │ ├── Makefile.msc │ │ └── untgz.c │ └── vstudio │ │ ├── readme.txt │ │ ├── vc10 │ │ ├── miniunz.vcxproj │ │ ├── miniunz.vcxproj.filters │ │ ├── minizip.vcxproj │ │ ├── minizip.vcxproj.filters │ │ ├── testzlib.vcxproj │ │ ├── testzlib.vcxproj.filters │ │ ├── testzlibdll.vcxproj │ │ ├── testzlibdll.vcxproj.filters │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibstat.vcxproj.filters │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ ├── zlibvc.vcxproj │ │ └── zlibvc.vcxproj.filters │ │ ├── vc11 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc12 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc14 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ └── vc9 │ │ ├── miniunz.vcproj │ │ ├── minizip.vcproj │ │ ├── testzlib.vcproj │ │ ├── testzlibdll.vcproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcproj │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── doc │ ├── algorithm.txt │ ├── rfc1950.txt │ ├── rfc1951.txt │ ├── rfc1952.txt │ └── txtvsbin.txt │ ├── examples │ ├── README.examples │ ├── enough.c │ ├── fitblk.c │ ├── gun.c │ ├── gzappend.c │ ├── gzjoin.c │ ├── gzlog.c │ ├── gzlog.h │ ├── zlib_how.html │ ├── zpipe.c │ └── zran.c │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── make_vms.com │ ├── msdos │ ├── Makefile.bor │ ├── Makefile.dj2 │ ├── Makefile.emx │ ├── Makefile.msc │ └── Makefile.tc │ ├── nintendods │ ├── Makefile │ └── README │ ├── old │ ├── Makefile.emx │ ├── Makefile.riscos │ ├── README │ ├── descrip.mms │ ├── os2 │ │ ├── Makefile.os2 │ │ └── zlib.def │ └── visual-basic.txt │ ├── os400 │ ├── README400 │ ├── bndsrc │ ├── make.sh │ └── zlib.inc │ ├── qnx │ └── package.qpg │ ├── test │ ├── example.c │ ├── infcover.c │ └── minigzip.c │ ├── treebuild.xml │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── watcom │ ├── watcom_f.mak │ └── watcom_l.mak │ ├── win32 │ ├── DLL_FAQ.txt │ ├── Makefile.bor │ ├── Makefile.gcc │ ├── Makefile.msc │ ├── README-WIN32.txt │ ├── VisualC.txt │ ├── zlib.def │ └── zlib1.rc │ ├── zconf.h.cmakein │ ├── zconf.h.in │ ├── zlib.3 │ ├── zlib.3.pdf │ ├── zlib.h │ ├── zlib.map │ ├── zlib.pc.cmakein │ ├── zlib.pc.in │ ├── zlib2ansi │ ├── zutil.c │ └── zutil.h ├── crowdin.yml ├── resources ├── Zano WP.pdf ├── app_icon.svg ├── app_icon_256.png ├── dmg_installer_bg.png ├── installer_bg_164x313.bmp ├── installer_bg_191x385.bmp ├── installer_bg_246x457.bmp └── installer_bg_328x628.bmp ├── snap └── snapcraft.yaml ├── src ├── CMakeLists.txt ├── common │ ├── atomics_boost_serialization.h │ ├── base58.cpp │ ├── base58.h │ ├── boost_serialization_helper.h │ ├── boost_serialization_maps.h │ ├── callstack_helper.cpp │ ├── callstack_helper.h │ ├── command_line.cpp │ ├── command_line.h │ ├── config_encrypt_helper.h │ ├── crypto_serialization.h │ ├── crypto_stream_operators.cpp │ ├── crypto_stream_operators.h │ ├── db_abstract_accessor.h │ ├── db_backend_base.h │ ├── db_backend_leveldb.cpp │ ├── db_backend_leveldb.h │ ├── db_backend_lmdb.cpp │ ├── db_backend_lmdb.h │ ├── db_backend_mdbx.cpp │ ├── db_backend_mdbx.h │ ├── db_backend_selector.cpp │ ├── db_backend_selector.h │ ├── difficulty_boost_serialization.h │ ├── encryption_filter.cpp │ ├── encryption_filter.h │ ├── error_codes.h │ ├── general_purpose_commands_defs.h │ ├── int-util.h │ ├── make_hashable.h │ ├── median_db_cache.h │ ├── miniupnp_helper.h │ ├── mnemonic-encoding.cpp │ ├── mnemonic-encoding.h │ ├── ntp.cpp │ ├── ntp.h │ ├── pod-class.h │ ├── pod_array_file_container.h │ ├── pre_download.h │ ├── threads_pool.h │ ├── tor_helper.h │ ├── unordered_containers_boost_serialization.h │ ├── utf8.h │ ├── utf8 │ │ ├── checked.h │ │ ├── core.h │ │ ├── cpp11.h │ │ ├── cpp17.h │ │ ├── cpp20.h │ │ └── unchecked.h │ ├── util.cpp │ ├── util.h │ ├── variant_helper.h │ └── varint.h ├── connectivity_tool │ └── conn_tool.cpp ├── crypto │ ├── RIPEMD160.c │ ├── RIPEMD160.h │ ├── RIPEMD160_helper.cpp │ ├── RIPEMD160_helper.h │ ├── bitcoin │ │ ├── byteswap.h │ │ ├── common.h │ │ ├── cpuid.h │ │ ├── endian.h │ │ ├── sha256.cpp │ │ ├── sha256.h │ │ └── sha256_helper.h │ ├── blake2-impl.h │ ├── blake2.h │ ├── blake2b-ref.c │ ├── chacha8.c │ ├── chacha8.h │ ├── chacha8_stream.c │ ├── chacha8_stream.h │ ├── clsag.cpp │ ├── clsag.h │ ├── crypto-ops-data.c │ ├── crypto-ops.c │ ├── crypto-ops.h │ ├── crypto-sugar.cpp │ ├── crypto-sugar.h │ ├── crypto.cpp │ ├── crypto.h │ ├── ecrypt-config.h │ ├── ecrypt-machine.h │ ├── ecrypt-portable.h │ ├── ecrypt-sync.h │ ├── eth_signature.cpp │ ├── eth_signature.h │ ├── generic-ops.h │ ├── hash-ops.h │ ├── hash.c │ ├── hash.h │ ├── initializer.h │ ├── keccak.c │ ├── keccak.h │ ├── msm.cpp │ ├── msm.h │ ├── one_out_of_many_proofs.cpp │ ├── one_out_of_many_proofs.h │ ├── random.c │ ├── random.h │ ├── range_proof_bpp.h │ ├── range_proof_bppe.h │ ├── range_proofs.cpp │ ├── range_proofs.h │ ├── tree-hash.c │ ├── zarcanum.cpp │ └── zarcanum.h ├── currency_core │ ├── account.cpp │ ├── account.h │ ├── account_boost_serialization.h │ ├── alias_helper.h │ ├── basic_api_response_codes.h │ ├── basic_kv_structs.h │ ├── basic_pow_helpers.cpp │ ├── basic_pow_helpers.h │ ├── bc_attachments_helpers.h │ ├── bc_attachments_helpers_basic.h │ ├── bc_attachments_service_manager.cpp │ ├── bc_attachments_service_manager.h │ ├── bc_block_datetime_service.h │ ├── bc_escrow_service.h │ ├── bc_offers_serialization.h │ ├── bc_offers_service.cpp │ ├── bc_offers_service.h │ ├── bc_offers_service_basic.h │ ├── bc_payments_id_service.h │ ├── block_flags.h │ ├── blockchain_storage.cpp │ ├── blockchain_storage.h │ ├── blockchain_storage_basic.h │ ├── blockchain_storage_boost_serialization.h │ ├── checkpoints.cpp │ ├── checkpoints.h │ ├── checkpoints_create.h │ ├── connection_context.h │ ├── core_runtime_config.h │ ├── core_tools.h │ ├── crypto_config.h │ ├── currency_basic.h │ ├── currency_basic_backward_comp.inl │ ├── currency_boost_serialization.h │ ├── currency_config.h │ ├── currency_core.cpp │ ├── currency_core.h │ ├── currency_format_utils.cpp │ ├── currency_format_utils.h │ ├── currency_format_utils_abstract.h │ ├── currency_format_utils_blocks.cpp │ ├── currency_format_utils_blocks.h │ ├── currency_format_utils_transactions.cpp │ ├── currency_format_utils_transactions.h │ ├── currency_stat_info.h │ ├── difficulty.cpp │ ├── difficulty.h │ ├── dispatch_core_events.h │ ├── etc_custom_serialization.cpp │ ├── etc_custom_serialization.h │ ├── genesis.cpp │ ├── genesis.h │ ├── genesis_acc.cpp │ ├── genesis_acc.h │ ├── miner.cpp │ ├── miner.h │ ├── offers_service_basics.h │ ├── offers_services_helpers.cpp │ ├── offers_services_helpers.h │ ├── pos_mining.cpp │ ├── pos_mining.h │ ├── tx_pool.cpp │ ├── tx_pool.h │ ├── tx_semantic_validation.cpp │ ├── tx_semantic_validation.h │ └── verification_context.h ├── currency_protocol │ ├── blobdatatype.h │ ├── currency_protocol_defs.h │ ├── currency_protocol_defs_print.h │ ├── currency_protocol_handler.h │ ├── currency_protocol_handler.inl │ └── currency_protocol_handler_common.h ├── daemon │ ├── daemon.cpp │ └── daemon_commands_handler.h ├── gui │ └── qt-daemon │ │ ├── Info.plist.in │ │ ├── app.icns │ │ ├── app.ico │ │ ├── app.qrc │ │ ├── app.rc │ │ ├── application │ │ ├── gui_utils.cpp │ │ ├── gui_utils.h │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ ├── notification_helper.h │ │ ├── notification_helper.mm │ │ ├── urleventfilter.cpp │ │ └── urleventfilter.h │ │ ├── main.cpp │ │ └── qtlogger.h ├── miner │ ├── simpleminer.cpp │ ├── simpleminer.h │ └── target_helper.h ├── p2p │ ├── maintainers_info_boost_serialization.h │ ├── net_node.h │ ├── net_node.inl │ ├── net_node_common.h │ ├── net_peerlist.h │ ├── net_peerlist_boost_serialization.h │ ├── p2p_networks.h │ └── p2p_protocol_defs.h ├── pch │ ├── stdafx.cpp │ └── stdafx.h ├── platform │ ├── mingw │ │ └── alloca.h │ └── msc │ │ ├── alloca.h │ │ ├── inline_c.h │ │ ├── stdbool.h │ │ └── sys │ │ └── param.h ├── rpc │ ├── core_rpc_server.cpp │ ├── core_rpc_server.h │ ├── core_rpc_server_commands_defs.h │ └── core_rpc_server_error_codes.h ├── serialization │ ├── binary_archive.h │ ├── binary_utils.h │ ├── boost_types.h │ ├── debug_archive.h │ ├── json_archive.h │ ├── json_utils.h │ ├── multiprecision.h │ ├── serialization.h │ ├── serialize_basic_types.h │ ├── stl_containers.h │ ├── string.h │ └── variant.h ├── simplewallet │ ├── password_container.cpp │ ├── password_container.h │ ├── simplewallet.cpp │ └── simplewallet.h ├── stratum │ ├── stratum_helpers.h │ ├── stratum_server.cpp │ └── stratum_server.h ├── version.cmake ├── version.h.in └── wallet │ ├── core_default_rpc_proxy.cpp │ ├── core_default_rpc_proxy.h │ ├── core_fast_rpc_proxy.h │ ├── core_rpc_proxy.h │ ├── decoy_selection.cpp │ ├── decoy_selection.h │ ├── decoy_selection_default_distribution.hpp │ ├── plain_wallet_api.cpp │ ├── plain_wallet_api.h │ ├── plain_wallet_api_defs.h │ ├── view_iface.h │ ├── wallet2.cpp │ ├── wallet2.h │ ├── wallet2_base.h │ ├── wallet2_escrow.cpp │ ├── wallet_chain_shortener.cpp │ ├── wallet_chain_shortener.h │ ├── wallet_debug_events_definitions.h │ ├── wallet_errors.h │ ├── wallet_helpers.h │ ├── wallet_id_adapter.h │ ├── wallet_public_structs_defs.h │ ├── wallet_rpc_server.cpp │ ├── wallet_rpc_server.h │ ├── wallet_rpc_server_error_codes.h │ ├── wallets_manager.cpp │ ├── wallets_manager.h │ └── wrap_service.h ├── tests ├── CMakeLists.txt ├── core_tests │ ├── alias_tests.cpp │ ├── alias_tests.h │ ├── atomic_tests.cpp │ ├── atomic_tests.h │ ├── attachment_isolation_encryption_test.cpp │ ├── attachment_isolation_encryption_test.h │ ├── block_reward.cpp │ ├── block_reward.h │ ├── block_validation.cpp │ ├── block_validation.h │ ├── chain_split_1.cpp │ ├── chain_split_1.h │ ├── chain_switch_1.cpp │ ├── chain_switch_1.h │ ├── chain_switch_pow_pos.cpp │ ├── chain_switch_pow_pos.h │ ├── chaingen.cpp │ ├── chaingen.h │ ├── chaingen001.cpp │ ├── chaingen001.h │ ├── chaingen_helpers.h │ ├── chaingen_main.cpp │ ├── chaingen_pch.cpp │ ├── chaingen_tests_list.h │ ├── checkpoints_tests.cpp │ ├── checkpoints_tests.h │ ├── core_state_helper.h │ ├── cumulative_diificulty_adjustments_tests.cpp │ ├── cumulative_diificulty_adjustments_tests.h │ ├── daemon_rpc.cpp │ ├── daemon_rpc.h │ ├── double_spend.cpp │ ├── double_spend.h │ ├── double_spend.inl │ ├── emission_test.cpp │ ├── emission_test.h │ ├── escrow_wallet_altchain_test.cpp │ ├── escrow_wallet_altchain_test.h │ ├── escrow_wallet_common.h │ ├── escrow_wallet_tests.cpp │ ├── escrow_wallet_tests.h │ ├── get_random_outs.cpp │ ├── get_random_outs.h │ ├── hard_fork_1.cpp │ ├── hard_fork_1.h │ ├── hard_fork_1_bad_pos_source.cpp │ ├── hard_fork_1_bad_pos_source.h │ ├── hard_fork_1_consensus_test.cpp │ ├── hard_fork_1_consensus_test.h │ ├── hard_fork_1_locked_pos_test.cpp │ ├── hard_fork_1_locked_pos_test.h │ ├── hard_fork_2.cpp │ ├── hard_fork_2.h │ ├── hard_fork_4.cpp │ ├── hard_fork_4.h │ ├── hard_fork_5.cpp │ ├── hard_fork_5.h │ ├── integer_overflow.cpp │ ├── integer_overflow.h │ ├── ionic_swap_tests.cpp │ ├── ionic_swap_tests.h │ ├── isolate_auditable_and_proof.cpp │ ├── isolate_auditable_and_proof.h │ ├── misc_tests.cpp │ ├── misc_tests.h │ ├── mixin_attr.cpp │ ├── mixin_attr.h │ ├── multiassets_test.cpp │ ├── multiassets_test.h │ ├── multisig_wallet_tests.cpp │ ├── multisig_wallet_tests.h │ ├── offers_helper.cpp │ ├── offers_helper.h │ ├── offers_test.cpp │ ├── offers_test.h │ ├── offers_tests_common.h │ ├── pos_basic_tests.cpp │ ├── pos_basic_tests.h │ ├── pos_block_builder.cpp │ ├── pos_block_builder.h │ ├── pos_fuse_test.cpp │ ├── pos_fuse_test.h │ ├── pos_validation.cpp │ ├── pos_validation.h │ ├── pruning_ring_signatures.cpp │ ├── pruning_ring_signatures.h │ ├── random_helper.cpp │ ├── random_helper.h │ ├── ring_signature_1.cpp │ ├── ring_signature_1.h │ ├── test_core_proxy.h │ ├── test_core_time.h │ ├── transaction_tests.cpp │ ├── transaction_tests.h │ ├── tx_builder.h │ ├── tx_validation.cpp │ ├── tx_validation.h │ ├── wallet_rpc_tests.cpp │ ├── wallet_rpc_tests.h │ ├── wallet_rpc_tests_legacy_defs.h │ ├── wallet_test_core_proxy.cpp │ ├── wallet_test_core_proxy.h │ ├── wallet_tests.cpp │ ├── wallet_tests.h │ ├── wallet_tests_basic.cpp │ ├── wallet_tests_basic.h │ ├── zarcanum_test.cpp │ └── zarcanum_test.h ├── crypto │ ├── crypto-ops-data.c │ ├── crypto-ops.c │ ├── crypto-tests.h │ ├── crypto.cpp │ ├── hash.c │ ├── main.cpp │ ├── random.c │ └── tests.txt ├── cryptolib.pl ├── cryptotest.pl ├── daemon_tests │ ├── CMakeLists.txt │ └── transfers.cpp ├── db_tests │ ├── CMakeLists.txt │ └── db_tests.cpp ├── functional_tests │ ├── L2S.h │ ├── core_concurrency_test.cpp │ ├── core_concurrency_test.h │ ├── crypto_tests.cpp │ ├── crypto_tests.h │ ├── crypto_tests_clsag.h │ ├── crypto_tests_ml2s.h │ ├── crypto_tests_one_out_of_many_proofs.h │ ├── crypto_tests_performance.h │ ├── crypto_tests_range_proofs.h │ ├── crypto_torsion_elements.h │ ├── deadlock_guard_test.cpp │ ├── deadlock_guard_test.h │ ├── difficulty_analysis.cpp │ ├── difficulty_analysis.h │ ├── generate_test_genesis.cpp │ ├── generate_test_genesis.h │ ├── main.cpp │ ├── miniupnp_test.cpp │ ├── miniupnp_test.h │ ├── plain_wallet_tests.cpp │ ├── plain_wallet_tests.h │ ├── sha3.cpp │ ├── transactions_flow_test.cpp │ ├── transactions_flow_test.h │ ├── transactions_generation_from_blockchain.cpp │ └── transactions_generation_from_blockchain.h ├── gtest │ ├── CMakeLists.txt │ ├── cmake │ │ └── internal_utils.cmake │ ├── include │ │ └── gtest │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-param-test.h.pump │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-linked_ptr.h │ │ │ ├── gtest-param-util-generated.h │ │ │ ├── gtest-param-util-generated.h.pump │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ ├── gtest-tuple.h │ │ │ ├── gtest-tuple.h.pump │ │ │ ├── gtest-type-util.h │ │ │ └── gtest-type-util.h.pump │ └── src │ │ ├── gtest-all.cc │ │ ├── gtest-death-test.cc │ │ ├── gtest-filepath.cc │ │ ├── gtest-internal-inl.h │ │ ├── gtest-port.cc │ │ ├── gtest-printers.cc │ │ ├── gtest-test-part.cc │ │ ├── gtest-typed-test.cc │ │ ├── gtest.cc │ │ └── gtest_main.cc ├── hash-target.cpp ├── hash │ ├── main.cpp │ ├── tests-extra-blake.txt │ ├── tests-extra-groestl.txt │ ├── tests-extra-jh.txt │ ├── tests-extra-skein.txt │ ├── tests-fast.txt │ ├── tests-slow.txt │ └── tests-tree.txt ├── io.h ├── net_load_tests │ ├── clt.cpp │ ├── net_load_tests.h │ └── srv.cpp ├── performance_tests │ ├── api_test.cpp │ ├── blake2_test.h │ ├── chacha_stream_performance_test.cpp │ ├── chacha_stream_performance_test.h │ ├── check_ring_signature.h │ ├── construct_tx.h │ ├── core_market_performance_test.cpp │ ├── core_market_performance_test.h │ ├── derive_public_key.h │ ├── derive_secret_key.h │ ├── free_space_check.h │ ├── generate_key_derivation.h │ ├── generate_key_image.h │ ├── generate_key_image_helper.h │ ├── htlc_hash_tests.cpp │ ├── htlc_hash_tests.h │ ├── is_out_to_acc.h │ ├── keccak_test.h │ ├── main.cpp │ ├── multi_tx_test_base.h │ ├── performance_tests.h │ ├── performance_utils.h │ ├── print_struct_to_json.h │ ├── serialization_performance_test.cpp │ ├── serialization_performance_test.h │ ├── single_tx_test_base.h │ └── threads_pool_tests.h └── unit_tests │ ├── alias_validating.cpp │ ├── amounts_tests.cpp │ ├── base58.cpp │ ├── basic_struct_packing.cpp │ ├── block_reward.cpp │ ├── chacha8.cpp │ ├── chacha_stream_test.cpp │ ├── check_points_test.cpp │ ├── db_accessors.cpp │ ├── db_tests.cpp │ ├── decompose_amount_into_digits.cpp │ ├── decoy_selection.cpp │ ├── epee_boosted_tcp_server.cpp │ ├── epee_levin_protocol_handler_async.cpp │ ├── fork_choice_rule.cpp │ ├── get_xtype_from_string.cpp │ ├── main.cpp │ ├── median_helper.cpp │ ├── mul_div.cpp │ ├── multiassets_test.cpp │ ├── p2p_client_version.cpp │ ├── portable_storage_test.cpp │ ├── pow_hash_test.cpp │ ├── prepare_outputs_entries_for_key_offsets.cpp │ ├── proxy_to_coretests.cpp │ ├── serialization.cpp │ ├── test_format_utils.cpp │ ├── test_peerlist.cpp │ ├── test_protocol_pack.cpp │ ├── unit_tests_utils.h │ ├── votes_tests.cpp │ ├── wallet_chain_shortener_test.cpp │ ├── wallet_seed_test.cpp │ ├── wallet_select_transfers_test.cpp │ └── zlib_helper.cpp └── utils ├── Directory.Build.props.in ├── JS ├── decrypt_response.json ├── emmit_response.json ├── package-lock.json ├── package.json ├── sign_response.json └── test_eth_sig.js ├── Zano.desktop ├── Zano.sh ├── Zano_appimage_wrapper.sh ├── api_response.txt ├── boost_1.70_gcc_8.patch ├── build_mail.py ├── build_script_linux.sh ├── build_script_linux_appimage.sh ├── build_script_mac_osx.sh ├── build_script_windows.bat ├── configure_local_paths.cmd.example ├── configure_local_paths_msvs2019.cmd ├── configure_macos_xcodeproj.sh ├── configure_win32_msvs2015_gui.cmd ├── configure_win64_msvs2013_gui.cmd ├── configure_win64_msvs2015_gui.cmd ├── configure_win64_msvs2017_gui.cmd ├── configure_win64_msvs2017_gui_testnet.cmd ├── configure_win64_msvs2019_gui_testnet.cmd ├── configure_win64_msvs2022_gui.cmd ├── configure_win64_msvs2022_gui_testnet.cmd ├── contrib └── create-dmg │ ├── LICENSE │ ├── create-dmg │ ├── origin.txt │ └── support │ ├── dmg-license.py │ └── template.applescript ├── deeplink.rm ├── docker ├── remote-node-mobile │ ├── Dockerfile │ └── nginx.conf └── zano-full-node │ └── Dockerfile ├── gpg └── zoidberg.asc ├── increment_build_number.sh ├── macos_entitlements.plist ├── macosx_build_config.command ├── macosx_build_uploader.sh ├── macosx_dmg_builder.sh ├── macosx_fix_boost_libs_path.sh ├── macosx_fixup.sh ├── munin_plugins ├── _link_munin_plugins.sh ├── aliases ├── alt_blocks_count ├── block_size ├── blockchain_lmdb_data_file_size ├── blockchain_mdbx_data_file_size ├── db_map_size ├── db_transactions_count ├── emission ├── grey_peerlist_size ├── hashrate ├── height ├── incoming_connections_count ├── market ├── outgoing_connections_count ├── outs_stat ├── performance_block ├── performance_pool ├── performance_transaction ├── performance_transaction_inp ├── performance_transaction_inp_loop ├── performance_transaction_inp_loop_scan_loop ├── poolstate_lmdb_data_file_size ├── poolstate_mdbx_data_file_size ├── pos_block_ts_shift_vs_actual ├── pos_dif_to_total_coins ├── pos_difficulty ├── pow_difficulty ├── reward ├── seconds_per_blocks ├── sequence_factor ├── timestamps ├── tx_count ├── tx_daily_count ├── tx_daily_volume ├── tx_mixins_count ├── tx_per_block ├── tx_pool_size └── white_peerlist_size ├── payment_request.json ├── premine_config.json ├── setup_32.iss ├── setup_64.iss ├── snap └── snapcraft.yaml ├── test-static-assert.c ├── test_api_files ├── COMMAND_MARKETPLACE_CANCEL_OFFER_request.json ├── COMMAND_MARKETPLACE_CANCEL_OFFER_response.json ├── COMMAND_MARKETPLACE_GET_MY_OFFERS_request.json ├── COMMAND_MARKETPLACE_GET_MY_OFFERS_response.json ├── COMMAND_MARKETPLACE_GLOBAL_GET_OFFERS_request.json ├── COMMAND_MARKETPLACE_PUSH_OFFER_request.json ├── COMMAND_MARKETPLACE_PUSH_OFFER_request_2.json ├── COMMAND_MARKETPLACE_PUSH_OFFER_response.json ├── COMMAND_MARKETPLACE_PUSH_UPDATE_OFFER_request.json ├── COMMAND_MARKETPLACE_PUSH_UPDATE_OFFER_response.json ├── COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS.json ├── exec_getblocktemplate.bat ├── get_alias_by_address.json ├── get_alias_details.json ├── get_all_pool_tx_list.json ├── get_alt_blocks_details.json ├── get_block_details.json ├── get_est_height_from_date.json ├── get_out_info.json ├── get_pool_txs_brief_details.json ├── get_pool_txs_details.json ├── get_recent_txs_and_info.json ├── get_tx_details.json ├── getblocktemplate.json ├── getinfo.json ├── ionic_swap_create_draft.json ├── register_alias.json └── transfer.json ├── test_wallet_rpc_api.bat ├── update_alert.json └── update_build_no.sh /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2024 Zano project 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | 9 | Except as contained in this notice, the name of Zano project shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Zano project. -------------------------------------------------------------------------------- /contrib/db/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "Android") 4 | message("excluded db support for IOS build") 5 | return() 6 | endif() 7 | 8 | 9 | message("DB ENGINE: lmdb") 10 | add_subdirectory(liblmdb) 11 | if(MSVC) 12 | target_compile_options(lmdb PRIVATE /wd4996 /wd4503 /wd4345 /wd4267 /wd4244 /wd4146 /wd4333 /wd4172) 13 | else() 14 | # Warnings as used by LMDB itself (LMDB_0.9.23) 15 | target_compile_options(lmdb PRIVATE -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized) 16 | endif() 17 | 18 | if(NOT DISABLE_MDBX) 19 | message("DB ENGINE: mdbx") 20 | add_subdirectory(libmdbx) 21 | # remove mdbx tools from the default MSVC build 22 | set_target_properties(mdbx_chk mdbx_copy mdbx_dump mdbx_load mdbx_stat PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) 23 | endif() 24 | -------------------------------------------------------------------------------- /contrib/db/liblmdb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set (lmdb_sources mdb.c midl.c) 3 | 4 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}") 5 | 6 | if(NOT MSVC) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wno-missing-braces -Wno-aggregate-return -Wno-discarded-qualifiers -Wno-unused-but-set-variable -Wno-implicit-fallthrough -Wno-maybe-uninitialized ") 8 | endif() 9 | if(FREEBSD) 10 | add_definitions(-DMDB_DSYNC=O_SYNC) 11 | endif() 12 | 13 | add_library(lmdb ${lmdb_sources}) 14 | 15 | target_link_libraries(lmdb PRIVATE ${CMAKE_THREAD_LIBS_INIT}) 16 | 17 | if(WIN32) 18 | target_link_libraries(lmdb ntdll) 19 | endif() 20 | -------------------------------------------------------------------------------- /contrib/db/liblmdb/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2011-2015 Howard Chu, Symas Corp. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted only as authorized by the OpenLDAP 6 | Public License. 7 | 8 | A copy of this license is available in the file LICENSE in the 9 | top-level directory of the distribution or, alternatively, at 10 | . 11 | 12 | OpenLDAP is a registered trademark of the OpenLDAP Foundation. 13 | 14 | Individual files and/or contributed packages may be copyright by 15 | other parties and/or subject to additional restrictions. 16 | 17 | This work also contains materials derived from public sources. 18 | 19 | Additional information about OpenLDAP can be obtained at 20 | . 21 | -------------------------------------------------------------------------------- /contrib/db/liblmdb/tooltag: -------------------------------------------------------------------------------- 1 | 2 | 3 | mdb_copy_1 4 | mdb_copy - environment copy tool 5 | mdb_copy.1 6 | 7 | 8 | mdb_dump_1 9 | mdb_dump - environment export tool 10 | mdb_dump.1 11 | 12 | 13 | mdb_load_1 14 | mdb_load - environment import tool 15 | mdb_load.1 16 | 17 | 18 | mdb_stat_1 19 | mdb_stat - environment status tool 20 | mdb_stat.1 21 | 22 | 23 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: circleci/buildpack-deps:artful 6 | environment: 7 | - TESTDB: /tmp/test.db 8 | - TESTLOG: /tmp/test.log 9 | steps: 10 | - checkout 11 | - run: make all 12 | - run: ulimit -c unlimited && make check 13 | - run: 14 | command: | 15 | mkdir -p /tmp/artifacts 16 | mv -t /tmp/artifacts $TESTLOG $TESTDB core.* 17 | when: on_fail 18 | - store_artifacts: 19 | path: /tmp/artifacts 20 | destination: test-artifacts 21 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | Standard: Cpp11 3 | ReflowComments: true 4 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2015-2019 Leonid Yuriev . 2 | Copyright 2011-2015 Howard Chu, Symas Corp. 3 | Copyright 2015,2016 Peter-Service R&D LLC. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted only as authorized by the OpenLDAP 8 | Public License. 9 | 10 | A copy of this license is available in the file LICENSE in the 11 | top-level directory of the distribution or, alternatively, at 12 | . 13 | 14 | OpenLDAP is a registered trademark of the OpenLDAP Foundation. 15 | 16 | Individual files and/or contributed packages may be copyright by 17 | other parties and/or subject to additional restrictions. 18 | 19 | This work also contains materials derived from public sources. 20 | 21 | Additional information about OpenLDAP can be obtained at 22 | . 23 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET mdbx_example) 2 | project(${TARGET}) 3 | 4 | add_executable(${TARGET} example-mdbx.c) 5 | 6 | target_link_libraries(${TARGET} mdbx) 7 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/example/README.md: -------------------------------------------------------------------------------- 1 | See [example-mdbx.c](example-mdbx.c) as an example of using _libmdbx_, and do a line-by-line comparison of it with the [sample-bdb.txt](sample-bdb.txt) file. 2 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/packages/rpm/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | CONFIG=$1 4 | 5 | if [[ -z "${CONFIG}" ]]; then 6 | CONFIG=Debug 7 | fi 8 | if [[ -r /opt/rh/devtoolset-6/enable ]]; then 9 | source /opt/rh/devtoolset-6/enable 10 | fi 11 | #rm -f -r build || true 12 | mkdir -p cmake-build-${CONFIG} 13 | pushd cmake-build-${CONFIG} &> /dev/null 14 | if [[ ! -r Makefile ]]; then 15 | cmake .. -DCMAKE_BUILD_TYPE=${CONFIG} 16 | fi 17 | make -j8 || exit 1 18 | popd &> /dev/null 19 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/packages/rpm/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | CONFIG=$1 5 | 6 | if [[ -z "${CONFIG}" ]]; then 7 | CONFIG=Debug 8 | fi 9 | 10 | DIRNAME=`dirname ${BASH_SOURCE[0]}` 11 | DIRNAME=`readlink --canonicalize ${DIRNAME}` 12 | 13 | if [[ -r /opt/rh/devtoolset-6/enable ]]; then 14 | source /opt/rh/devtoolset-6/enable 15 | fi 16 | 17 | mkdir -p cmake-build-${CONFIG} 18 | pushd cmake-build-${CONFIG} &> /dev/null 19 | if [[ ! -r Makefile ]]; then 20 | cmake .. -DCMAKE_BUILD_TYPE=${CONFIG} 21 | fi 22 | rm -f *.rpm 23 | make -j8 package || exit 1 24 | rm -f *-Unspecified.rpm 25 | popd &> /dev/null 26 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/src/alloy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2019 Leonid Yuriev 3 | * and other libmdbx authors: please see AUTHORS file. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted only as authorized by the OpenLDAP 8 | * Public License. 9 | * 10 | * A copy of this license is available in the file LICENSE in the 11 | * top-level directory of the distribution or, alternatively, at 12 | * . */ 13 | 14 | /* Amalgamated build */ 15 | #define MDBX_ALLOY 1 16 | #include "elements/internals.h" /* must be included fisrt */ 17 | 18 | #include "elements/core.c" 19 | #include "elements/osal.c" 20 | #include "elements/version.c" 21 | 22 | #if defined(_WIN32) || defined(_WIN64) 23 | #include "elements/lck-windows.c" 24 | #else 25 | #include "elements/lck-posix.c" 26 | #endif 27 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/src/tools/wingetopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * POSIX getopt for Windows 3 | * 4 | * AT&T Public License 5 | * 6 | * Code given out at the 1985 UNIFORUM conference in Dallas. 7 | */ 8 | 9 | #ifndef _WINGETOPT_H_ 10 | #define _WINGETOPT_H_ 11 | 12 | /* Bit of madness for Windows console */ 13 | #define mdbx_strerror mdbx_strerror_ANSI2OEM 14 | #define mdbx_strerror_r mdbx_strerror_r_ANSI2OEM 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | extern int opterr; 21 | extern int optind; 22 | extern int optopt; 23 | extern char *optarg; 24 | int getopt(int argc, char *const argv[], const char *optstring); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* _GETOPT_H_ */ 31 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/copy.cc: -------------------------------------------------------------------------------- 1 | #include "test.h" 2 | 3 | void testcase_copy::copy_db(const bool with_compaction) { 4 | int err = osal_removefile(copy_pathname); 5 | if (err != MDBX_SUCCESS && err != MDBX_ENOFILE) 6 | failure_perror("mdbx_removefile()", err); 7 | 8 | err = mdbx_env_copy(db_guard.get(), copy_pathname.c_str(), 9 | with_compaction ? MDBX_CP_COMPACT : 0); 10 | if (unlikely(err != MDBX_SUCCESS)) 11 | failure_perror(with_compaction ? "mdbx_env_copy(MDBX_CP_COMPACT)" 12 | : "mdbx_env_copy(MDBX_CP_ASIS)", 13 | err); 14 | } 15 | 16 | bool testcase_copy::run() { 17 | jitter_delay(); 18 | db_open(); 19 | assert(!txn_guard); 20 | const bool order = flipcoin(); 21 | jitter_delay(); 22 | copy_db(order); 23 | jitter_delay(); 24 | copy_db(!order); 25 | return true; 26 | } 27 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/darwin/README.md: -------------------------------------------------------------------------------- 1 | # DarwinPthreadBarrier 2 | 3 | A pthread_barrier_t implementation for Mac OS/X 4 | 5 | There is no pthread_barrier_t in Mac OS/X pthreads. This project fixes 6 | this omission by providing a simple-minded barrier implementation based 7 | on a pair of pthread_mutex_t and pthread_cond_t. 8 | 9 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/dead.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2019 Leonid Yuriev 3 | * and other libmdbx authors: please see AUTHORS file. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted only as authorized by the OpenLDAP 8 | * Public License. 9 | * 10 | * A copy of this license is available in the file LICENSE in the 11 | * top-level directory of the distribution or, alternatively, at 12 | * . 13 | */ 14 | 15 | #include "test.h" 16 | 17 | bool testcase_deadread::run() { 18 | db_open(); 19 | txn_begin(true); 20 | cursor_guard.reset(); 21 | txn_guard.reset(); 22 | db_guard.reset(); 23 | return true; 24 | } 25 | 26 | //----------------------------------------------------------------------------- 27 | 28 | bool testcase_deadwrite::run() { 29 | db_open(); 30 | txn_begin(false); 31 | cursor_guard.reset(); 32 | txn_guard.reset(); 33 | db_guard.reset(); 34 | return true; 35 | } 36 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/pcrf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET pcrf_test) 2 | add_executable(${TARGET} pcrf_test.c) 3 | target_include_directories(${TARGET} PRIVATE "${PROJECT_SOURCE_DIR}") 4 | target_link_libraries(${TARGET} mdbx) 5 | 6 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/pcrf/README.md: -------------------------------------------------------------------------------- 1 | PCRF Session DB emulation test 2 | 3 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/try.cc: -------------------------------------------------------------------------------- 1 | #include "test.h" 2 | 3 | bool testcase_try::run() { 4 | db_open(); 5 | assert(!txn_guard); 6 | 7 | MDBX_txn *txn = nullptr; 8 | MDBX_txn *txn2 = nullptr; 9 | int rc = mdbx_txn_begin(db_guard.get(), nullptr, 0, &txn); 10 | if (unlikely(rc != MDBX_SUCCESS)) 11 | failure_perror("mdbx_txn_begin(MDBX_TRYTXN)", rc); 12 | else { 13 | rc = mdbx_txn_begin(db_guard.get(), nullptr, MDBX_TRYTXN, &txn2); 14 | if (unlikely(rc != MDBX_BUSY)) 15 | failure_perror("mdbx_txn_begin(MDBX_TRYTXN)", rc); 16 | } 17 | 18 | txn_guard.reset(txn); 19 | return true; 20 | } 21 | -------------------------------------------------------------------------------- /contrib/db/libmdbx/test/valgrind_suppress.txt: -------------------------------------------------------------------------------- 1 | { 2 | msync-whole-mmap-1 3 | Memcheck:Param 4 | msync(start) 5 | fun:msync 6 | ... 7 | fun:mdbx_sync_locked 8 | } 9 | { 10 | msync-whole-mmap-2 11 | Memcheck:Param 12 | msync(start) 13 | fun:msync 14 | ... 15 | fun:mdbx_env_sync_ex 16 | } 17 | { 18 | pwrite-page-flush 19 | Memcheck:Param 20 | pwritev(vector[...]) 21 | fun:pwritev 22 | ... 23 | fun:mdbx_page_flush 24 | } 25 | -------------------------------------------------------------------------------- /contrib/eos_portable_archive/eos/portable_iarchive.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/eos_portable_archive/eos/portable_iarchive.hpp -------------------------------------------------------------------------------- /contrib/eos_portable_archive/eos/portable_oarchive.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/eos_portable_archive/eos/portable_oarchive.hpp -------------------------------------------------------------------------------- /contrib/epee/README.md: -------------------------------------------------------------------------------- 1 | epee - is a small library of helpers, wrappers, tools and and so on, used to make my life easier. -------------------------------------------------------------------------------- /contrib/epee/demo/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/demo/README.txt -------------------------------------------------------------------------------- /contrib/epee/demo/demo_http_server/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // demo_http_server.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /contrib/epee/demo/demo_http_server/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /contrib/epee/demo/demo_levin_server/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /contrib/epee/demo/generate_gcc.sh: -------------------------------------------------------------------------------- 1 | mkdir build 2 | cd build 3 | cmake .. 4 | #cmake -DBOOST_ROOT=/usr/local/proj/boost_1_49_0 -DBOOST_LIBRARYDIR=/usr/local/proj/boost_1_49_0/stage/lib .. 5 | -------------------------------------------------------------------------------- /contrib/epee/demo/generate_vc_proj.bat: -------------------------------------------------------------------------------- 1 | mkdir build 2 | 3 | cd build 4 | 5 | cmake "-DBoost_USE_STATIC_LIBS=TRUE" -G "Visual Studio 11 Win64" .. 6 | cd .. 7 | pause -------------------------------------------------------------------------------- /contrib/epee/include/net/levin_client_async.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/include/net/levin_client_async.inl -------------------------------------------------------------------------------- /contrib/epee/include/net/local_ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/include/net/local_ip.h -------------------------------------------------------------------------------- /contrib/epee/include/serialization/serialize_base.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /contrib/epee/include/warnings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_MSC_VER) 4 | 5 | #define PUSH_VS_WARNINGS __pragma(warning(push)) 6 | #define POP_VS_WARNINGS __pragma(warning(pop)) 7 | 8 | #define PUSH_GCC_WARNINGS 9 | #define POP_GCC_WARNINGS 10 | 11 | #define DISABLE_VS_WARNINGS(w) __pragma(warning(disable: w)) 12 | #define DISABLE_GCC_WARNING(w) 13 | #define DISABLE_CLANG_WARNING(w) 14 | #define DISABLE_GCC_AND_CLANG_WARNING(w) 15 | #define ATTRIBUTE_UNUSED 16 | 17 | #else 18 | 19 | 20 | #define ATTRIBUTE_UNUSED __attribute__((unused)) 21 | 22 | #include 23 | 24 | #define PUSH_VS_WARNINGS 25 | #define POP_VS_WARNINGS 26 | 27 | #define PUSH_GCC_WARNINGS _Pragma("GCC diagnostic push") 28 | #define POP_GCC_WARNINGS _Pragma("GCC diagnostic pop") 29 | 30 | #define DISABLE_VS_WARNINGS(w) 31 | 32 | #if defined(__clang__) 33 | #define DISABLE_GCC_WARNING(w) 34 | #define DISABLE_CLANG_WARNING DISABLE_GCC_AND_CLANG_WARNING 35 | #else 36 | #define DISABLE_GCC_WARNING DISABLE_GCC_AND_CLANG_WARNING 37 | #define DISABLE_CLANG_WARNING(w) 38 | #endif 39 | 40 | #define DISABLE_GCC_AND_CLANG_WARNING(w) _Pragma(BOOST_PP_STRINGIZE(GCC diagnostic ignored BOOST_PP_STRINGIZE(-W##w))) 41 | 42 | #endif 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/tests/data/storages/invalid_storage_1.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/tests/data/storages/invalid_storage_2.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/tests/data/storages/invalid_storage_3.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_4.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/tests/data/storages/invalid_storage_4.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/valid_storage.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/epee/tests/data/storages/valid_storage.bin -------------------------------------------------------------------------------- /contrib/epee/tests/generate_vc_proj.bat: -------------------------------------------------------------------------------- 1 | mkdir build 2 | cd build 3 | cmake "-DBoost_USE_STATIC_LIBS=TRUE" -G "Visual Studio 11 Win64" ../src 4 | cd .. 5 | pause -------------------------------------------------------------------------------- /contrib/epee/tests/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(Boost_USE_MULTITHREADED ON) 5 | 6 | include_directories(.) 7 | include_directories(../../include) 8 | 9 | find_package(Boost COMPONENTS system filesystem thread date_time chrono regex) 10 | include_directories( ${Boost_INCLUDE_DIRS} ) 11 | 12 | IF (MSVC) 13 | add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /nologo /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /bigobj" ) 14 | include_directories(SYSTEM platform/msvc) 15 | ELSE() 16 | # set stuff for other systems 17 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall -Werror") 18 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes") # needed for AES 19 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -Wno-reorder") 20 | ENDIF() 21 | 22 | 23 | # Add folders to filters 24 | file(GLOB_RECURSE SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 25 | ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp 26 | ${CMAKE_CURRENT_SOURCE_DIR}/*.inl 27 | ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 28 | 29 | source_group(general FILES ${SRC}) 30 | 31 | 32 | add_executable(tests ${SRC} ) 33 | target_link_libraries( tests ${Boost_LIBRARIES} ) 34 | 35 | -------------------------------------------------------------------------------- /contrib/ethereum/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(libethash) 2 | 3 | set_property(TARGET ethash PROPERTY FOLDER "contrib") 4 | 5 | if(MSVC) 6 | target_compile_options(ethash PRIVATE /wd4477 /wd4267) 7 | else() 8 | target_compile_options(ethash PRIVATE -Wno-format -Wno-aggregate-return -Wno-empty-body) 9 | endif() 10 | 11 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | # set(include_dir ${PROJECT_SOURCE_DIR}/include) 6 | 7 | 8 | add_library( 9 | ethash 10 | bit_manipulation.h 11 | builtins.h 12 | endianness.hpp 13 | ethash/ethash.h 14 | ethash/ethash.hpp 15 | ethash-internal.hpp 16 | ethash.cpp 17 | ethash/hash_types.h 18 | managed.cpp 19 | ethash/keccak.h 20 | ethash/keccak.hpp 21 | keccak.c 22 | keccakf800.c 23 | keccakf1600.c 24 | kiss99.hpp 25 | primes.h 26 | primes.c 27 | ethash/progpow.hpp 28 | progpow.cpp 29 | ) 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/builtins.h: -------------------------------------------------------------------------------- 1 | /* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | /** 7 | * @file 8 | * Implementation of GCC/clang builtins for MSVC compiler. 9 | */ 10 | 11 | #pragma once 12 | 13 | #ifdef _MSC_VER 14 | #include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /** 21 | * Returns the number of leading 0-bits in `x`, starting at the most significant bit position. 22 | * If `x` is 0, the result is undefined. 23 | */ 24 | static inline int __builtin_clz(unsigned int x) 25 | { 26 | unsigned long most_significant_bit; 27 | _BitScanReverse(&most_significant_bit, x); 28 | return 31 - (int)most_significant_bit; 29 | } 30 | 31 | /** 32 | * Returns the number of 1-bits in `x`. 33 | */ 34 | static inline int __builtin_popcount(unsigned int x) 35 | { 36 | return (int)__popcnt(x); 37 | } 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/ethash/hash_types.h: -------------------------------------------------------------------------------- 1 | /* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | union ethash_hash256 15 | { 16 | uint64_t word64s[4]; 17 | uint32_t word32s[8]; 18 | uint8_t bytes[32]; 19 | }; 20 | 21 | union ethash_hash512 22 | { 23 | uint64_t word64s[8]; 24 | uint32_t word32s[16]; 25 | uint8_t bytes[64]; 26 | }; 27 | 28 | union ethash_hash1024 29 | { 30 | union ethash_hash512 hash512s[2]; 31 | uint64_t word64s[16]; 32 | uint32_t word32s[32]; 33 | uint8_t bytes[128]; 34 | }; 35 | 36 | union ethash_hash2048 37 | { 38 | union ethash_hash512 hash512s[4]; 39 | uint64_t word64s[32]; 40 | uint32_t word32s[64]; 41 | uint8_t bytes[256]; 42 | }; 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/ethash/hash_types.hpp: -------------------------------------------------------------------------------- 1 | // ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | // Copyright 2018 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ethash 10 | { 11 | using hash256 = ethash_hash256; 12 | using hash512 = ethash_hash512; 13 | using hash1024 = ethash_hash1024; 14 | using hash2048 = ethash_hash2048; 15 | } // namespace ethash 16 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/ethash/keccak.hpp: -------------------------------------------------------------------------------- 1 | // ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | // Copyright 2018 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ethash 11 | { 12 | inline hash256 keccak256(const uint8_t* data, size_t size) noexcept 13 | { 14 | return ethash_keccak256(data, size); 15 | } 16 | 17 | inline hash256 keccak256(const hash256& input) noexcept 18 | { 19 | return ethash_keccak256_32(input.bytes); 20 | } 21 | 22 | inline hash512 keccak512(const uint8_t* data, size_t size) noexcept 23 | { 24 | return ethash_keccak512(data, size); 25 | } 26 | 27 | inline hash512 keccak512(const hash512& input) noexcept 28 | { 29 | return ethash_keccak512_64(input.bytes); 30 | } 31 | 32 | static constexpr auto keccak256_32 = ethash_keccak256_32; 33 | static constexpr auto keccak512_64 = ethash_keccak512_64; 34 | 35 | } // namespace ethash 36 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/ethash/version.h: -------------------------------------------------------------------------------- 1 | /* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | * Copyright 2019 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | #pragma once 7 | 8 | /** The ethash library version. */ 9 | #define ETHASH_VERSION "0.4.3" 10 | 11 | #ifdef __cplusplus 12 | namespace ethash 13 | { 14 | /// The ethash library version. 15 | constexpr auto version = ETHASH_VERSION; 16 | 17 | } // namespace ethash 18 | #endif 19 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/primes.c: -------------------------------------------------------------------------------- 1 | /* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | #include "primes.h" 7 | 8 | /** Checks if the number is prime. Requires the number to be > 2 and odd. */ 9 | static int is_odd_prime(int number) 10 | { 11 | int d; 12 | 13 | /* Check factors up to sqrt(number). 14 | To avoid computing sqrt, compare d*d <= number with 64-bit precision. */ 15 | for (d = 3; (int64_t)d * (int64_t)d <= (int64_t)number; d += 2) 16 | { 17 | if (number % d == 0) 18 | return 0; 19 | } 20 | 21 | return 1; 22 | } 23 | 24 | int ethash_find_largest_prime(int upper_bound) 25 | { 26 | int n = upper_bound; 27 | 28 | if (n < 2) 29 | return 0; 30 | 31 | if (n == 2) 32 | return 2; 33 | 34 | /* If even number, skip it. */ 35 | if (n % 2 == 0) 36 | --n; 37 | 38 | /* Test descending odd numbers. */ 39 | while (!is_odd_prime(n)) 40 | n -= 2; 41 | 42 | return n; 43 | } 44 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/primes.h: -------------------------------------------------------------------------------- 1 | /* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | /** 15 | * Finds the largest prime number not greater than the provided upper bound. 16 | * 17 | * @param upper_bound The upper bound. SHOULD be greater than 1. 18 | * @return The largest prime number `p` such `p <= upper_bound`. 19 | * In case `upper_bound <= 1`, returns 0. 20 | */ 21 | int ethash_find_largest_prime(int upper_bound) NOEXCEPT; 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /contrib/ethereum/libethash/support/attributes.h: -------------------------------------------------------------------------------- 1 | /* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | #pragma once 7 | 8 | /** inline */ 9 | #if _MSC_VER || __STDC_VERSION__ 10 | #define INLINE inline 11 | #else 12 | #define INLINE 13 | #endif 14 | 15 | /** [[always_inline]] */ 16 | #if _MSC_VER 17 | #define ALWAYS_INLINE __forceinline 18 | #elif defined(__has_attribute) && __STDC_VERSION__ 19 | #if __has_attribute(always_inline) 20 | #define ALWAYS_INLINE __attribute__((always_inline)) 21 | #endif 22 | #endif 23 | #if !defined(ALWAYS_INLINE) 24 | #define ALWAYS_INLINE 25 | #endif 26 | 27 | /** [[no_sanitize()]] */ 28 | #if __clang__ 29 | #define NO_SANITIZE(sanitizer) \ 30 | __attribute__((no_sanitize(sanitizer))) 31 | #else 32 | #define NO_SANITIZE(sanitizer) 33 | #endif 34 | -------------------------------------------------------------------------------- /contrib/zlib/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/ada/zlib.gpr: -------------------------------------------------------------------------------- 1 | project Zlib is 2 | 3 | for Languages use ("Ada"); 4 | for Source_Dirs use ("."); 5 | for Object_Dir use "."; 6 | for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); 7 | 8 | package Compiler is 9 | for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); 10 | end Compiler; 11 | 12 | package Linker is 13 | for Default_Switches ("ada") use ("-lz"); 14 | end Linker; 15 | 16 | package Builder is 17 | for Default_Switches ("ada") use ("-s", "-gnatQ"); 18 | end Builder; 19 | 20 | end Zlib; 21 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/blast/test.pk -------------------------------------------------------------------------------- /contrib/zlib/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /contrib/zlib/contrib/delphi/ZLibConst.pas: -------------------------------------------------------------------------------- 1 | unit ZLibConst; 2 | 3 | interface 4 | 5 | resourcestring 6 | sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; 7 | sInvalidStreamOp = 'Invalid stream operation'; 8 | 9 | implementation 10 | 11 | end. 12 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET 13 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET 14 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET 15 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /contrib/zlib/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/iostream/test.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "zfstream.h" 3 | 4 | int main() { 5 | 6 | // Construct a stream object with this filebuffer. Anything sent 7 | // to this stream will go to standard out. 8 | gzofstream os( 1, ios::out ); 9 | 10 | // This text is getting compressed and sent to stdout. 11 | // To prove this, run 'test | zcat'. 12 | os << "Hello, Mommy" << endl; 13 | 14 | os << setcompressionlevel( Z_NO_COMPRESSION ); 15 | os << "hello, hello, hi, ho!" << endl; 16 | 17 | setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) 18 | << "I'm compressing again" << endl; 19 | 20 | os.close(); 21 | 22 | return 0; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/iostream2/zstream_test.cpp: -------------------------------------------------------------------------------- 1 | #include "zstream.h" 2 | #include 3 | #include 4 | #include 5 | 6 | void main() { 7 | char h[256] = "Hello"; 8 | char* g = "Goodbye"; 9 | ozstream out("temp.gz"); 10 | out < "This works well" < h < g; 11 | out.close(); 12 | 13 | izstream in("temp.gz"); // read it back 14 | char *x = read_string(in), *y = new char[256], z[256]; 15 | in > y > z; 16 | in.close(); 17 | cout << x << endl << y << endl << z << endl; 18 | 19 | out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results 20 | out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; 21 | out << z << endl << y << endl << x << endl; 22 | out << 1.1234567890123456789 << endl; 23 | 24 | delete[] x; delete[] y; 25 | } 26 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/iostream3/TODO: -------------------------------------------------------------------------------- 1 | Possible upgrades to gzfilebuf: 2 | 3 | - The ability to do putback (e.g. putbackfail) 4 | 5 | - The ability to seek (zlib supports this, but could be slow/tricky) 6 | 7 | - Simultaneous read/write access (does it make sense?) 8 | 9 | - Support for ios_base::ate open mode 10 | 11 | - Locale support? 12 | 13 | - Check public interface to see which calls give problems 14 | (due to dependence on library internals) 15 | 16 | - Override operator<<(ostream&, gzfilebuf*) to allow direct copying 17 | of stream buffer to stream ( i.e. os << is.rdbuf(); ) 18 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/masmx64/bld_ml64.bat: -------------------------------------------------------------------------------- 1 | ml64.exe /Flinffasx64 /c /Zi inffasx64.asm 2 | ml64.exe /Flgvmat64 /c /Zi gvmat64.asm 3 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/masmx86/bld_ml32.bat: -------------------------------------------------------------------------------- 1 | ml /coff /Zi /c /Flmatch686.lst match686.asm 2 | ml /coff /Zi /c /Flinffas32.lst inffas32.asm 3 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/masmx86/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | Summary 3 | ------- 4 | This directory contains ASM implementations of the functions 5 | longest_match() and inflate_fast(). 6 | 7 | 8 | Use instructions 9 | ---------------- 10 | Assemble using MASM, and copy the object files into the zlib source 11 | directory, then run the appropriate makefile, as suggested below. You can 12 | donwload MASM from here: 13 | 14 | http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 15 | 16 | You can also get objects files here: 17 | 18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip 19 | 20 | Build instructions 21 | ------------------ 22 | * With Microsoft C and MASM: 23 | nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" 24 | 25 | * With Borland C and TASM: 26 | make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" 27 | 28 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-O -I../.. 3 | 4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a 5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a 6 | 7 | .c.o: 8 | $(CC) -c $(CFLAGS) $*.c 9 | 10 | all: miniunz minizip 11 | 12 | miniunz: $(UNZ_OBJS) 13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 14 | 15 | minizip: $(ZIP_OBJS) 16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 17 | 18 | test: miniunz minizip 19 | ./minizip test readme.txt 20 | ./miniunz -l test.zip 21 | mv readme.txt readme.old 22 | ./miniunz test.zip 23 | 24 | clean: 25 | /bin/rm -f *.o *~ minizip miniunz 26 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libminizip.la 2 | 3 | if COND_DEMOS 4 | bin_PROGRAMS = miniunzip minizip 5 | endif 6 | 7 | zlib_top_srcdir = $(top_srcdir)/../.. 8 | zlib_top_builddir = $(top_builddir)/../.. 9 | 10 | AM_CPPFLAGS = -I$(zlib_top_srcdir) 11 | AM_LDFLAGS = -L$(zlib_top_builddir) 12 | 13 | if WIN32 14 | iowin32_src = iowin32.c 15 | iowin32_h = iowin32.h 16 | endif 17 | 18 | libminizip_la_SOURCES = \ 19 | ioapi.c \ 20 | mztools.c \ 21 | unzip.c \ 22 | zip.c \ 23 | ${iowin32_src} 24 | 25 | libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 26 | 27 | minizip_includedir = $(includedir)/minizip 28 | minizip_include_HEADERS = \ 29 | crypt.h \ 30 | ioapi.h \ 31 | mztools.h \ 32 | unzip.h \ 33 | zip.h \ 34 | ${iowin32_h} 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = minizip.pc 38 | 39 | EXTRA_PROGRAMS = miniunzip minizip 40 | 41 | miniunzip_SOURCES = miniunz.c 42 | miniunzip_LDADD = libminizip.la 43 | 44 | minizip_SOURCES = minizip.c 45 | minizip_LDADD = libminizip.la -lz 46 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derrived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com]) 5 | AC_CONFIG_SRCDIR([minizip.c]) 6 | AM_INIT_AUTOMAKE([foreign]) 7 | LT_INIT 8 | 9 | AC_MSG_CHECKING([whether to build example programs]) 10 | AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) 11 | AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) 12 | if test "$enable_demos" = yes 13 | then 14 | AC_MSG_RESULT([yes]) 15 | else 16 | AC_MSG_RESULT([no]) 17 | fi 18 | 19 | case "${host}" in 20 | *-mingw* | mingw*) 21 | WIN32="yes" 22 | ;; 23 | *) 24 | ;; 25 | esac 26 | AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) 27 | 28 | 29 | AC_SUBST([HAVE_UNISTD_H], [0]) 30 | AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) 31 | AC_CONFIG_FILES([Makefile minizip.pc]) 32 | AC_OUTPUT 33 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 22 | void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); 23 | void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); 24 | void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/make_vms.com: -------------------------------------------------------------------------------- 1 | $ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig 2 | $ open/write zdef vmsdefs.h 3 | $ copy sys$input: zdef 4 | $ deck 5 | #define unix 6 | #define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from 7 | #define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator 8 | #define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord 9 | #define Write_EndOfCentralDirectoryRecord Write_EoDRecord 10 | $ eod 11 | $ close zdef 12 | $ copy vmsdefs.h,ioapi.h_orig ioapi.h 13 | $ cc/include=[--]/prefix=all ioapi.c 14 | $ cc/include=[--]/prefix=all miniunz.c 15 | $ cc/include=[--]/prefix=all unzip.c 16 | $ cc/include=[--]/prefix=all minizip.c 17 | $ cc/include=[--]/prefix=all zip.c 18 | $ link miniunz,unzip,ioapi,[--]libz.olb/lib 19 | $ link minizip,zip,ioapi,[--]libz.olb/lib 20 | $ mcr []minizip test minizip_info.txt 21 | $ mcr []miniunz -l test.zip 22 | $ rename minizip_info.txt; minizip_info.txt_old 23 | $ mcr []miniunz test.zip 24 | $ delete test.zip;* 25 | $exit 26 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/minizip.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/minizip 5 | 6 | Name: minizip 7 | Description: Minizip zip file manipulation library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lminizip 11 | Libs.private: -lz 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /contrib/zlib/contrib/testzlib/testzlib.txt: -------------------------------------------------------------------------------- 1 | To build testzLib with Visual Studio 2005: 2 | 3 | copy to a directory file from : 4 | - root of zLib tree 5 | - contrib/testzlib 6 | - contrib/masmx86 7 | - contrib/masmx64 8 | - contrib/vstudio/vc7 9 | 10 | and open testzlib8.sln -------------------------------------------------------------------------------- /contrib/zlib/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {048af943-022b-4db6-beeb-a54c34774ee2} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {0844199a-966b-4f19-81db-1e0125e141b9} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c0419b40-bf50-40da-b153-ff74215b79de} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {bb87b070-735b-478e-92ce-7383abb2f36c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {f46ab6a6-548f-43cb-ae96-681abb5bd5db} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {fa61a89f-93fc-4c89-b29e-36224b7592f4} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {d4b85da0-2ba2-4934-b57f-e2584e3848ee} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc10/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc11/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc12/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc14/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /contrib/zlib/contrib/vstudio/vc9/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /contrib/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /contrib/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /contrib/zlib/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /contrib/zlib/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /contrib/zlib/old/os2/zlib.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Slightly modified version of ../nt/zlib.dnt :-) 3 | ; 4 | 5 | LIBRARY Z 6 | DESCRIPTION "Zlib compression library for OS/2" 7 | CODE PRELOAD MOVEABLE DISCARDABLE 8 | DATA PRELOAD MOVEABLE MULTIPLE 9 | 10 | EXPORTS 11 | adler32 12 | compress 13 | crc32 14 | deflate 15 | deflateCopy 16 | deflateEnd 17 | deflateInit2_ 18 | deflateInit_ 19 | deflateParams 20 | deflateReset 21 | deflateSetDictionary 22 | gzclose 23 | gzdopen 24 | gzerror 25 | gzflush 26 | gzopen 27 | gzread 28 | gzwrite 29 | inflate 30 | inflateEnd 31 | inflateInit2_ 32 | inflateInit_ 33 | inflateReset 34 | inflateSetDictionary 35 | inflateSync 36 | uncompress 37 | zlibVersion 38 | gzprintf 39 | gzputc 40 | gzgetc 41 | gzseek 42 | gzrewind 43 | gztell 44 | gzeof 45 | gzsetparams 46 | zError 47 | inflateSyncPoint 48 | get_crc_table 49 | compress2 50 | gzputs 51 | gzgets 52 | -------------------------------------------------------------------------------- /contrib/zlib/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /contrib/zlib/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/contrib/zlib/zlib.3.pdf -------------------------------------------------------------------------------- /contrib/zlib/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /contrib/zlib/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - source: /**/src/gui/qt-daemon/html_source/src/assets/i18n/en.json 3 | translation: /**/src/gui/qt-daemon/html_source/src/assets/i18n/%two_letters_code%.json 4 | -------------------------------------------------------------------------------- /resources/Zano WP.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/Zano WP.pdf -------------------------------------------------------------------------------- /resources/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/app_icon_256.png -------------------------------------------------------------------------------- /resources/dmg_installer_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/dmg_installer_bg.png -------------------------------------------------------------------------------- /resources/installer_bg_164x313.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/installer_bg_164x313.bmp -------------------------------------------------------------------------------- /resources/installer_bg_191x385.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/installer_bg_191x385.bmp -------------------------------------------------------------------------------- /resources/installer_bg_246x457.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/installer_bg_246x457.bmp -------------------------------------------------------------------------------- /resources/installer_bg_328x628.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/resources/installer_bg_328x628.bmp -------------------------------------------------------------------------------- /src/common/atomics_boost_serialization.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace boost 10 | { 11 | namespace serialization 12 | { 13 | template 14 | inline void save(Archive &a, const std::atomic &x, const boost::serialization::version_type ver) 15 | { 16 | a << x.load(); 17 | } 18 | 19 | template 20 | inline void load(Archive &a, std::atomic &x, const boost::serialization::version_type ver) 21 | { 22 | value_t s = AUTO_VAL_INIT(s); 23 | a >> s; 24 | x.store(s); 25 | } 26 | template 27 | inline void serialize(Archive &a, std::atomic &x, const boost::serialization::version_type ver) 28 | { 29 | split_free(a, x, ver); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/common/base58.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | namespace tools 13 | { 14 | namespace base58 15 | { 16 | std::string encode(const std::string& data); 17 | bool decode(const std::string& enc, std::string& data); 18 | 19 | std::string encode_addr(uint64_t tag, const std::string& data); 20 | bool decode_addr(std::string addr, uint64_t& tag, std::string& data); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/common/callstack_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | #pragma once 5 | #include 6 | 7 | namespace tools 8 | { 9 | #if defined(WIN32) 10 | extern std::string get_callstack_win_x64(); 11 | #endif 12 | 13 | inline std::string get_callstack() 14 | { 15 | #if defined(__GNUC__) 16 | return epee::misc_utils::print_trace_default(); 17 | #elif defined(WIN32) 18 | return get_callstack_win_x64(); 19 | #else 20 | return ""; 21 | #endif 22 | } 23 | 24 | } // namespace tools 25 | -------------------------------------------------------------------------------- /src/common/crypto_stream_operators.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018-2019 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | #include "crypto_stream_operators.h" 5 | 6 | bool parse_hash256(const std::string str_hash, crypto::hash& hash) 7 | { 8 | std::string buf; 9 | bool res = epee::string_tools::parse_hexstr_to_binbuff(str_hash, buf); 10 | if (!res || buf.size() != sizeof(crypto::hash)) 11 | { 12 | std::cout << "invalid hash format: <" << str_hash << '>' << std::endl; 13 | return false; 14 | } 15 | 16 | buf.copy(reinterpret_cast(&hash), sizeof(crypto::hash)); 17 | return true; 18 | } 19 | -------------------------------------------------------------------------------- /src/common/encryption_filter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | 6 | #include "encryption_filter.h" 7 | #include "crypto/chacha8_stream.h" -------------------------------------------------------------------------------- /src/common/general_purpose_commands_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | #include "serialization/keyvalue_hexemizer.h" 7 | #include "currency_core/currency_basic.h" 8 | #include "storages/portable_storage_base.h" 9 | #include "currency_core/basic_api_response_codes.h" 10 | #include "common/error_codes.h" 11 | namespace currency 12 | { 13 | //----------------------------------------------- 14 | 15 | 16 | struct tx_cost_struct 17 | { 18 | std::string usd_needed_for_erc20; 19 | std::string zano_needed_for_erc20; 20 | 21 | BEGIN_KV_SERIALIZE_MAP() 22 | KV_SERIALIZE(usd_needed_for_erc20) 23 | KV_SERIALIZE(zano_needed_for_erc20) 24 | END_KV_SERIALIZE_MAP() 25 | }; 26 | 27 | struct rpc_get_wrap_info_response 28 | { 29 | std::string unwraped_coins_left; 30 | tx_cost_struct tx_cost; 31 | 32 | BEGIN_KV_SERIALIZE_MAP() 33 | KV_SERIALIZE(unwraped_coins_left) 34 | KV_SERIALIZE(tx_cost) 35 | END_KV_SERIALIZE_MAP() 36 | }; 37 | 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/common/ntp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 Zano Project 2 | 3 | #pragma once 4 | #include 5 | #include 6 | 7 | namespace tools 8 | { 9 | 10 | // requests current time via NTP from 'host_hame' using 'timeout_sec' 11 | // may return zero -- means error 12 | int64_t get_ntp_time(const std::string& host_name, size_t timeout_sec = 5); 13 | 14 | // request time via predefined NTP servers 15 | // may return zero -- mean error 16 | int64_t get_ntp_time(); 17 | 18 | } // namespace tools 19 | -------------------------------------------------------------------------------- /src/common/pod-class.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | // in C++ no difference 'class' vs 'struct' except the default members access. 8 | // maybe be better to erase the 'POD_CLASS' macro completely? 9 | #define POD_CLASS struct 10 | -------------------------------------------------------------------------------- /src/common/tor_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #include "tor-connect/torlib/tor_wrapper.h" 8 | 9 | 10 | 11 | namespace tools 12 | { 13 | typedef epee::levin::levin_client_impl2 levin_over_tor_client; 14 | 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/common/util.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/src/common/util.cpp -------------------------------------------------------------------------------- /src/crypto/RIPEMD160_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020 The Zano developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #include "hash.h" 8 | 9 | 10 | namespace crypto { 11 | 12 | #pragma pack(push, 1) 13 | POD_CLASS hash160{ 14 | char data[20]; 15 | }; 16 | #pragma pack(pop) 17 | 18 | void RIPEMD160_hash(const void *data, size_t length, hash160 &h); 19 | hash160 RIPEMD160_hash(const void *data, size_t length); 20 | hash RIPEMD160_hash_256(const void *data, size_t length); 21 | 22 | } 23 | 24 | POD_MAKE_HASHABLE(crypto, hash160) 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/crypto/bitcoin/cpuid.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2019 The Bitcoin Core developers 2 | // Distributed under the MIT software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #ifndef BITCOIN_COMPAT_CPUID_H 6 | #define BITCOIN_COMPAT_CPUID_H 7 | 8 | #if defined(__x86_64__) || defined(__amd64__) || defined(__i386__) 9 | #define HAVE_GETCPUID 10 | 11 | #include 12 | 13 | // We can't use cpuid.h's __get_cpuid as it does not support subleafs. 14 | void static inline GetCPUID(uint32_t leaf, uint32_t subleaf, uint32_t& a, uint32_t& b, uint32_t& c, uint32_t& d) 15 | { 16 | #ifdef __GNUC__ 17 | __cpuid_count(leaf, subleaf, a, b, c, d); 18 | #else 19 | __asm__ ("cpuid" : "=a"(a), "=b"(b), "=c"(c), "=d"(d) : "0"(leaf), "2"(subleaf)); 20 | #endif 21 | } 22 | 23 | #endif // defined(__x86_64__) || defined(__amd64__) || defined(__i386__) 24 | #endif // BITCOIN_COMPAT_CPUID_H 25 | -------------------------------------------------------------------------------- /src/crypto/bitcoin/sha256.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 The Bitcoin Core developers 2 | // Distributed under the MIT software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #ifndef BITCOIN_CRYPTO_SHA256_H 6 | #define BITCOIN_CRYPTO_SHA256_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | /** A hasher class for SHA-256. */ 13 | class CSHA256 14 | { 15 | private: 16 | uint32_t s[8]; 17 | unsigned char buf[64]; 18 | uint64_t bytes; 19 | 20 | public: 21 | static const size_t OUTPUT_SIZE = 32; 22 | 23 | CSHA256(); 24 | CSHA256& Write(const unsigned char* data, size_t len); 25 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 26 | CSHA256& Reset(); 27 | }; 28 | 29 | /** Autodetect the best available SHA256 implementation. 30 | * Returns the name of the implementation. 31 | */ 32 | std::string SHA256AutoDetect(); 33 | 34 | /** Compute multiple double-SHA256's of 64-byte blobs. 35 | * output: pointer to a blocks*32 byte output buffer 36 | * input: pointer to a blocks*64 byte input buffer 37 | * blocks: the number of hashes to compute. 38 | */ 39 | void SHA256D64(unsigned char* output, const unsigned char* input, size_t blocks); 40 | 41 | #endif // BITCOIN_CRYPTO_SHA256_H -------------------------------------------------------------------------------- /src/crypto/bitcoin/sha256_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020 The Zano developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #include "crypto/hash.h" 8 | #include "sha256.h" 9 | 10 | 11 | namespace crypto { 12 | 13 | inline void sha256_hash(const void *data, std::size_t length, hash &h) 14 | { 15 | CSHA256 sh; 16 | sh.Write((const unsigned char*)data, length); 17 | sh.Finalize((unsigned char* )&h); 18 | } 19 | 20 | inline hash sha256_hash(const void *data, std::size_t length) 21 | { 22 | hash h; 23 | sha256_hash(data, length, h); 24 | return h; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/crypto/ecrypt-machine.h: -------------------------------------------------------------------------------- 1 | /* ecrypt-machine.h */ 2 | 3 | /* 4 | * This file is included by 'ecrypt-portable.h'. It allows to override 5 | * the default macros for specific platforms. Please carefully check 6 | * the machine code generated by your compiler (with optimisations 7 | * turned on) before deciding to edit this file. 8 | */ 9 | 10 | /* ------------------------------------------------------------------------- */ 11 | 12 | #if (defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT)) 13 | 14 | #define ECRYPT_MACHINE_ROT 15 | 16 | #if (defined(WIN32) && defined(_MSC_VER)) 17 | 18 | #undef ROTL32 19 | #undef ROTR32 20 | #undef ROTL64 21 | #undef ROTR64 22 | 23 | #include 24 | 25 | #define ROTL32(v, n) _lrotl(v, n) 26 | #define ROTR32(v, n) _lrotr(v, n) 27 | #define ROTL64(v, n) _rotl64(v, n) 28 | #define ROTR64(v, n) _rotr64(v, n) 29 | 30 | #endif 31 | 32 | #endif 33 | 34 | /* ------------------------------------------------------------------------- */ 35 | 36 | #if (defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP)) 37 | 38 | #define ECRYPT_MACHINE_SWAP 39 | 40 | /* 41 | * If you want to overwrite the default swap macros, put it here. And so on. 42 | */ 43 | 44 | #endif 45 | 46 | /* ------------------------------------------------------------------------- */ -------------------------------------------------------------------------------- /src/crypto/hash.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Zano project 2 | // Copyright (c) 2012-2013 The Cryptonote developers 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include "hash-ops.h" 11 | #include "keccak.h" 12 | 13 | void hash_permutation(union hash_state *state) { 14 | keccakf((uint64_t*)state, 24); 15 | } 16 | 17 | void hash_process(union hash_state *state, const uint8_t *buf, size_t count) { 18 | keccak1600(buf, (int)count, (uint8_t*)state); 19 | } 20 | 21 | void cn_fast_hash_old(const void *data, size_t length, char *hash) 22 | { 23 | union hash_state state; 24 | hash_process(&state, data, length); 25 | memcpy(hash, &state, HASH_SIZE); 26 | } 27 | 28 | void cn_fast_hash(const void *data, size_t length, char *hash) 29 | { 30 | keccak(data, (int)length, (uint8_t*)hash, HASH_SIZE); 31 | } 32 | -------------------------------------------------------------------------------- /src/crypto/initializer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #if defined(__GNUC__) 8 | #define INITIALIZER(name) __attribute__((constructor(101))) static void name(void) 9 | #define FINALIZER(name) __attribute__((destructor(101))) static void name(void) 10 | #define REGISTER_FINALIZER(name) ((void) 0) 11 | 12 | #elif defined(_MSC_VER) 13 | #include 14 | #include 15 | // http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc 16 | // http://msdn.microsoft.com/en-us/library/bb918180.aspx 17 | #pragma section(".CRT$XCT", read) 18 | #define INITIALIZER(name) \ 19 | static void __cdecl name(void); \ 20 | __declspec(allocate(".CRT$XCT")) void (__cdecl *const _##name)(void) = &name; \ 21 | static void __cdecl name(void) 22 | #define FINALIZER(name) \ 23 | static void __cdecl name(void) 24 | #define REGISTER_FINALIZER(name) \ 25 | do { \ 26 | int _res = atexit(name); \ 27 | assert(_res == 0); \ 28 | } while (0); 29 | 30 | #else 31 | #error Unsupported compiler 32 | #endif 33 | -------------------------------------------------------------------------------- /src/crypto/keccak.h: -------------------------------------------------------------------------------- 1 | // keccak.h 2 | // 19-Nov-11 Markku-Juhani O. Saarinen 3 | 4 | #ifndef KECCAK_H 5 | #define KECCAK_H 6 | 7 | #include 8 | #include 9 | 10 | #ifndef KECCAK_ROUNDS 11 | #define KECCAK_ROUNDS 24 12 | #endif 13 | 14 | #ifndef ROTL64 15 | #define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y)))) 16 | #endif 17 | 18 | // compute a keccak hash (md) of given byte length from "in" 19 | int keccak(const uint8_t *in, int inlen, uint8_t *md, int mdlen); 20 | 21 | // update the state 22 | void keccakf(uint64_t st[25], int norounds); 23 | 24 | void keccak1600(const uint8_t *in, int inlen, uint8_t *md); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/crypto/msm.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023-2023 Zano Project 2 | // Copyright (c) 2023-2023 sowle (val@zano.org, crypto.sowle@gmail.com) 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | // 6 | #include "epee/include/misc_log_ex.h" 7 | //#include "zarcanum.h" 8 | #include "msm.h" 9 | //#include "../currency_core/crypto_config.h" // TODO: move it to the crypto 10 | //#include "../common/crypto_stream_operators.h" // TODO: move it to the crypto 11 | 12 | #if 0 13 | # define DBG_VAL_PRINT(x) std::cout << std::setw(30) << std::left << #x ": " << x << std::endl 14 | # define DBG_PRINT(x) std::cout << x << std::endl 15 | #else 16 | # define DBG_VAL_PRINT(x) (void(0)) 17 | # define DBG_PRINT(x) (void(0)) 18 | #endif 19 | 20 | namespace crypto 21 | { 22 | 23 | 24 | 25 | } // namespace crypto 26 | -------------------------------------------------------------------------------- /src/crypto/range_proofs.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021 Zano Project (https://zano.org/) 2 | // Copyright (c) 2021 sowle (val@zano.org, crypto.sowle@gmail.com) 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | #include "range_proofs.h" 6 | 7 | namespace crypto 8 | { 9 | // TODO @#@# redesign needed, consider changing to inline constexpr 10 | const point_t& bpp_ct_generators_HGX::bpp_G = c_point_H; 11 | const point_t& bpp_ct_generators_HGX::bpp_H = c_point_G; 12 | const point_t& bpp_ct_generators_HGX::bpp_H2 = c_point_X; 13 | 14 | const point_t& bpp_ct_generators_UGX::bpp_G = c_point_U; 15 | const point_t& bpp_ct_generators_UGX::bpp_H = c_point_G; 16 | const point_t& bpp_ct_generators_UGX::bpp_H2 = c_point_X; 17 | } 18 | -------------------------------------------------------------------------------- /src/currency_core/account_boost_serialization.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | 9 | #include "account.h" 10 | #include "currency_core/currency_boost_serialization.h" 11 | 12 | //namespace currency { 13 | namespace boost 14 | { 15 | namespace serialization 16 | { 17 | template 18 | inline void serialize(Archive &a, currency::account_keys &x, const boost::serialization::version_type ver) 19 | { 20 | a & x.account_address; 21 | a & x.spend_secret_key; 22 | a & x.view_secret_key; 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/currency_core/basic_api_response_codes.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | 8 | 9 | #define BASIC_RESPONSE_STATUS_OK "OK" 10 | #define BASIC_RESPONSE_STATUS_BUSY "BUSY" 11 | #define BASIC_RESPONSE_STATUS_NOT_FOUND "NOT_FOUND" 12 | #define BASIC_RESPONSE_STATUS_FAILED "FAILED" 13 | -------------------------------------------------------------------------------- /src/currency_core/basic_kv_structs.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #include "warnings.h" 8 | 9 | PUSH_VS_WARNINGS 10 | DISABLE_VS_WARNINGS(4100) 11 | DISABLE_VS_WARNINGS(4503) 12 | #include "serialization/keyvalue_serialization.h" 13 | #include "storages/portable_storage_template_helper.h" 14 | POP_VS_WARNINGS 15 | 16 | namespace currency 17 | { 18 | template 19 | struct struct_with_one_t_type 20 | { 21 | t_type v; 22 | 23 | BEGIN_KV_SERIALIZE_MAP() 24 | KV_SERIALIZE(v) 25 | END_KV_SERIALIZE_MAP() 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /src/currency_core/bc_block_datetime_service.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2021 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | #pragma once 5 | 6 | #define BC_BLOCK_DATETIME_SERVICE_ID "d" 7 | #define BC_BLOCK_DATETIME_INSTRUCTION_DEFAULT "" 8 | -------------------------------------------------------------------------------- /src/currency_core/bc_offers_service_basic.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #pragma once 7 | 8 | 9 | #define BC_OFFERS_SERVICE_ID "M" 10 | #define BC_OFFERS_SERVICE_INSTRUCTION_ADD "ADD" 11 | #define BC_OFFERS_SERVICE_INSTRUCTION_UPD "UPD" 12 | #define BC_OFFERS_SERVICE_INSTRUCTION_DEL "DEL" 13 | -------------------------------------------------------------------------------- /src/currency_core/bc_payments_id_service.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #pragma once 7 | 8 | 9 | #define BC_PAYMENT_ID_SERVICE_ID "P" 10 | #define BC_PAYMENT_ID_SERVICE_SIZE_MAX 128 // (bytes) maximum allowed size of payment id body 11 | -------------------------------------------------------------------------------- /src/currency_core/block_flags.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Boolberry developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | #define CURRENCY_BLOCK_FLAG_POS_BLOCK 0x01 9 | -------------------------------------------------------------------------------- /src/currency_core/checkpoints.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | #include 9 | 10 | #include "currency_core/currency_format_utils.h" 11 | 12 | namespace currency 13 | { 14 | class checkpoints 15 | { 16 | public: 17 | checkpoints(); 18 | bool add_checkpoint(uint64_t height, const std::string& hash_str); 19 | bool is_in_checkpoint_zone(uint64_t height) const; 20 | bool is_height_passed_zone(uint64_t height, uint64_t blockchain_last_block_height) const; 21 | bool check_block(uint64_t height, const crypto::hash& h) const; 22 | uint64_t get_top_checkpoint_height() const; 23 | 24 | uint64_t get_checkpoint_before_height(uint64_t height) const; 25 | private: 26 | std::map m_points; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /src/currency_core/currency_format_utils_blocks.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018-2019 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | 8 | #include "include_base_utils.h" 9 | #include "crypto/crypto.h" 10 | #include "currency_core/currency_basic.h" 11 | #include "currency_protocol/blobdatatype.h" 12 | 13 | namespace currency 14 | { 15 | blobdata get_block_hashing_blob(const block& b); 16 | bool get_block_hash(const block& b, crypto::hash& res); 17 | crypto::hash get_block_hash(const block& b); 18 | 19 | blobdata block_to_blob(const block& b); 20 | bool block_to_blob(const block& b, blobdata& b_blob); 21 | void get_tx_tree_hash(const std::vector& tx_hashes, crypto::hash& h); 22 | crypto::hash get_tx_tree_hash(const std::vector& tx_hashes); 23 | crypto::hash get_tx_tree_hash(const block& b); 24 | } 25 | -------------------------------------------------------------------------------- /src/currency_core/difficulty.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | #include "crypto/hash.h" 15 | 16 | namespace currency 17 | { 18 | 19 | typedef boost::multiprecision::uint128_t wide_difficulty_type; 20 | 21 | bool check_hash(const crypto::hash &hash, wide_difficulty_type difficulty); 22 | wide_difficulty_type next_difficulty_1(std::vector& timestamps, std::vector& cumulative_difficulties, size_t target_seconds, const wide_difficulty_type& difficulty_starter); 23 | wide_difficulty_type next_difficulty_2(std::vector& timestamps, std::vector& cumulative_difficulties, size_t target_seconds, const wide_difficulty_type& difficulty_starter); 24 | uint64_t difficulty_to_boundary(wide_difficulty_type difficulty); 25 | void difficulty_to_boundary_long(wide_difficulty_type difficulty, crypto::hash& result); 26 | } 27 | -------------------------------------------------------------------------------- /src/currency_core/etc_custom_serialization.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2014-2015 The Boolberry developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #include "currency_format_utils.h" 8 | #include "etc_custom_serialization.h" 9 | 10 | namespace bc_services 11 | { 12 | std::string transform_amount_to_string(const uint64_t& a) 13 | { 14 | // double d = static_cast(a); 15 | // d /= ETC_AMOUNT_DIVIDER; 16 | return std::to_string(a);//print_money(a, ETC_AMOUNT_DIVIDER_DECIMAL_POINT); 17 | } 18 | 19 | uint64_t transform_string_to_amount(const std::string& d) 20 | { 21 | uint64_t n = 0; 22 | epee::string_tools::get_xtype_from_string(n, d); 23 | return n; 24 | } 25 | } -------------------------------------------------------------------------------- /src/currency_core/etc_custom_serialization.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2014-2015 The Boolberry developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | #include 9 | #define ETC_AMOUNT_DIVIDER 100000000 10 | #define ETC_AMOUNT_DIVIDER_DECIMAL_POINT 8 11 | 12 | namespace bc_services 13 | { 14 | std::string transform_amount_to_string(const uint64_t& a); 15 | uint64_t transform_string_to_amount(const std::string& a); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/currency_core/genesis.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2025 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | #pragma once 6 | #include 7 | #include 8 | 9 | namespace currency 10 | { 11 | #pragma pack(push, 1) 12 | #ifndef TESTNET 13 | struct genesis_tx_raw_data 14 | { 15 | uint64_t const v[161]; 16 | uint8_t const r[7]; 17 | }; 18 | 19 | #else 20 | struct genesis_tx_raw_data 21 | { 22 | uint64_t const v[42]; 23 | uint8_t const r[2]; 24 | }; 25 | #endif 26 | #pragma pack(pop) 27 | extern const genesis_tx_raw_data ggenesis_tx_raw; 28 | } 29 | -------------------------------------------------------------------------------- /src/currency_core/tx_semantic_validation.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018-2023 Zano Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | #pragma once 5 | 6 | #include "include_base_utils.h" 7 | #include "currency_format_utils_transactions.h" 8 | 9 | 10 | namespace currency 11 | { 12 | //check correct values, ins and outs types, amounts and all lightweight checks not related to the database 13 | bool validate_tx_semantic(const transaction& tx, size_t tx_block_size); 14 | } 15 | -------------------------------------------------------------------------------- /src/currency_protocol/blobdatatype.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | namespace currency 8 | { 9 | typedef std::string blobdata; 10 | } 11 | -------------------------------------------------------------------------------- /src/gui/qt-daemon/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/src/gui/qt-daemon/app.icns -------------------------------------------------------------------------------- /src/gui/qt-daemon/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyle-team/zano/c86a19de08ee7ed7a8140373562204169096fb94/src/gui/qt-daemon/app.ico -------------------------------------------------------------------------------- /src/gui/qt-daemon/app.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | app.ico 4 | 5 | -------------------------------------------------------------------------------- /src/gui/qt-daemon/app.rc: -------------------------------------------------------------------------------- 1 | 2 | IDI_ICON1 ICON DISCARDABLE "app.ico" -------------------------------------------------------------------------------- /src/gui/qt-daemon/application/gui_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-2013 The Bitcoin Core developers 2 | // Copyright (c) 2015 Boolberry developers 3 | // Copyright (c) 2014-2018 Zano Project 4 | // Copyright (c) 2014-2018 The Louisdor Project 5 | // Distributed under the MIT software license, see the accompanying 6 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 7 | 8 | #pragma once 9 | 10 | namespace gui_tools 11 | { 12 | bool GetStartOnSystemStartup(); 13 | bool SetStartOnSystemStartup(bool fAutoStart); 14 | } -------------------------------------------------------------------------------- /src/gui/qt-daemon/application/notification_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | 7 | #pragma once 8 | #include 9 | #include "epee/include/misc_log_ex.h" 10 | 11 | struct notification_helper 12 | { 13 | static void show(const std::string& title, const std::string& message) 14 | #if !defined(__APPLE__) 15 | { 16 | // just a stub, implemented for macOS only, see .mm 17 | LOG_PRINT_RED("system notifications are supported only for macOS!", LOG_LEVEL_0); 18 | } 19 | #endif 20 | ; 21 | }; 22 | -------------------------------------------------------------------------------- /src/gui/qt-daemon/application/notification_helper.mm: -------------------------------------------------------------------------------- 1 | #include "notification_helper.h" 2 | #include 3 | #include 4 | 5 | void notification_helper::show(const std::string& title, const std::string& message) 6 | { 7 | NSUserNotification *userNotification = [[[NSUserNotification alloc] init] autorelease]; 8 | userNotification.title = [NSString stringWithUTF8String:title.c_str()]; 9 | userNotification.informativeText = [NSString stringWithUTF8String:message.c_str()]; 10 | 11 | NSUserNotificationCenter* center = [NSUserNotificationCenter defaultUserNotificationCenter]; 12 | [center deliverNotification:userNotification]; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /src/gui/qt-daemon/application/urleventfilter.cpp: -------------------------------------------------------------------------------- 1 | #include "urleventfilter.h" 2 | #include 3 | 4 | bool URLEventFilter::eventFilter(QObject *obj, QEvent *event) 5 | { 6 | if (event->type() == QEvent::FileOpen) { 7 | QFileOpenEvent *fileEvent = static_cast(event); 8 | if(!fileEvent->url().isEmpty()) 9 | { 10 | m_pmainwindow->handle_deeplink_click(fileEvent->url().toString()); 11 | //QMessageBox msg; 12 | //msg.setText(fileEvent->url().toString()); 13 | //msg.exec(); 14 | return true; 15 | } 16 | return true; 17 | } else { 18 | // standard event processing 19 | return QObject::eventFilter(obj, event); 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /src/gui/qt-daemon/application/urleventfilter.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "mainwindow.h" 5 | 6 | class URLEventFilter : public QObject 7 | { 8 | Q_OBJECT 9 | public: 10 | URLEventFilter(MainWindow* pmainwindow) : m_pmainwindow(pmainwindow),QObject() 11 | {}; 12 | protected: 13 | bool eventFilter(QObject *obj, QEvent *event) override; 14 | 15 | private: 16 | MainWindow* m_pmainwindow; 17 | }; -------------------------------------------------------------------------------- /src/miner/target_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017 The The Louisdor Project 2 | // Copyright (c) 2012-2013 The Cryptonote developers 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #pragma once 7 | #include "currency_core/difficulty.h" 8 | 9 | 10 | namespace mining 11 | { 12 | inline uint32_t get_target_for_difficulty(currency::difficulty_type difficulty) 13 | { 14 | if(!difficulty) 15 | return 0xffffffff; 16 | return 0xffffffff/static_cast(difficulty); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/p2p/net_peerlist_boost_serialization.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | 9 | namespace boost 10 | { 11 | namespace serialization 12 | { 13 | //BOOST_CLASS_VERSION(odetool::net_adress, 1) 14 | template 15 | inline void serialize(Archive &a, nodetool::net_address& na, const ver_type ver) 16 | { 17 | a & na.ip; 18 | a & na.port; 19 | } 20 | 21 | 22 | template 23 | inline void serialize(Archive &a, nodetool::peerlist_entry& pl, const ver_type ver) 24 | { 25 | a & pl.adr; 26 | a & pl.id; 27 | a & pl.last_seen; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/p2p/p2p_networks.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | 9 | /* 10 | 11 | P2P_NETWORK_ID definition moved to net_node.inl 12 | 13 | namespace nodetool 14 | { 15 | #ifndef TESTNET 16 | const static boost::uuids::uuid P2P_NETWORK_ID = { { 0x11 ,0x10, 0x01, 0x11 , 0x01, 0x20 , 0x01, 0x01, 0x10, 0x11, 0x00, 0x10, 0x11, 0x11, 0x01, 0x10} }; //Bender's nightmare 17 | #else 18 | const static boost::uuids::uuid P2P_NETWORK_ID = { { 0x11 ,0x10, 0x01, 0x11 , 0x01, 0x02 , 0x01, 0x01, 0x10, 0x11, 0x11, 0x10, 0x11, 0x11, 0x01, 0x10} }; //Another Bender's nightmare 19 | #endif 20 | } 21 | */ 22 | -------------------------------------------------------------------------------- /src/pch/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" -------------------------------------------------------------------------------- /src/platform/mingw/alloca.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #include 8 | -------------------------------------------------------------------------------- /src/platform/msc/alloca.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | //#define alloca(size) _alloca(size) 8 | -------------------------------------------------------------------------------- /src/platform/msc/inline_c.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | 8 | #ifndef __cplusplus 9 | #define inline __inline 10 | #endif 11 | -------------------------------------------------------------------------------- /src/platform/msc/stdbool.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #if !defined(__cplusplus) 8 | 9 | typedef int bool; 10 | #define true 1 11 | #define false 0 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/platform/msc/sys/param.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2013 The Cryptonote developers 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | 7 | #define LITTLE_ENDIAN 1234 8 | #define BIG_ENDIAN 4321 9 | #define PDP_ENDIAN 3412 10 | #define BYTE_ORDER LITTLE_ENDIAN 11 | -------------------------------------------------------------------------------- /src/rpc/core_rpc_server_error_codes.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 Zano Project 2 | // Copyright (c) 2014-2018 The Louisdor Project 3 | // Copyright (c) 2012-2013 The Cryptonote developers 4 | // Distributed under the MIT/X11 software license, see the accompanying 5 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 6 | 7 | #pragma once 8 | 9 | 10 | #define CORE_RPC_ERROR_CODE_WRONG_PARAM -1 11 | #define CORE_RPC_ERROR_CODE_TOO_BIG_HEIGHT -2 12 | #define CORE_RPC_ERROR_CODE_TOO_BIG_RESERVE_SIZE -3 13 | #define CORE_RPC_ERROR_CODE_WRONG_WALLET_ADDRESS -4 14 | #define CORE_RPC_ERROR_CODE_INTERNAL_ERROR -5 15 | #define CORE_RPC_ERROR_CODE_WRONG_BLOCKBLOB -6 16 | #define CORE_RPC_ERROR_CODE_BLOCK_NOT_ACCEPTED -7 17 | #define CORE_RPC_ERROR_CODE_CORE_BUSY -9 18 | #define CORE_RPC_ERROR_CODE_INVALID_ALIAS_NAME -10 19 | #define CORE_RPC_ERROR_CODE_INVALID_ALIAS_ADDRESS -11 20 | #define CORE_RPC_ERROR_CODE_ALIAS_COMMENT_TO_LONG -12 21 | #define CORE_RPC_ERROR_CODE_BLOCK_ADDED_AS_ALTERNATIVE -13 22 | #define CORE_RPC_ERROR_CODE_NOT_FOUND -14 23 | 24 | -------------------------------------------------------------------------------- /src/serialization/binary_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017 The The Louisdor Project 2 | // Copyright (c) 2012-2013 The Cryptonote developers 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #include 7 | #include "binary_archive.h" 8 | 9 | namespace serialization { 10 | 11 | template 12 | bool parse_binary(const std::string &blob, T &v) 13 | { 14 | std::istringstream istr(blob); 15 | binary_archive iar(istr); 16 | return ::serialization::serialize(iar, v); 17 | } 18 | 19 | template 20 | bool dump_binary(T& v, std::string& blob) 21 | { 22 | std::stringstream ostr; 23 | binary_archive oar(ostr); 24 | bool success = ::serialization::serialize(oar, v); 25 | blob = ostr.str(); 26 | return success && ostr.good(); 27 | }; 28 | 29 | } // namespace serialization 30 | -------------------------------------------------------------------------------- /src/serialization/debug_archive.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017 The The Louisdor Project 2 | // Copyright (c) 2012-2013 The Cryptonote developers 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #pragma once 7 | 8 | #include "json_archive.h" 9 | #include "variant.h" 10 | 11 | template 12 | struct debug_archive : public json_archive { 13 | typedef typename json_archive::stream_type stream_type; 14 | 15 | debug_archive(stream_type &s) : json_archive(s) { } 16 | }; 17 | 18 | template 19 | struct serializer, T> 20 | { 21 | static void serialize(debug_archive &ar, T &v) 22 | { 23 | ar.begin_object(); 24 | ar.tag(variant_serialization_traits, T>::get_tag()); 25 | serializer, T>::serialize(ar, v); 26 | ar.end_object(); 27 | ar.stream() << std::endl; 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /src/serialization/json_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017 The The Louisdor Project 2 | // Copyright (c) 2012-2013 The Cryptonote developers 3 | // Distributed under the MIT/X11 software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #include 7 | #include "json_archive.h" 8 | 9 | namespace serialization { 10 | 11 | template 12 | std::string dump_json(T &v) 13 | { 14 | std::stringstream ostr; 15 | json_archive oar(ostr); 16 | assert(serialization::serialize(oar, v)); 17 | return ostr.str(); 18 | }; 19 | 20 | } // namespace serialization 21 | -------------------------------------------------------------------------------- /src/serialization/multiprecision.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017 The The Louisdor Project 2 | // Distributed under the MIT/X11 software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | #pragma once 6 | #include 7 | #include 8 | 9 | 10 | #include "serialization.h" 11 | 12 | template