├── README.md ├── aion_pool ├── .gitattributes ├── .gitignore ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── appveyor.yml ├── examples │ ├── aion_pool.json │ ├── dash_pool.json │ ├── dash_pool_no_polling.json │ ├── digibyte_scrypt_pool.json │ ├── digibyte_sha256_pool.json │ ├── ethereum_pool.json │ ├── flo_pool.json │ ├── litecoin_dash_pool.json │ ├── litecoin_pool.json │ ├── monero_pool.json │ ├── pakcoin_pool.json │ ├── straks_pool.json │ └── zcash_pool.json ├── linux │ ├── config.json.cpt │ ├── node_config.xml │ └── startpool └── src │ ├── MiningCore.Tests │ ├── Blockchain │ │ ├── Bitcoin │ │ │ └── BitcoinJobTests.cs │ │ ├── Ethereum │ │ │ └── EthereumJobTests.cs │ │ ├── Monero │ │ │ └── MoneroJobTests.cs │ │ └── ZCash │ │ │ └── ZCashJobTests.cs │ ├── Crypto │ │ ├── CrytonoteTests.cs │ │ ├── EthashTests.cs │ │ ├── HashingTests.cs │ │ └── MerkleTreeTests.cs │ ├── MiningCore.Tests.csproj │ ├── ModuleInitializer.cs │ ├── TestBase.cs │ ├── Util │ │ ├── Globals.cs │ │ ├── MockMasterClock.cs │ │ └── PooledLineBufferTests.cs │ ├── VarDiff │ │ └── VarDiffManagerTests.cs │ └── xunit.runner.json │ ├── MiningCore.sln │ ├── MiningCore │ ├── Api │ │ ├── ApiServer.cs │ │ ├── Extensions │ │ │ └── MiningPoolExtensions.cs │ │ └── Responses │ │ │ ├── CoinInfoResponse.cs │ │ │ ├── CryptoPriceResponse.cs │ │ │ ├── GetAdminStatsResponse.cs │ │ │ ├── GetBalanceChangesResponse.cs │ │ │ ├── GetBlocksResponse.cs │ │ │ ├── GetMinerStatsResponse.cs │ │ │ ├── GetPaymentsResponse.cs │ │ │ ├── GetPoolResponse.cs │ │ │ ├── GetPoolStatsResponse.cs │ │ │ ├── GetPoolsResponse.cs │ │ │ └── PagedResponse.cs │ ├── AutoMapperProfile.cs │ ├── AutofacMetadata.cs │ ├── AutofacModule.cs │ ├── Banning │ │ ├── Abstractions.cs │ │ └── IntegratedBanManager.cs │ ├── Blockchain │ │ ├── Abstractions.cs │ │ ├── Aion │ │ │ ├── AionBlockTemplate.cs │ │ │ ├── AionConstants.cs │ │ │ ├── AionExtraNonceProvider.cs │ │ │ ├── AionJob.cs │ │ │ ├── AionJobManager.cs │ │ │ ├── AionPayoutHandler.cs │ │ │ ├── AionPool.cs │ │ │ ├── AionStratumMethods.cs │ │ │ ├── AionUtils.cs │ │ │ ├── AionWorkerContext.cs │ │ │ ├── Configuration │ │ │ │ └── AionPoolPaymentExtraConfig.cs │ │ │ ├── DaemonRequests │ │ │ │ └── SendTransactionRequest.cs │ │ │ └── DaemonResponses │ │ │ │ ├── GetBlockResponse.cs │ │ │ │ ├── GetMinerHashRateResponse.cs │ │ │ │ ├── GetTransactionReceiptResponse.cs │ │ │ │ └── ValidateAddressResponse.cs │ │ ├── Bitcoin │ │ │ ├── BitcoinConstants.cs │ │ │ ├── BitcoinExtraNonceProvider.cs │ │ │ ├── BitcoinJob.cs │ │ │ ├── BitcoinJobManager.cs │ │ │ ├── BitcoinPayoutHandler.cs │ │ │ ├── BitcoinPool.cs │ │ │ ├── BitcoinPoolBase.cs │ │ │ ├── BitcoinProperties.cs │ │ │ ├── BitcoinStratumMethods.cs │ │ │ ├── BitcoinUtils.cs │ │ │ ├── BitcoinWorkerContext.cs │ │ │ ├── Configuration │ │ │ │ ├── BitcoinDaemonEndpointConfigExtra.cs │ │ │ │ ├── BitcoinPoolConfigExtra.cs │ │ │ │ └── BitcoinPoolPaymentProcessingConfigExtra.cs │ │ │ └── DaemonResponses │ │ │ │ ├── GetBlockResponse.cs │ │ │ │ ├── GetBlockTemplateResponse.cs │ │ │ │ ├── GetBlockchainInfoResponse.cs │ │ │ │ ├── GetInfoResponse.cs │ │ │ │ ├── GetMiningInfoResponse.cs │ │ │ │ ├── GetNetworkInfoResponse.cs │ │ │ │ ├── GetPeerInfoResponse.cs │ │ │ │ ├── GetTransactionResponse.cs │ │ │ │ ├── Utxo.cs │ │ │ │ └── ValidateAddressResponse.cs │ │ ├── BitcoinGold │ │ │ ├── BitcoinGoldJob.cs │ │ │ ├── BitcoinGoldJobManager.cs │ │ │ └── BitcoinGoldPool.cs │ │ ├── CoinMetaData.cs │ │ ├── Dash │ │ │ ├── DaemonResponses │ │ │ │ └── DashBlockTemplateResponse.cs │ │ │ ├── DashJob.cs │ │ │ ├── DashPayoutHandler.cs │ │ │ └── DashPool.cs │ │ ├── Ethereum │ │ │ ├── Configuration │ │ │ │ ├── EthereumDaemonEndpointConfigExtra.cs │ │ │ │ ├── EthereumPoolConfigExtra.cs │ │ │ │ └── EthereumPoolPaymentProcessingConfigExtra.cs │ │ │ ├── DaemonRequests │ │ │ │ └── SendTransactionRequest.cs │ │ │ ├── DaemonResponses │ │ │ │ ├── GetBlockResponse.cs │ │ │ │ ├── GetSyncStateResponse.cs │ │ │ │ ├── GetTransactionReceiptResponse.cs │ │ │ │ └── PubSubResponse.cs │ │ │ ├── EthereumBlockTemplate.cs │ │ │ ├── EthereumConstants.cs │ │ │ ├── EthereumExtraNonceProvider.cs │ │ │ ├── EthereumJob.cs │ │ │ ├── EthereumJobManager.cs │ │ │ ├── EthereumPayoutHandler.cs │ │ │ ├── EthereumPool.cs │ │ │ ├── EthereumStratumMethods.cs │ │ │ ├── EthereumUtils.cs │ │ │ └── EthereumWorkerContext.cs │ │ ├── ExtraNonceProviderBase.cs │ │ ├── Flo │ │ │ ├── Configuration │ │ │ │ └── FloPoolConfigExtra.cs │ │ │ ├── DaemonRequests │ │ │ │ └── SendManyRequest.cs │ │ │ ├── DaemonResponses │ │ │ │ └── GetTransactionResponse.cs │ │ │ ├── FloJob.cs │ │ │ ├── FloJobManager.cs │ │ │ ├── FloPayoutHandler.cs │ │ │ └── FloPool.cs │ │ ├── JobManagerBase.cs │ │ ├── Monero │ │ │ ├── Configuration │ │ │ │ ├── MoneroDaemonEndpointConfigExtra.cs │ │ │ │ ├── MoneroPoolConfigExtra.cs │ │ │ │ └── MoneroPoolPaymentProcessingConfigExtra.cs │ │ │ ├── DaemonRequests │ │ │ │ ├── GetBlockHeaderByHashRequest.cs │ │ │ │ ├── GetBlockHeaderByHeightRequest.cs │ │ │ │ ├── GetBlockTemplateRequest.cs │ │ │ │ └── TransferRequest.cs │ │ │ ├── DaemonResponses │ │ │ │ ├── GetAddressResponse.cs │ │ │ │ ├── GetBlockHeaderResponse.cs │ │ │ │ ├── GetBlockTemplateResponse.cs │ │ │ │ ├── GetInfoResponse.cs │ │ │ │ ├── SplitIntegratedAddressResponse.cs │ │ │ │ ├── SubmitResponse.cs │ │ │ │ ├── TransferResponse.cs │ │ │ │ └── TransferSplitResponse.cs │ │ │ ├── MoneroConstants.cs │ │ │ ├── MoneroJob.cs │ │ │ ├── MoneroJobManager.cs │ │ │ ├── MoneroPayoutHandler.cs │ │ │ ├── MoneroPool.cs │ │ │ ├── MoneroStratumMethods.cs │ │ │ ├── MoneroWorkerContext.cs │ │ │ ├── MoneroWorkerJob.cs │ │ │ ├── StratumRequests │ │ │ │ ├── MoneroGetJobRequest.cs │ │ │ │ ├── MoneroLoginRequest.cs │ │ │ │ └── MoneroSubmitShareRequest.cs │ │ │ └── StratumResponses │ │ │ │ ├── MoneroLoginResponse.cs │ │ │ │ └── MoneroResponseBase.cs │ │ ├── Share.cs │ │ ├── Straks │ │ │ ├── DaemonResponses │ │ │ │ └── StraksBlockTemplateResponse.cs │ │ │ ├── StraksJob.cs │ │ │ └── StraksPool.cs │ │ └── ZCash │ │ │ ├── Configuration │ │ │ └── ZCashPoolConfigExtra.cs │ │ │ ├── DaemonRequests │ │ │ └── ZSendMany.cs │ │ │ ├── DaemonResponses │ │ │ ├── GetBlockSubsidyResponse.cs │ │ │ ├── GetBlockTemplateResponse.cs │ │ │ ├── ZCashAsyncOperationStatus.cs │ │ │ └── ZCashShieldingResponse.cs │ │ │ ├── ZCashBlockHeader.cs │ │ │ ├── ZCashConstants.cs │ │ │ ├── ZCashExtraNonceProvider.cs │ │ │ ├── ZCashJob.cs │ │ │ ├── ZCashJobManager.cs │ │ │ ├── ZCashPayoutHandler.cs │ │ │ ├── ZCashPool.cs │ │ │ ├── ZCashPoolBase.cs │ │ │ └── ZCashStratumMethods.cs │ ├── Buffers │ │ └── PooledByteArraySegment.cs │ ├── Configuration │ │ ├── ClusterConfig.cs │ │ └── ClusterConfigValidation.cs │ ├── Contracts │ │ └── Contract.cs │ ├── Crypto │ │ ├── Abstractions.cs │ │ ├── Hashing │ │ │ ├── Algorithms │ │ │ │ ├── Blake.cs │ │ │ │ ├── Blake2b.cs │ │ │ │ ├── Blake2s.cs │ │ │ │ ├── Groestl.cs │ │ │ │ ├── GroestlMyriad.cs │ │ │ │ ├── Kezzak.cs │ │ │ │ ├── Lyra2Rev2.cs │ │ │ │ ├── NeoScrypt.cs │ │ │ │ ├── Qubit.cs │ │ │ │ ├── Scrypt.cs │ │ │ │ ├── ScryptN.cs │ │ │ │ ├── Sha256D.cs │ │ │ │ ├── Sha256S.cs │ │ │ │ ├── Sha3_256.cs │ │ │ │ ├── Sha3_512.cs │ │ │ │ ├── Skein.cs │ │ │ │ ├── X11.cs │ │ │ │ ├── X16R.cs │ │ │ │ ├── X16S.cs │ │ │ │ └── X17.cs │ │ │ ├── Equihash │ │ │ │ └── EquihashSolver.cs │ │ │ ├── Ethash │ │ │ │ ├── Block.cs │ │ │ │ ├── Cache.cs │ │ │ │ ├── Dag.cs │ │ │ │ ├── EthashFull.cs │ │ │ │ └── EthashLight.cs │ │ │ └── Special │ │ │ │ ├── DigestReverser.cs │ │ │ │ └── NullHasher.cs │ │ └── MerkleTree.cs │ ├── DaemonInterface │ │ ├── DaemonClient.cs │ │ ├── DaemonClientException.cs │ │ ├── DaemonCmd.cs │ │ └── DaemonResponse.cs │ ├── Extensions │ │ ├── ArrayExtensions.cs │ │ ├── ConnectionFactoryExtensions.cs │ │ ├── DictionaryExtensions.cs │ │ ├── DoubleExtensions.cs │ │ ├── HttpContextExtensions.cs │ │ ├── LoggingExtensions.cs │ │ ├── NumberExtensions.cs │ │ ├── ObservableExtensions.cs │ │ ├── PoolingExtensions.cs │ │ ├── SerializationExtensions.cs │ │ ├── StreamExtensions.cs │ │ └── StringExtensions.cs │ ├── JsonRpc │ │ ├── JsonRpcException.cs │ │ ├── JsonRpcRequest.cs │ │ └── JsonRpcResponse.cs │ ├── Messaging │ │ ├── Abstractions.cs │ │ └── MessageBus.cs │ ├── Mining │ │ ├── Abstractions.cs │ │ ├── PoolBase.cs │ │ ├── PoolStartupAbortException.cs │ │ ├── PoolStats.cs │ │ ├── ShareReceiver.cs │ │ ├── ShareRecorder.cs │ │ ├── ShareRelay.cs │ │ ├── StatsRecorder.cs │ │ └── WorkerContextBase.cs │ ├── MiningCore.csproj │ ├── MiningCore.licenseheader │ ├── Native │ │ ├── LibCryptonote.cs │ │ └── LibMultihash.cs │ ├── Notifications │ │ ├── Messages │ │ │ └── BlockNotification.cs │ │ ├── NotificationService.cs │ │ └── Slack │ │ │ └── SlackNotification.cs │ ├── Payments │ │ ├── Abstractions.cs │ │ ├── PaymentSchemes │ │ │ ├── PPLNSPaymentScheme.cs │ │ │ └── SoloPaymentScheme.cs │ │ ├── PayoutConstants.cs │ │ ├── PayoutHandlerBase.cs │ │ └── PayoutManager.cs │ ├── Persistence │ │ ├── Dummy │ │ │ └── DummyConnectionFactory.cs │ │ ├── IConnectionFactory.cs │ │ ├── Model │ │ │ ├── Balance.cs │ │ │ ├── BalanceChange.cs │ │ │ ├── Block.cs │ │ │ ├── BlockStatus.cs │ │ │ ├── CoinInfo.cs │ │ │ ├── MinerWorkerPerformanceStats.cs │ │ │ ├── MinerWorkerStatsPreAgg.cs │ │ │ ├── PagedResults.cs │ │ │ ├── Payment.cs │ │ │ ├── PoolStats.cs │ │ │ ├── Projections │ │ │ │ ├── MinerStats.cs │ │ │ │ └── MinerWorkerHashes.cs │ │ │ └── Share.cs │ │ ├── Postgres │ │ │ ├── Entities │ │ │ │ ├── Balance.cs │ │ │ │ ├── BalanceChange.cs │ │ │ │ ├── Block.cs │ │ │ │ ├── CoinInfo.cs │ │ │ │ ├── MinerWorkerPerformanceStats.cs │ │ │ │ ├── Payment.cs │ │ │ │ ├── PoolStats.cs │ │ │ │ └── Share.cs │ │ │ ├── PgConnectionFactory.cs │ │ │ ├── Repositories │ │ │ │ ├── BalanceRepository.cs │ │ │ │ ├── BlockRepository.cs │ │ │ │ ├── CoinInfoRepository.cs │ │ │ │ ├── PaymentRepository.cs │ │ │ │ ├── ShareRepository.cs │ │ │ │ └── StatsRepository.cs │ │ │ └── Scripts │ │ │ │ ├── cleandb.sql │ │ │ │ ├── createCoinInfoTable.sql │ │ │ │ └── createdb.sql │ │ └── Repositories │ │ │ ├── IBalanceRepository.cs │ │ │ ├── IBlockRepository.cs │ │ │ ├── ICoinInfoRepository.cs │ │ │ ├── IPaymentRepository.cs │ │ │ ├── IShareRepository.cs │ │ │ └── IStatsRepository.cs │ ├── Program.cs │ ├── Properties │ │ ├── PublishProfiles │ │ │ └── FolderProfile.pubxml │ │ └── launchSettings.json │ ├── Serialization │ │ ├── HexToByteArrayJsonConverter.cs │ │ └── HexToIntegralTypeJsonConverter.cs │ ├── Stratum │ │ ├── StratumClient.cs │ │ ├── StratumConstants.cs │ │ ├── StratumError.cs │ │ └── StratumServer.cs │ ├── Time │ │ ├── Abstractions.cs │ │ └── StandardClock.cs │ ├── Util │ │ ├── BigRational.cs │ │ ├── CircularBuffer.cs │ │ ├── CircularDoubleBuffer.cs │ │ ├── CorrelationIdGenerator.cs │ │ ├── FormatUtil.cs │ │ ├── LogUtil.cs │ │ ├── PooledLineBuffer.cs │ │ ├── ScheduledSubject.cs │ │ └── StaticRandom.cs │ ├── VarDiff │ │ ├── VarDiffContext.cs │ │ └── VarDiffManager.cs │ ├── linux-build.sh │ └── windows-build.bat │ └── Native │ ├── libcryptonote │ ├── Makefile │ ├── Makefile.MSys2 │ ├── common │ │ ├── base58.cpp │ │ ├── base58.h │ │ ├── int-util.h │ │ ├── pod-class.h │ │ ├── util.h │ │ └── varint.h │ ├── contrib │ │ └── epee │ │ │ ├── include │ │ │ ├── ado_db_helper.h │ │ │ ├── console_handler.h │ │ │ ├── copyable_atomic.h │ │ │ ├── file_io_utils.h │ │ │ ├── global_stream_operators.h │ │ │ ├── gzip_encoding.h │ │ │ ├── hex.h │ │ │ ├── hmac-md5.h │ │ │ ├── include_base_utils.h │ │ │ ├── math_helper.h │ │ │ ├── md5_l.h │ │ │ ├── md5_l.inl │ │ │ ├── md5global.h │ │ │ ├── memwipe.h │ │ │ ├── misc_language.h │ │ │ ├── misc_log_ex.h │ │ │ ├── misc_os_dependent.h │ │ │ ├── net │ │ │ │ ├── abstract_tcp_server.h │ │ │ │ ├── abstract_tcp_server2.h │ │ │ │ ├── abstract_tcp_server2.inl │ │ │ │ ├── abstract_tcp_server_cp.h │ │ │ │ ├── abstract_tcp_server_cp.inl │ │ │ │ ├── connection_basic.hpp │ │ │ │ ├── http_auth.h │ │ │ │ ├── http_base.h │ │ │ │ ├── http_client.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 │ │ │ │ ├── jsonrpc_protocol_handler.h │ │ │ │ ├── jsonrpc_server_handlers_map.h │ │ │ │ ├── jsonrpc_server_impl_base.h │ │ │ │ ├── jsonrpc_structs.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 │ │ │ │ ├── network_throttle-detail.hpp │ │ │ │ ├── network_throttle.hpp │ │ │ │ ├── protocol_switcher.h │ │ │ │ ├── rpc_method_name.h │ │ │ │ ├── smtp.h │ │ │ │ ├── smtp.inl │ │ │ │ └── smtp_helper.h │ │ │ ├── pragma_comp_defs.h │ │ │ ├── profile_tools.h │ │ │ ├── readline_buffer.h │ │ │ ├── reg_exp_definer.h │ │ │ ├── reg_utils.h │ │ │ ├── serialization │ │ │ │ ├── enableable.h │ │ │ │ ├── keyvalue_serialization.h │ │ │ │ ├── keyvalue_serialization_overloads.h │ │ │ │ └── serialize_base.h │ │ │ ├── service_impl_base.h │ │ │ ├── sha1.h │ │ │ ├── sha1.inl │ │ │ ├── soci_helper.h │ │ │ ├── span.h │ │ │ ├── static_initializer.h │ │ │ ├── storages │ │ │ │ ├── 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_from_bin.h │ │ │ │ ├── portable_storage_from_json.h │ │ │ │ ├── portable_storage_template_helper.h │ │ │ │ ├── portable_storage_to_bin.h │ │ │ │ ├── portable_storage_to_json.h │ │ │ │ └── portable_storage_val_converters.h │ │ │ ├── string_coding.h │ │ │ ├── string_tools.h │ │ │ ├── syncobj.h │ │ │ ├── time_helper.h │ │ │ ├── tiny_ini.h │ │ │ ├── to_nonconst_iterator.h │ │ │ ├── warnings.h │ │ │ ├── winobj.h │ │ │ ├── wipeable_string.h │ │ │ └── zlib_helper.h │ │ │ └── src │ │ │ ├── hex.cpp │ │ │ ├── memwipe.c │ │ │ └── wipeable_string.cpp │ ├── crypto │ │ ├── CMakeLists.txt │ │ ├── aesb.c │ │ ├── blake256.c │ │ ├── blake256.h │ │ ├── chacha.c │ │ ├── chacha.h │ │ ├── chacha8.c │ │ ├── chacha8.h │ │ ├── crypto-ops-data.c │ │ ├── crypto-ops.c │ │ ├── crypto-ops.h │ │ ├── crypto.cpp │ │ ├── crypto.h │ │ ├── generic-ops.h │ │ ├── groestl.c │ │ ├── groestl.h │ │ ├── groestl_tables.h │ │ ├── hash-extra-blake.c │ │ ├── hash-extra-groestl.c │ │ ├── hash-extra-jh.c │ │ ├── hash-extra-skein.c │ │ ├── hash-ops.h │ │ ├── hash.c │ │ ├── hash.h │ │ ├── initializer.h │ │ ├── jh.c │ │ ├── jh.h │ │ ├── keccak.c │ │ ├── keccak.h │ │ ├── oaes_config.h │ │ ├── oaes_lib.c │ │ ├── oaes_lib.h │ │ ├── random.c │ │ ├── random.h │ │ ├── skein.c │ │ ├── skein.h │ │ ├── skein_port.h │ │ ├── slow-hash-lite.c │ │ ├── slow-hash.c │ │ └── tree-hash.c │ ├── cryptonote_basic │ │ ├── CMakeLists.txt │ │ ├── account.cpp │ │ ├── account.h │ │ ├── account_boost_serialization.h │ │ ├── blobdatatype.h │ │ ├── checkpoints.cpp │ │ ├── checkpoints.h │ │ ├── connection_context.h │ │ ├── cryptonote_basic.h │ │ ├── cryptonote_basic_impl.cpp │ │ ├── cryptonote_basic_impl.h │ │ ├── cryptonote_boost_serialization.h │ │ ├── cryptonote_config.h │ │ ├── cryptonote_format_utils.cpp │ │ ├── cryptonote_format_utils.h │ │ ├── cryptonote_stat_info.h │ │ ├── difficulty.cpp │ │ ├── difficulty.h │ │ ├── hardfork.cpp │ │ ├── hardfork.h │ │ ├── miner.cpp │ │ ├── miner.h │ │ ├── subaddress_index.h │ │ ├── tx_extra.h │ │ └── verification_context.h │ ├── cryptonote_config.h │ ├── cryptonote_protocol │ │ ├── blobdatatype.h │ │ ├── block_queue.cpp │ │ ├── block_queue.h │ │ ├── cryptonote_protocol_defs.h │ │ ├── cryptonote_protocol_handler-base.cpp │ │ ├── cryptonote_protocol_handler.h │ │ ├── cryptonote_protocol_handler.inl │ │ └── cryptonote_protocol_handler_common.h │ ├── device │ │ └── device.hpp │ ├── dllmain.cpp │ ├── exports.cpp │ ├── libcryptonote.sln │ ├── libcryptonote.vcxproj │ ├── libcryptonote.vcxproj.filters │ ├── ringct │ │ ├── rctCryptoOps.c │ │ ├── rctCryptoOps.h │ │ ├── rctOps.cpp │ │ ├── rctOps.h │ │ ├── rctSigs.cpp │ │ ├── rctSigs.h │ │ ├── rctTypes.cpp │ │ └── rctTypes.h │ ├── serialization │ │ ├── binary_archive.h │ │ ├── binary_utils.h │ │ ├── container.h │ │ ├── crypto.h │ │ ├── debug_archive.h │ │ ├── json_archive.h │ │ ├── json_utils.h │ │ ├── list.h │ │ ├── pair.h │ │ ├── serialization.h │ │ ├── string.h │ │ ├── variant.h │ │ └── vector.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h │ └── libmultihash │ ├── Lyra2.c │ ├── Lyra2.h │ ├── Lyra2RE.c │ ├── Lyra2RE.h │ ├── Makefile │ ├── Sponge.c │ ├── Sponge.h │ ├── bcrypt.c │ ├── bcrypt.h │ ├── blake.c │ ├── blake.h │ ├── blake2b.c │ ├── blake2b.h │ ├── blake2s.c │ ├── blake2s.h │ ├── boolberry.h │ ├── c11.c │ ├── c11.h │ ├── dcrypt.c │ ├── dcrypt.h │ ├── dllmain.cpp │ ├── equi │ ├── arith_uint256.cpp │ ├── arith_uint256.h │ ├── crypto │ │ ├── common.h │ │ ├── equihash.cpp │ │ ├── equihash.h │ │ ├── equihash.tcc │ │ ├── hmac_sha256.cpp │ │ ├── hmac_sha256.h │ │ ├── hmac_sha512.cpp │ │ ├── hmac_sha512.h │ │ ├── ripemd160.cpp │ │ ├── ripemd160.h │ │ ├── sha1.cpp │ │ ├── sha1.h │ │ ├── sha256.cpp │ │ ├── sha256.h │ │ ├── sha512.cpp │ │ └── sha512.h │ ├── equihashverify.cc │ ├── equihashverify.h │ ├── random.cpp │ ├── random.h │ ├── serialize.h │ ├── support │ │ ├── cleanse.cpp │ │ └── cleanse.h │ ├── tinyformat.h │ ├── uint256.cpp │ ├── uint256.h │ ├── util.cpp │ ├── util.h │ ├── utilstrencodings.cpp │ └── utilstrencodings.h │ ├── equi210 │ ├── blake │ │ ├── blake2-config.h │ │ ├── blake2-impl.h │ │ ├── blake2-round.h │ │ ├── blake2.h │ │ ├── blake2b-load-sse2.h │ │ ├── blake2b-load-sse41.h │ │ ├── blake2b-round.h │ │ └── blake2b.cpp │ ├── equi │ │ ├── blake2b.c │ │ ├── blake2b.h │ │ ├── endian.c │ │ ├── endian.h │ │ ├── equi210.cpp │ │ └── equi210.h │ ├── equi210verify.cpp │ └── equi210verify.h │ ├── exports.cpp │ ├── fresh.c │ ├── fresh.h │ ├── fugue.c │ ├── fugue.h │ ├── groestl.c │ ├── groestl.h │ ├── hefty1.c │ ├── hefty1.h │ ├── jh.c │ ├── jh.h │ ├── keccak.c │ ├── keccak.h │ ├── libethash │ ├── compiler.h │ ├── data_sizes.h │ ├── endian.h │ ├── ethash.h │ ├── fnv.h │ ├── internal.c │ ├── internal.h │ ├── io.c │ ├── io.h │ ├── io_posix.c │ ├── io_win32.c │ ├── mmap.h │ ├── mmap_win32.c │ ├── sha3.c │ ├── sha3.h │ ├── sha3_cryptopp.cpp │ ├── sha3_cryptopp.h │ ├── util.h │ └── util_win32.c │ ├── libmultihash.sln │ ├── libmultihash.vcxproj │ ├── libmultihash.vcxproj.filters │ ├── neoscrypt.c │ ├── neoscrypt.h │ ├── net-core-test │ ├── Program.cs │ ├── net-core-test.csproj │ └── net-core-test.sln │ ├── nist5.c │ ├── nist5.h │ ├── portable_endian.h │ ├── quark.c │ ├── quark.h │ ├── qubit.c │ ├── qubit.h │ ├── s3.c │ ├── s3.h │ ├── scryptjane.h │ ├── scryptn.c │ ├── scryptn.h │ ├── sha256.h │ ├── sha3 │ ├── aes_helper.c │ ├── hamsi.c │ ├── hamsi_helper.c │ ├── haval_helper.c │ ├── md_helper.c │ ├── sph_blake.c │ ├── sph_blake.h │ ├── sph_blake2b.c │ ├── sph_blake2b.h │ ├── sph_blake2s.c │ ├── sph_blake2s.h │ ├── sph_bmw.c │ ├── sph_bmw.h │ ├── sph_cubehash.c │ ├── sph_cubehash.h │ ├── sph_echo.c │ ├── sph_echo.h │ ├── sph_fugue.c │ ├── sph_fugue.h │ ├── sph_groestl.c │ ├── sph_groestl.h │ ├── sph_hamsi.h │ ├── sph_haval.c │ ├── sph_haval.h │ ├── sph_hefty1.c │ ├── sph_hefty1.h │ ├── sph_jh.c │ ├── sph_jh.h │ ├── sph_keccak.c │ ├── sph_keccak.h │ ├── sph_luffa.c │ ├── sph_luffa.h │ ├── sph_sha2.c │ ├── sph_sha2.h │ ├── sph_sha2big.c │ ├── sph_shabal.c │ ├── sph_shabal.h │ ├── sph_shavite.c │ ├── sph_shavite.h │ ├── sph_simd.c │ ├── sph_simd.h │ ├── sph_skein.c │ ├── sph_skein.h │ ├── sph_types.h │ ├── sph_whirlpool.c │ └── sph_whirlpool.h │ ├── shavite3.c │ ├── shavite3.h │ ├── skein.c │ ├── skein.h │ ├── stdafx.cpp │ ├── stdafx.h │ ├── stdint.h │ ├── targetver.h │ ├── windows │ ├── include │ │ └── libsodium │ │ │ ├── sodium.h │ │ │ └── sodium │ │ │ ├── core.h │ │ │ ├── crypto_aead_aes256gcm.h │ │ │ ├── crypto_aead_chacha20poly1305.h │ │ │ ├── crypto_aead_xchacha20poly1305.h │ │ │ ├── crypto_auth.h │ │ │ ├── crypto_auth_hmacsha256.h │ │ │ ├── crypto_auth_hmacsha512.h │ │ │ ├── crypto_auth_hmacsha512256.h │ │ │ ├── crypto_box.h │ │ │ ├── crypto_box_curve25519xchacha20poly1305.h │ │ │ ├── crypto_box_curve25519xsalsa20poly1305.h │ │ │ ├── crypto_core_hchacha20.h │ │ │ ├── crypto_core_hsalsa20.h │ │ │ ├── crypto_core_salsa20.h │ │ │ ├── crypto_core_salsa2012.h │ │ │ ├── crypto_core_salsa208.h │ │ │ ├── crypto_generichash.h │ │ │ ├── crypto_generichash_blake2b.h │ │ │ ├── crypto_hash.h │ │ │ ├── crypto_hash_sha256.h │ │ │ ├── crypto_hash_sha512.h │ │ │ ├── crypto_kdf.h │ │ │ ├── crypto_kdf_blake2b.h │ │ │ ├── crypto_kx.h │ │ │ ├── crypto_onetimeauth.h │ │ │ ├── crypto_onetimeauth_poly1305.h │ │ │ ├── crypto_pwhash.h │ │ │ ├── crypto_pwhash_argon2i.h │ │ │ ├── crypto_pwhash_argon2id.h │ │ │ ├── crypto_pwhash_scryptsalsa208sha256.h │ │ │ ├── crypto_scalarmult.h │ │ │ ├── crypto_scalarmult_curve25519.h │ │ │ ├── crypto_secretbox.h │ │ │ ├── crypto_secretbox_xchacha20poly1305.h │ │ │ ├── crypto_secretbox_xsalsa20poly1305.h │ │ │ ├── crypto_shorthash.h │ │ │ ├── crypto_shorthash_siphash24.h │ │ │ ├── crypto_sign.h │ │ │ ├── crypto_sign_ed25519.h │ │ │ ├── crypto_sign_edwards25519sha512batch.h │ │ │ ├── crypto_stream.h │ │ │ ├── crypto_stream_aes128ctr.h │ │ │ ├── crypto_stream_chacha20.h │ │ │ ├── crypto_stream_salsa20.h │ │ │ ├── crypto_stream_salsa2012.h │ │ │ ├── crypto_stream_salsa208.h │ │ │ ├── crypto_stream_xchacha20.h │ │ │ ├── crypto_stream_xsalsa20.h │ │ │ ├── crypto_verify_16.h │ │ │ ├── crypto_verify_32.h │ │ │ ├── crypto_verify_64.h │ │ │ ├── export.h │ │ │ ├── randombytes.h │ │ │ ├── randombytes_salsa20_random.h │ │ │ ├── randombytes_sysrandom.h │ │ │ ├── runtime.h │ │ │ ├── utils.h │ │ │ └── version.h │ └── lib │ │ └── x86 │ │ └── libsodium.lib │ ├── x11.c │ ├── x11.h │ ├── x13.c │ ├── x13.h │ ├── x14.c │ ├── x14.h │ ├── x15.c │ ├── x15.h │ ├── x16r.c │ ├── x16r.h │ ├── x16s.c │ ├── x16s.h │ ├── x17.c │ └── x17.h └── ui ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── components │ ├── charts.js │ ├── charts.scss │ ├── simpleTable.js │ ├── simpleTable.scss │ ├── statsBoxes.js │ ├── statsBoxes.scss │ └── toaster.js ├── config.json ├── containers │ ├── app │ │ ├── index.js │ │ └── styles.scss │ ├── assets │ │ ├── fonts │ │ │ ├── myriadpro-semibold.otf │ │ │ ├── myriadpro-semibold.ttf │ │ │ ├── myriadpro.otf │ │ │ └── myriadpro.ttf │ │ ├── logo_aion.svg │ │ └── logo_aion_mobile.svg │ ├── footer │ │ ├── index.js │ │ └── styles.scss │ ├── header │ │ ├── index.js │ │ ├── menuItem.js │ │ └── styles.scss │ ├── home │ │ ├── actions.js │ │ ├── components │ │ │ ├── featuresList.js │ │ │ ├── featuresSection.js │ │ │ ├── homeStatsBoxes.js │ │ │ ├── howToMine.js │ │ │ └── lastMinedBlocksList.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── reducer.js │ │ └── styles.scss │ ├── minerDetails │ │ ├── actions.js │ │ ├── components │ │ │ ├── minerHashRate.js │ │ │ ├── minerStatsBoxes.js │ │ │ └── paymentsTable.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── reducer.js │ │ └── styles.scss │ ├── minerStats │ │ ├── actions.js │ │ ├── components │ │ │ ├── minersTable.js │ │ │ └── paymentsTable.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── reducer.js │ │ └── styles.scss │ ├── pools │ │ ├── actions.js │ │ ├── constants.js │ │ └── reducer.js │ └── stats │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ └── reducer.js ├── data-access.js ├── index.js ├── index.scss ├── reducer.js ├── store.js ├── styles │ ├── colors.scss │ ├── fonts.scss │ └── main.scss ├── texts.js └── utils.js └── yarn.lock /README.md: -------------------------------------------------------------------------------- 1 | # Aion Pool 2 | Welcome to the official Aion mining pool repository. 3 | This respositoy is created for pool operators; it contains the Aion mining pool and corresponding UI compatible with Aion 2.7+. 4 | 5 | ## Key Features 6 | - Supports clusters of pools each running individual currencies 7 | - Ultra-low-latency Stratum implementation using asynchronous I/O (LibUv) 8 | - Adaptive share difficulty ("vardiff") 9 | - PoW validation (hashing) using native code for maximum performance 10 | - Session management for purging DDoS/flood initiated zombie workers 11 | - Payment processing (PPLNS) 12 | - Banning System for banning peers that are flooding with invalid shares 13 | - Live Stats API on Port 4000 14 | - POW (proof-of-work) & POS (proof-of-stake) support 15 | - Detailed per-pool logging to console & filesystem 16 | - Responsive User Interface 17 | -------------------------------------------------------------------------------- /aion_pool/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Note 2 | Please use the following format to file an issue. Issues that fail to comply will delay our responses. 3 | Please remove this section when you submit the issue. Thank you for your cooperation. 4 | 5 | ### Description 6 | 7 | [Description of the issue] 8 | 9 | ### Steps to Reproduce 10 | 11 | 1. [First Step] 12 | 2. [Second Step] 13 | 3. [and so on...] 14 | 15 | ### Expected behavior 16 | 17 | [What you expect to happen] 18 | 19 | ### Actual behavior 20 | 21 | [What actually happens] 22 | 23 | ### Reproduces how often 24 | 25 | [What percentage of the time does it reproduce?] 26 | 27 | ### Version 28 | 29 | If you are using released version, please state your version. 30 | If you are using clone from `dev` branch, please state commit hash of your copy. 31 | Also, please include the OS name and version you're currently running. 32 | 33 | ### Additional Information 34 | 35 | Any additional information, log, configuration or data that might be necessary to reproduce the issue. 36 | -------------------------------------------------------------------------------- /aion_pool/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Coin Foundry 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /aion_pool/appveyor.yml: -------------------------------------------------------------------------------- 1 | #---------------------------------# 2 | # environment configuration # 3 | #---------------------------------# 4 | 5 | # Build worker image (VM template) 6 | image: Visual Studio 2017 7 | 8 | #---------------------------------# 9 | # build configuration # 10 | #---------------------------------# 11 | 12 | # scripts to run before build 13 | before_build: dotnet restore src 14 | 15 | build_script: 16 | - cd src\MiningCore 17 | - dotnet build -c Release --framework netcoreapp2.0 18 | 19 | #---------------------------------# 20 | # tests configuration # 21 | #---------------------------------# 22 | 23 | # to run tests again only selected assemblies and/or categories 24 | test_script: 25 | - cd ..\MiningCore.Tests 26 | - dotnet test 27 | 28 | #---------------------------------# 29 | # notifications # 30 | #---------------------------------# 31 | 32 | notifications: 33 | # Webhook 34 | - provider: Webhook 35 | url: https://registry.hub.docker.com/u/coinfoundry/miningcore-docker/trigger/5cea19ab-b489-4f7c-9fb2-da4112c51e66/ 36 | on_build_success: true 37 | on_build_failure: false 38 | -------------------------------------------------------------------------------- /aion_pool/linux/config.json.cpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/aion_pool/linux/config.json.cpt -------------------------------------------------------------------------------- /aion_pool/linux/startpool: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dotnet MiningCore.dll -c config.json & 4 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore.Tests/MiningCore.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | false 7 | 8 | AnyCPU 9 | 10 | 11 | 12 | AnyCPU 13 | 14 | 15 | 16 | AnyCPU 17 | true 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | PreserveNewest 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore.Tests/ModuleInitializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Text; 5 | using Autofac; 6 | using AutoMapper; 7 | 8 | namespace MiningCore.Tests 9 | { 10 | public static class ModuleInitializer 11 | { 12 | private static readonly object initLock = new object(); 13 | 14 | private static bool isInitialized = false; 15 | private static IContainer container; 16 | 17 | public static IContainer Container => container; 18 | 19 | /// 20 | /// Initializes the module. 21 | /// 22 | public static void Initialize() 23 | { 24 | lock (initLock) 25 | { 26 | if (isInitialized) 27 | return; 28 | 29 | Program.PreloadNativeLibs(); 30 | 31 | var builder = new ContainerBuilder(); 32 | 33 | builder.RegisterAssemblyModules(typeof(AutofacModule).GetTypeInfo().Assembly); 34 | 35 | // AutoMapper 36 | var amConf = new MapperConfiguration(cfg => { cfg.AddProfile(new AutoMapperProfile()); }); 37 | 38 | builder.Register((ctx, parms) => amConf.CreateMapper()); 39 | 40 | // Autofac Container 41 | container = builder.Build(); 42 | 43 | isInitialized = true; 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore.Tests/TestBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Tests 6 | { 7 | public abstract class TestBase 8 | { 9 | protected TestBase() 10 | { 11 | ModuleInitializer.Initialize(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore.Tests/Util/Globals.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Serialization; 3 | 4 | namespace MiningCore.Tests.Util 5 | { 6 | public class Globals 7 | { 8 | public static readonly JsonSerializerSettings JsonSerializerSettings = new JsonSerializerSettings 9 | { 10 | ContractResolver = new CamelCasePropertyNamesContractResolver() 11 | }; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore.Tests/Util/MockMasterClock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MiningCore.Time; 3 | 4 | namespace MiningCore.Tests.Util 5 | { 6 | public class MockMasterClock : IMasterClock 7 | { 8 | public DateTime CurrentTime { get; set; } 9 | 10 | public DateTime Now => CurrentTime; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore.Tests/xunit.runner.json: -------------------------------------------------------------------------------- 1 | { 2 | "methodDisplay": "method" 3 | } -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Api/Responses/CoinInfoResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 3 | associated documentation files (the "Software"), to deal in the Software without restriction, 4 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 6 | subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial 9 | portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 12 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 14 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 15 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | 21 | namespace MiningCore.Api.Responses 22 | { 23 | public class CoinInfoResponse 24 | { 25 | public string Name { get; set; } 26 | public string CoinType { get; set; } 27 | public double PriceUSD { get; set; } 28 | public double PriceBTC { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Api/Responses/GetPoolResponse.cs: -------------------------------------------------------------------------------- 1 | namespace MiningCore.Api.Responses 2 | { 3 | public class GetPoolResponse 4 | { 5 | public PoolInfo Pool { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Api/Responses/PagedResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 3 | associated documentation files (the "Software"), to deal in the Software without restriction, 4 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 6 | subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial 9 | portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 12 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 14 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 15 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | 18 | using System; 19 | 20 | namespace MiningCore.Api.Responses 21 | { 22 | public class PagedResponse 23 | { 24 | public int Total { get; set; } 25 | public T[] Results { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Banning/Abstractions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | using System.Net; 23 | 24 | namespace MiningCore.Banning 25 | { 26 | public interface IBanManager 27 | { 28 | bool IsBanned(IPAddress address); 29 | void Ban(IPAddress address, TimeSpan duration); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Aion/AionBlockTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace MiningCore.Blockchain.Aion 5 | { 6 | public class AionBlockTemplate 7 | { 8 | /// 9 | /// The block number 10 | /// 11 | public ulong Height { get; set; } 12 | 13 | /// 14 | /// current block header pow-hash (32 Bytes) 15 | /// 16 | public string HeaderHash { get; set; } 17 | 18 | /// 19 | /// the boundary condition ("target"), 2^256 / difficulty. (32 Bytes) 20 | /// 21 | public string Target { get; set; } 22 | 23 | /// 24 | /// hash of the parent block. 25 | /// 26 | public string PreviousBlockHash { get; set; } 27 | 28 | 29 | /// 30 | /// partial hash. 31 | /// 32 | public string PartialHash { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Aion/AionExtraNonceProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | using MiningCore.Extensions; 7 | 8 | namespace MiningCore.Blockchain.Aion 9 | { 10 | public class AionExtraNonceProvider: ExtraNonceProviderBase 11 | { 12 | public AionExtraNonceProvider() : base(2) 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Aion/AionStratumMethods.cs: -------------------------------------------------------------------------------- 1 | namespace MiningCore.Blockchain.Aion 2 | { 3 | public class AionStratumMethods 4 | { 5 | /// 6 | /// Used to subscribe to work from a server, required before all other communication. 7 | /// 8 | public const string Subscribe = "mining.subscribe"; 9 | 10 | /// 11 | /// Used to authorize a worker, required before any shares can be submitted. 12 | /// 13 | public const string Authorize = "mining.authorize"; 14 | 15 | /// 16 | /// Used to push new work to the miner. Previous work should be aborted if Clean Jobs = true! 17 | /// 18 | public const string MiningNotify = "mining.notify"; 19 | 20 | /// 21 | /// Used to submit shares 22 | /// 23 | public const string SubmitShare = "mining.submit"; 24 | 25 | /// 26 | /// Used to signal the miner to stop submitting shares under the new difficulty. 27 | /// 28 | public const string SetDifficulty = "mining.set_difficulty"; 29 | public const string SetTarget = "mining.set_target"; 30 | } 31 | } -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Aion/AionWorkerContext.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using MiningCore.Mining; 22 | 23 | namespace MiningCore.Blockchain.Aion 24 | { 25 | public class AionWorkerContext : WorkerContextBase 26 | { 27 | public string MinerName { get; set; } 28 | public string WorkerName { get; set; } 29 | public bool IsInitialWorkSent { get; set; } = false; 30 | 31 | public string ExtraNonce1 { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Aion/DaemonResponses/GetMinerHashRateResponse.cs: -------------------------------------------------------------------------------- 1 | namespace MiningCore.Blockchain.Aion.DaemonResponses 2 | { 3 | public class GetMinerHashRateResponse 4 | { 5 | public string NetworkHashrate { get; set; } 6 | public string MinerHashrate { get; set; } 7 | public double MinerHashrateShare { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Aion/DaemonResponses/ValidateAddressResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Aion.DaemonResponses 22 | { 23 | public class ValidateAddressResponse 24 | { 25 | public bool IsValid { get; set; } 26 | public bool IsMine { get; set; } 27 | public string Address { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Bitcoin/BitcoinExtraNonceProvider.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | using System.Security.Cryptography; 23 | using System.Threading; 24 | 25 | namespace MiningCore.Blockchain.Bitcoin 26 | { 27 | public class BitcoinExtraNonceProvider : ExtraNonceProviderBase 28 | { 29 | public BitcoinExtraNonceProvider() : base(4) 30 | { 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Bitcoin/BitcoinWorkerContext.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using MiningCore.Mining; 22 | 23 | namespace MiningCore.Blockchain.Bitcoin 24 | { 25 | public class BitcoinWorkerContext : WorkerContextBase 26 | { 27 | public string MinerName { get; set; } 28 | public string WorkerName { get; set; } 29 | 30 | public string ExtraNonce1 { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Bitcoin/DaemonResponses/Utxo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Blockchain.Bitcoin.DaemonResponses 6 | { 7 | public class Utxo 8 | { 9 | public string TxId { get; set; } 10 | public int Vout { get; set; } 11 | public string Address { get; set; } 12 | public decimal Amount { get; set; } 13 | public string ScriptPubKey { get; set; } 14 | public int Confirmations { get; set; } 15 | public bool Spendable { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/BitcoinGold/BitcoinGoldJobManager.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Autofac; 3 | using MiningCore.Blockchain.Bitcoin; 4 | using MiningCore.Blockchain.ZCash; 5 | using MiningCore.Blockchain.ZCash.DaemonResponses; 6 | using MiningCore.DaemonInterface; 7 | using MiningCore.Notifications; 8 | using MiningCore.Time; 9 | 10 | namespace MiningCore.Blockchain.BitcoinGold 11 | { 12 | public class BitcoinGoldJobManager : ZCashJobManager 13 | { 14 | public BitcoinGoldJobManager(IComponentContext ctx, 15 | NotificationService notificationService, 16 | IMasterClock clock, 17 | IExtraNonceProvider extraNonceProvider) : base(ctx, notificationService, clock, extraNonceProvider) 18 | { 19 | getBlockTemplateParams = new object[] 20 | { 21 | new 22 | { 23 | capabilities = new[] { "coinbasetxn", "workid", "coinbase/append" }, 24 | rules = new[] { "segwit" } 25 | } 26 | }; 27 | } 28 | 29 | #region Overrides of ZCashJobManager 30 | 31 | protected override async Task> GetBlockTemplateAsync() 32 | { 33 | var result = await daemon.ExecuteCmdAnyAsync( 34 | BitcoinCommands.GetBlockTemplate, getBlockTemplateParams); 35 | 36 | return result; 37 | } 38 | 39 | #endregion 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Ethereum/Configuration/EthereumDaemonEndpointConfigExtra.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Blockchain.Ethereum.Configuration 6 | { 7 | public class EthereumDaemonEndpointConfigExtra 8 | { 9 | /// 10 | /// Optional port for streaming WebSocket data 11 | /// 12 | public int? PortWs { get; set; } 13 | 14 | /// 15 | /// Optional http-path for streaming WebSocket data 16 | /// 17 | public string HttpPathWs { get; set; } 18 | 19 | /// 20 | /// Optional: Use SSL to for daemon websocket streaming 21 | /// 22 | public bool SslWs { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Ethereum/DaemonResponses/PubSubResponse.cs: -------------------------------------------------------------------------------- 1 | namespace MiningCore.Blockchain.Ethereum.DaemonResponses 2 | { 3 | public class PubSubParams 4 | { 5 | public string Subscription { get; set; } 6 | public T Result { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Ethereum/EthereumBlockTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Numerics; 4 | using System.Text; 5 | using NBitcoin; 6 | 7 | namespace MiningCore.Blockchain.Ethereum 8 | { 9 | public class EthereumBlockTemplate 10 | { 11 | /// 12 | /// The block number 13 | /// 14 | public ulong Height { get; set; } 15 | 16 | /// 17 | /// current block header pow-hash (32 Bytes) 18 | /// 19 | public string Header { get; set; } 20 | 21 | /// 22 | /// the seed hash used for the DAG. (32 Bytes) 23 | /// 24 | public string Seed { get; set; } 25 | 26 | /// 27 | /// the boundary condition ("target"), 2^256 / difficulty. (32 Bytes) 28 | /// 29 | public string Target { get; set; } 30 | 31 | /// 32 | /// hash of the parent block. 33 | /// 34 | public string ParentHash { get; set; } 35 | 36 | /// 37 | /// integer of the difficulty for this block 38 | /// 39 | public ulong Difficulty { get; set; } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Ethereum/EthereumExtraNonceProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | using MiningCore.Extensions; 7 | 8 | namespace MiningCore.Blockchain.Ethereum 9 | { 10 | public class EthereumExtraNonceProvider : ExtraNonceProviderBase 11 | { 12 | public EthereumExtraNonceProvider() : base(2) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Ethereum/EthereumUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MiningCore.Blockchain.Ethereum 4 | { 5 | public class EthereumUtils 6 | { 7 | public static void DetectNetworkAndChain(string netVersionResponse, string parityChainResponse, 8 | out EthereumNetworkType networkType, out ParityChainType chainType) 9 | { 10 | // convert network 11 | if (int.TryParse(netVersionResponse, out var netWorkTypeInt)) 12 | { 13 | networkType = (EthereumNetworkType) netWorkTypeInt; 14 | 15 | if (!Enum.IsDefined(typeof(EthereumNetworkType), networkType)) 16 | networkType = EthereumNetworkType.Unknown; 17 | } 18 | 19 | else 20 | networkType = EthereumNetworkType.Unknown; 21 | 22 | // convert chain 23 | if (!Enum.TryParse(parityChainResponse, true, out chainType)) 24 | { 25 | if (parityChainResponse.ToLower() == "ethereum classic") 26 | chainType = ParityChainType.Classic; 27 | else 28 | chainType = ParityChainType.Unknown; 29 | } 30 | 31 | if (chainType == ParityChainType.Foundation) 32 | chainType = ParityChainType.Mainnet; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Flo/Configuration/FloPoolConfigExtra.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Flo.Configuration 22 | { 23 | public class FloPoolConfigExtra 24 | { 25 | public string FloData { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/Configuration/MoneroPoolConfigExtra.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using MiningCore.Configuration; 22 | 23 | namespace MiningCore.Blockchain.Monero.Configuration 24 | { 25 | public class MoneroPoolConfigExtra 26 | { 27 | /// 28 | /// Blocktemplate stream published via ZMQ 29 | /// 30 | public ZmqPubSubEndpointConfig BtStream { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/Configuration/MoneroPoolPaymentProcessingConfigExtra.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Text; 24 | 25 | namespace MiningCore.Blockchain.Monero.Configuration 26 | { 27 | public class MoneroPoolPaymentProcessingConfigExtra 28 | { 29 | public decimal MinimumPaymentToPaymentId { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/DaemonRequests/GetBlockHeaderByHashRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Monero.DaemonRequests 22 | { 23 | public class GetBlockHeaderByHashRequest 24 | { 25 | public string Hash { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/DaemonRequests/GetBlockHeaderByHeightRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Monero.DaemonRequests 22 | { 23 | public class GetBlockHeaderByHeightRequest 24 | { 25 | public ulong Height { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/DaemonResponses/GetAddressResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Monero.DaemonResponses 22 | { 23 | public class GetAddressResponse 24 | { 25 | public string Address { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/DaemonResponses/SplitIntegratedAddressResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using Newtonsoft.Json; 22 | 23 | namespace MiningCore.Blockchain.Monero.DaemonResponses 24 | { 25 | public class SplitIntegratedAddressResponse 26 | { 27 | [JsonProperty("standard_address")] 28 | public string StandardAddress { get; set; } 29 | 30 | public string Payment { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/DaemonResponses/SubmitResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Monero.DaemonResponses 22 | { 23 | public class SubmitResponse 24 | { 25 | public string Status { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/StratumRequests/MoneroGetJobRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using Newtonsoft.Json; 22 | 23 | namespace MiningCore.Blockchain.Monero.StratumRequests 24 | { 25 | public class MoneroGetJobRequest 26 | { 27 | [JsonProperty("id")] 28 | public string WorkerId { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/Monero/StratumResponses/MoneroResponseBase.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Blockchain.Monero.StratumResponses 22 | { 23 | public class MoneroResponseBase 24 | { 25 | public string Status { get; set; } = "OK"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/ZCash/DaemonRequests/ZSendMany.cs: -------------------------------------------------------------------------------- 1 | namespace MiningCore.Blockchain.ZCash.DaemonRequests 2 | { 3 | public class ZSendManyRecipient 4 | { 5 | public string Address { get; set; } 6 | public decimal Amount { get; set; } 7 | public string Memo { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/ZCash/DaemonResponses/GetBlockSubsidyResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using Newtonsoft.Json; 22 | 23 | namespace MiningCore.Blockchain.ZCash.DaemonResponses 24 | { 25 | public class ZCashBlockSubsidy 26 | { 27 | public decimal Miner { get; set; } 28 | public decimal? Founders { get; set; } 29 | public decimal? Community { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/ZCash/DaemonResponses/ZCashAsyncOperationStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using MiningCore.JsonRpc; 5 | using Newtonsoft.Json; 6 | using Newtonsoft.Json.Linq; 7 | 8 | namespace MiningCore.Blockchain.ZCash.DaemonResponses 9 | { 10 | public class ZCashAsyncOperationStatus 11 | { 12 | [JsonProperty("id")] 13 | public string OperationId { get; set; } 14 | 15 | public string Status { get; set; } 16 | public JToken Result { get; set; } 17 | public JsonRpcException Error { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/ZCash/DaemonResponses/ZCashShieldingResponse.cs: -------------------------------------------------------------------------------- 1 | using MiningCore.JsonRpc; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Linq; 4 | 5 | namespace MiningCore.Blockchain.ZCash.DaemonResponses 6 | { 7 | public class ZCashShieldingResponse 8 | { 9 | [JsonProperty("opid")] 10 | public string OperationId { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Blockchain/ZCash/ZCashExtraNonceProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading; 4 | using MiningCore.Extensions; 5 | 6 | namespace MiningCore.Blockchain.ZCash 7 | { 8 | public class ZCashExtraNonceProvider : ExtraNonceProviderBase 9 | { 10 | public ZCashExtraNonceProvider() : base(3) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Buffers/PooledByteArraySegment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Buffers; 3 | 4 | namespace MiningCore.Buffers 5 | { 6 | public struct PooledArraySegment : IDisposable 7 | { 8 | public PooledArraySegment(T[] array, int offset, int size) 9 | { 10 | Array = array; 11 | Size = size; 12 | Offset = offset; 13 | } 14 | 15 | public PooledArraySegment(int size, int offset = 0) 16 | { 17 | Array = ArrayPool.Shared.Rent(size); 18 | Size = size; 19 | Offset = offset; 20 | } 21 | 22 | public T[] Array { get; private set; } 23 | public int Size { get; } 24 | public int Offset { get; } 25 | 26 | public T[] ToArray() 27 | { 28 | var result = new T[Size]; 29 | System.Array.Copy(Array, Offset, result, 0, Size); 30 | return result; 31 | } 32 | 33 | #region IDisposable 34 | 35 | public void Dispose() 36 | { 37 | var array = Array; 38 | 39 | if (array != null) 40 | { 41 | ArrayPool.Shared.Return(array); 42 | Array = null; 43 | } 44 | } 45 | 46 | #endregion 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Crypto/Abstractions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Crypto 22 | { 23 | public interface IHashAlgorithm 24 | { 25 | byte[] Digest(byte[] data, params object[] extra); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Crypto/Hashing/Ethash/Block.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Numerics; 4 | using System.Text; 5 | 6 | namespace MiningCore.Crypto.Hashing.Ethash 7 | { 8 | public class Block 9 | { 10 | public ulong Height { get; set; } 11 | public BigInteger Difficulty { get; set; } 12 | public byte[] HashNoNonce { get; set; } 13 | public ulong Nonce { get; set; } 14 | public byte[] MixDigest { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Crypto/Hashing/Special/NullHasher.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | 23 | namespace MiningCore.Crypto.Hashing.Special 24 | { 25 | public class DummyHasher : IHashAlgorithm 26 | { 27 | public byte[] Digest(byte[] data, params object[] extra) 28 | { 29 | throw new InvalidOperationException("Don't call me"); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/DaemonInterface/DaemonClientException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | 4 | namespace MiningCore.DaemonInterface 5 | { 6 | public class DaemonClientException : Exception 7 | { 8 | public DaemonClientException(string msg) : base(msg) 9 | { 10 | } 11 | 12 | public DaemonClientException(HttpStatusCode code, string msg) : base(msg) 13 | { 14 | Code = code; 15 | } 16 | 17 | public HttpStatusCode Code { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/DaemonInterface/DaemonResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using MiningCore.Configuration; 22 | using MiningCore.JsonRpc; 23 | 24 | namespace MiningCore.DaemonInterface 25 | { 26 | public class DaemonResponse 27 | { 28 | public JsonRpcException Error { get; set; } 29 | public T Response { get; set; } 30 | public AuthenticatedNetworkEndpointConfig Instance { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Extensions/DoubleExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Extensions 6 | { 7 | public static class DoubleExtensions 8 | { 9 | private const double P3 = 0.001; 10 | private const double P4 = 0.0001; 11 | 12 | public static bool EqualsDigitPrecision3(this double left, double right) 13 | { 14 | return Math.Abs(left - right) < P3; 15 | } 16 | 17 | public static bool EqualsDigitPrecision4(this double left, double right) 18 | { 19 | return Math.Abs(left - right) < P4; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Extensions/HttpContextExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Microsoft.AspNetCore.Http; 4 | 5 | namespace MiningCore.Extensions 6 | { 7 | public static class HttpContextExtensions 8 | { 9 | public static T GetQueryParameter(this HttpContext ctx, string name, T defaultValue) 10 | { 11 | var stringVal = ctx.Request.Query[name].FirstOrDefault(); 12 | if (string.IsNullOrEmpty(stringVal)) 13 | return defaultValue; 14 | 15 | return (T) Convert.ChangeType(stringVal, typeof(T)); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Extensions/LoggingExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.CompilerServices; 5 | using System.Text; 6 | using NLog; 7 | 8 | namespace MiningCore.Extensions 9 | { 10 | public static class LoggingExtensions 11 | { 12 | public static void LogInvoke(this ILogger logger, object[] args = null, [CallerMemberName] string caller = null) 13 | { 14 | if(args == null) 15 | logger.Debug(() => $"{caller}()"); 16 | else 17 | logger.Debug(()=> $"{caller}({string.Join(", ", args.Select(x=> x?.ToString()))})"); 18 | } 19 | 20 | public static void LogInvoke(this ILogger logger, string logCat, object[] args = null, [CallerMemberName] string caller = null) 21 | { 22 | if (args == null) 23 | logger.Debug(() => $"[{logCat}] {caller}()"); 24 | else 25 | logger.Debug(() => $"[{logCat}] {caller}({string.Join(", ", args.Select(x => x?.ToString()))})"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Extensions/PoolingExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using MiningCore.Buffers; 5 | 6 | namespace MiningCore.Extensions 7 | { 8 | public static class PoolingExtensions 9 | { 10 | public static void Dispose(this IEnumerable> col) 11 | { 12 | foreach(var seg in col) 13 | seg.Dispose(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Extensions/StreamExtensions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System.IO; 22 | 23 | namespace MiningCore.Extensions 24 | { 25 | public static class StreamExtensions 26 | { 27 | public static void Write(this Stream stream, byte[] data) 28 | { 29 | stream.Write(data, 0, data.Length); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Mining/PoolStartupAbortException.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | 23 | namespace MiningCore.Mining 24 | { 25 | public class PoolStartupAbortException : Exception 26 | { 27 | public PoolStartupAbortException(string msg) : base(msg) 28 | { 29 | } 30 | 31 | public PoolStartupAbortException() 32 | { 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Mining/PoolStats.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | 23 | namespace MiningCore.Mining 24 | { 25 | public class PoolStats 26 | { 27 | public DateTime? LastPoolBlockTime { get; set; } 28 | public int ConnectedMiners { get; set; } 29 | public double PoolHashrate { get; set; } 30 | public int SharesPerSecond { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/MiningCore.licenseheader: -------------------------------------------------------------------------------- 1 | extensions: designer.cs generated.cs 2 | extensions: .cs .cpp .h 3 | /* 4 | Copyright 2017 Coin Foundry (coinfoundry.org) 5 | Authors: Oliver Weichhold (oliver@weichhold.com) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 8 | associated documentation files (the "Software"), to deal in the Software without restriction, 9 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or substantial 14 | portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 17 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Notifications/Messages/BlockNotification.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Notifications.Messages 6 | { 7 | public class BlockNotification 8 | { 9 | public BlockNotification(string poolId, long blockHeight) 10 | { 11 | PoolId = poolId; 12 | BlockHeight = blockHeight; 13 | } 14 | 15 | public string PoolId { get; } 16 | public long BlockHeight { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Notifications/Slack/SlackNotification.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Newtonsoft.Json; 5 | 6 | namespace MiningCore.Notifications.Slack 7 | { 8 | public class SlackNotification 9 | { 10 | [JsonProperty("text")] 11 | public string Body { get; set; } 12 | 13 | [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] 14 | public string Channel { get; set; } 15 | 16 | /// 17 | /// Customize Icon 18 | /// 19 | [JsonProperty("icon_emoji", NullValueHandling = NullValueHandling.Ignore)] 20 | public string Emoji { get; set; } 21 | 22 | /// 23 | /// Customize Name 24 | /// 25 | [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] 26 | public string Username { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Payments/PayoutConstants.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Text; 24 | 25 | namespace MiningCore.Payments 26 | { 27 | public static class PayoutConstants 28 | { 29 | public const char PayoutInfoSeperator = '.'; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/IConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System.Data; 22 | 23 | namespace MiningCore.Persistence 24 | { 25 | public interface IConnectionFactory 26 | { 27 | IDbConnection OpenConnection(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Model/BlockStatus.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | namespace MiningCore.Persistence.Model 22 | { 23 | public enum BlockStatus 24 | { 25 | Pending = 1, 26 | Orphaned = 2, 27 | Confirmed = 3 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Model/CoinInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 4 | associated documentation files (the "Software"), to deal in the Software without restriction, 5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial 10 | portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 13 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 15 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 16 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | */ 18 | 19 | using System; 20 | using MiningCore.Configuration; 21 | 22 | namespace MiningCore.Persistence.Model 23 | { 24 | public class CoinInfo 25 | { 26 | public CoinType CoinType {get; set;} 27 | public string Name {get; set;} 28 | public int CoinMarketCapId {get; set;} 29 | public double PriceUSD {get; set;} 30 | public double PriceBTC {get; set;} 31 | public DateTime Updated {get; set;} 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Model/MinerWorkerPerformanceStats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MiningCore.Persistence.Model 4 | { 5 | public class MinerWorkerPerformanceStats 6 | { 7 | public string PoolId { get; set; } 8 | public string Miner { get; set; } 9 | public string Worker { get; set; } 10 | public double Hashrate { get; set; } 11 | public double SharesPerSecond { get; set; } 12 | public DateTime Created { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Model/PagedResults.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 3 | associated documentation files (the "Software"), to deal in the Software without restriction, 4 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 6 | subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial 9 | portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 12 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 14 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 15 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | 18 | using System; 19 | 20 | namespace MiningCore.Persistence.Model 21 | { 22 | public class PagedResults 23 | { 24 | public int Total { get; set; } 25 | public T[] Results { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Postgres/Entities/CoinInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 3 | associated documentation files (the "Software"), to deal in the Software without restriction, 4 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 6 | subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial 9 | portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 12 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 14 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 15 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | 18 | using System; 19 | 20 | namespace MiningCore.Persistence.Postgres.Entities 21 | { 22 | public class CoinInfo 23 | { 24 | public string CoinType {get; set;} 25 | public string Name {get; set;} 26 | public int CoinMarketCapId {get; set;} 27 | public double PriceUSD {get; set;} 28 | public double PriceBTC {get; set;} 29 | public DateTime Updated {get; set;} 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Postgres/Scripts/cleandb.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE shares; 2 | DROP TABLE blocks; 3 | DROP TABLE balances; 4 | DROP TABLE payments; 5 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Postgres/Scripts/createCoinInfoTable.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS coin_info 2 | ( 3 | cointype TEXT PRIMARY KEY NOT NULL, 4 | name TEXT NOT NULL, 5 | coinmarketcapid INT NOT NULL, 6 | priceusd DOUBLE PRECISION NOT NULL, 7 | pricebtc DOUBLE PRECISION NOT NULL, 8 | updated TIMESTAMP NOT NULL 9 | ); 10 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Persistence/Repositories/ICoinInfoRepository.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 4 | associated documentation files (the "Software"), to deal in the Software without restriction, 5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial 10 | portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 13 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 15 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 16 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | */ 18 | 19 | using System.Data; 20 | using MiningCore.Configuration; 21 | using MiningCore.Persistence.Model; 22 | 23 | namespace MiningCore.Persistence.Repositories 24 | { 25 | public interface ICoinInfoRepository 26 | { 27 | void AddCoinInfo(IDbConnection con, IDbTransaction tx, CoinInfo CoinInfo); 28 | 29 | CoinInfo GetCoinInfo(IDbConnection con, CoinType coin); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | FileSystem 9 | Release 10 | netcoreapp2.0 11 | bin\Release\PublishOutput 12 | 13 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "MiningCore": { 4 | "commandName": "Project", 5 | "commandLineArgs": "-c ..\\..\\..\\config.json" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Serialization/HexToByteArrayJsonConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using MiningCore.Extensions; 4 | using Newtonsoft.Json; 5 | 6 | namespace MiningCore.Serialization 7 | { 8 | public class HexToByteArrayJsonConverter : JsonConverter 9 | { 10 | public override bool CanConvert(Type objectType) 11 | { 12 | return typeof(byte[]) == objectType; 13 | } 14 | 15 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 16 | { 17 | writer.WriteValue($"0x{value:x}"); 18 | } 19 | 20 | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 21 | { 22 | var str = (string) reader.Value; 23 | if (str.StartsWith("0x")) 24 | str = str.Substring(2); 25 | 26 | if (string.IsNullOrEmpty(str)) 27 | return null; 28 | 29 | return str.HexToByteArray(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Stratum/StratumConstants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Stratum 6 | { 7 | public class StratumConstants 8 | { 9 | public static readonly Encoding Encoding = new UTF8Encoding(false); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Time/Abstractions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Coin Foundry (coinfoundry.org) 3 | Authors: Oliver Weichhold (oliver@weichhold.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | using System; 22 | 23 | namespace MiningCore.Time 24 | { 25 | public interface IMasterClock 26 | { 27 | DateTime Now { get; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Time/StandardClock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MiningCore.Time 6 | { 7 | public class StandardClock : IMasterClock 8 | { 9 | public DateTime Now => DateTime.UtcNow; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/Util/StaticRandom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Threading; 5 | 6 | namespace MiningCore.Util 7 | { 8 | public static class StaticRandom 9 | { 10 | static int seed = Environment.TickCount; 11 | 12 | private static readonly ThreadLocal random = 13 | new ThreadLocal(() => new Random(Interlocked.Increment(ref seed))); 14 | 15 | public static int Next() 16 | { 17 | return random.Value.Next(); 18 | } 19 | 20 | public static int Next(int n) 21 | { 22 | return random.Value.Next(n); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/linux-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # the following dev-dependencies must be installed 4 | # Ubuntu: apt-get update -y && apt-get -y install git cmake build-essential libssl-dev pkg-config libboost-all-dev libsodium-dev 5 | 6 | BUILDIR=${1:-../../build} 7 | 8 | echo "Building into $BUILDIR" 9 | 10 | # publish 11 | mkdir -p $BUILDIR 12 | dotnet publish -c Release --framework netcoreapp2.0 -o $BUILDIR 13 | 14 | # build libcryptonote 15 | (cd ../Native/libcryptonote && make) 16 | cp ../Native/libcryptonote/libcryptonote.so $BUILDIR 17 | (cd ../Native/libcryptonote && make clean) 18 | 19 | # build libmultihash 20 | (cd ../Native/libmultihash && make) 21 | cp ../Native/libmultihash/libmultihash.so $BUILDIR 22 | (cd ../Native/libmultihash && make clean) 23 | 24 | # copy libmultihash to bin for Visual Code 25 | mkdir -p ./bin/Debug/netcoreapp2.0/ ./bin/Release/netcoreapp2.0/ ../MiningCore.Tests/bin/Debug/netcoreapp2.0/ 26 | cp ../../build/libmultihash.so ./bin/Debug/netcoreapp2.0/ 27 | cp ../../build/libmultihash.so ./bin/Release/netcoreapp2.0/ 28 | cp ../../build/libmultihash.so ../MiningCore.Tests/bin/Debug/netcoreapp2.0/ 29 | -------------------------------------------------------------------------------- /aion_pool/src/MiningCore/windows-build.bat: -------------------------------------------------------------------------------- 1 | REM publish 2 | mkdir ..\..\build 3 | dotnet publish -c Release --framework netcoreapp2.0 -o ..\..\build 4 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | INC_DIRS = -I. -Icontrib/epee/include 3 | CFLAGS = -Wall -c -fPIC -maes -O2 -g $(INC_DIRS) -Wno-strict-aliasing 4 | CXXFLAGS = -Wall -Wno-unused-function -fPIC -fpermissive -std=c++0x -fexceptions -frtti -O2 -g $(INC_DIRS) 5 | LDFLAGS = -shared 6 | LDLIBS = -lboost_system -lboost_date_time 7 | TARGET = libcryptonote.so 8 | 9 | OBJECTS = contrib/epee/src/hex.o \ 10 | common/base58.o crypto/aesb.o crypto/blake256.o crypto/chacha.o \ 11 | contrib/epee/src/memwipe.o \ 12 | crypto/crypto-ops-data.o crypto/crypto-ops.o crypto/crypto.o crypto/groestl.o crypto/hash-extra-blake.o \ 13 | crypto/hash-extra-groestl.o crypto/hash-extra-jh.o crypto/hash-extra-skein.o crypto/hash.o crypto/jh.o \ 14 | crypto/keccak.o crypto/oaes_lib.o crypto/random.o crypto/skein.o crypto/slow-hash.o crypto/tree-hash.o \ 15 | crypto/slow-hash-lite.o cryptonote_basic/cryptonote_format_utils.o exports.o 16 | 17 | all: $(TARGET) 18 | 19 | $(TARGET): $(OBJECTS) 20 | g++ $(LDFLAGS) -o $@ $^ $(LDLIBS) 21 | 22 | .PHONY: clean 23 | 24 | clean: 25 | find . -name '*.o' -exec rm -r {} \; 26 | rm libcryptonote.so 27 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/Makefile.MSys2: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | INC_DIRS = -I. -Icontrib/epee/include 3 | CFLAGS = -Wall -c -fPIC -maes -O2 $(INC_DIRS) 4 | CXXFLAGS = -Wall -fPIC -fpermissive -std=c++0x -fexceptions -frtti -O2 $(INC_DIRS) 5 | LDFLAGS = -shared -static-libgcc -static-libstdc++ -static 6 | LDLIBS = -lboost_system-mt -lboost_date_time-mt 7 | TARGET = libcryptonote.dll 8 | 9 | OBJECTS = contrib/epee/src/hex.o \ 10 | common/base58.o crypto/aesb.o crypto/blake256.o crypto/chacha.o \ 11 | contrib/epee/src/memwipe.o \ 12 | crypto/crypto-ops-data.o crypto/crypto-ops.o crypto/crypto.o crypto/groestl.o crypto/hash-extra-blake.o \ 13 | crypto/hash-extra-groestl.o crypto/hash-extra-jh.o crypto/hash-extra-skein.o crypto/hash.o crypto/jh.o \ 14 | crypto/keccak.o crypto/oaes_lib.o crypto/random.o crypto/skein.o crypto/slow-hash.o crypto/tree-hash.o \ 15 | crypto/slow-hash-lite.o cryptonote_basic/cryptonote_format_utils.o exports.o 16 | 17 | all: $(TARGET) 18 | 19 | $(TARGET): $(OBJECTS) 20 | g++ $(LDFLAGS) -o $@ $^ $(LDLIBS) 21 | 22 | .PHONY: clean 23 | 24 | clean: 25 | find . -name '*.o' -exec rm -r {} \; 26 | rm libcryptonote.dll 27 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/contrib/epee/include/net/levin_client_async.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/aion_pool/src/Native/libcryptonote/contrib/epee/include/net/levin_client_async.inl -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/contrib/epee/include/net/local_ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/aion_pool/src/Native/libcryptonote/contrib/epee/include/net/local_ip.h -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/contrib/epee/include/pragma_comp_defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(__GNUC__) 4 | #define PRAGMA_WARNING_PUSH _Pragma("GCC diagnostic push") 5 | #define PRAGMA_WARNING_POP _Pragma("GCC diagnostic pop") 6 | #define PRAGMA_WARNING_DISABLE_VS(w) 7 | #define PRAGMA_GCC(w) _Pragma(w) 8 | #elif defined(_MSC_VER) 9 | #define PRAGMA_WARNING_PUSH __pragma(warning( push )) 10 | #define PRAGMA_WARNING_POP __pragma(warning( pop )) 11 | #define PRAGMA_WARNING_DISABLE_VS(w) __pragma( warning ( disable: w )) 12 | //#define PRAGMA_WARNING_DISABLE_GCC(w) 13 | #define PRAGMA_GCC(w) 14 | #endif 15 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/contrib/epee/include/readline_buffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace rdln 8 | { 9 | typedef enum { empty, partial, full } linestatus; 10 | class readline_buffer : public std::stringbuf 11 | { 12 | public: 13 | readline_buffer(); 14 | void start(); 15 | void stop(); 16 | bool is_running() const 17 | { 18 | return m_cout_buf != NULL; 19 | } 20 | linestatus get_line(std::string& line) const; 21 | void set_prompt(const std::string& prompt); 22 | static void add_completion(const std::string& command); 23 | static const std::vector& get_completions(); 24 | 25 | protected: 26 | virtual int sync(); 27 | 28 | private: 29 | std::streambuf* m_cout_buf; 30 | static std::vector& completion_commands(); 31 | }; 32 | 33 | class suspend_readline 34 | { 35 | public: 36 | suspend_readline(); 37 | ~suspend_readline(); 38 | private: 39 | readline_buffer* m_buffer; 40 | bool m_restart; 41 | }; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/contrib/epee/include/serialization/serialize_base.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/contrib/epee/include/warnings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_MSC_VER) 4 | 5 | #define PUSH_WARNINGS __pragma(warning(push)) 6 | #define POP_WARNINGS __pragma(warning(pop)) 7 | #define DISABLE_VS_WARNINGS(w) __pragma(warning(disable: w)) 8 | #define DISABLE_GCC_WARNING(w) 9 | #define DISABLE_CLANG_WARNING(w) 10 | #define DISABLE_GCC_AND_CLANG_WARNING(w) 11 | 12 | #else 13 | 14 | #include 15 | 16 | #define PUSH_WARNINGS _Pragma("GCC diagnostic push") 17 | #define POP_WARNINGS _Pragma("GCC diagnostic pop") 18 | #define DISABLE_VS_WARNINGS(w) 19 | 20 | #if defined(__clang__) 21 | #define DISABLE_GCC_WARNING(w) 22 | #define DISABLE_CLANG_WARNING DISABLE_GCC_AND_CLANG_WARNING 23 | #else 24 | #define DISABLE_GCC_WARNING DISABLE_GCC_AND_CLANG_WARNING 25 | #define DISABLE_CLANG_WARNING(w) 26 | #endif 27 | 28 | #define DISABLE_GCC_AND_CLANG_WARNING(w) _Pragma(BOOST_PP_STRINGIZE(GCC diagnostic ignored BOOST_PP_STRINGIZE(-W##w))) 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/crypto/jh.h: -------------------------------------------------------------------------------- 1 | /*This program gives the 64-bit optimized bitslice implementation of JH using ANSI C 2 | 3 | -------------------------------- 4 | Performance 5 | 6 | Microprocessor: Intel CORE 2 processor (Core 2 Duo Mobile T6600 2.2GHz) 7 | Operating System: 64-bit Ubuntu 10.04 (Linux kernel 2.6.32-22-generic) 8 | Speed for long message: 9 | 1) 45.8 cycles/byte compiler: Intel C++ Compiler 11.1 compilation option: icc -O2 10 | 2) 56.8 cycles/byte compiler: gcc 4.4.3 compilation option: gcc -O3 11 | 12 | -------------------------------- 13 | Last Modified: January 16, 2011 14 | */ 15 | #pragma once 16 | 17 | typedef unsigned char BitSequence; 18 | typedef unsigned long long DataLength; 19 | typedef enum {SUCCESS = 0, FAIL = 1, BAD_HASHLEN = 2} HashReturn; 20 | 21 | HashReturn jh_hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval); 22 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/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 | void keccak(const uint8_t *in, size_t 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, size_t inlen, uint8_t *md); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/libcryptonote.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26720.2 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcryptonote", "libcryptonote.vcxproj", "{2DE74E14-BF6D-4046-951B-8EBC8A1BA009}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x64.ActiveCfg = Debug|x64 17 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x64.Build.0 = Debug|x64 18 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x86.ActiveCfg = Debug|Win32 19 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x86.Build.0 = Debug|Win32 20 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x64.ActiveCfg = Release|x64 21 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x64.Build.0 = Release|x64 22 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x86.ActiveCfg = Release|Win32 23 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {DDE0FE54-030A-4DFD-98A1-952779FB461F} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // $safeprojectname$.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 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | // Windows Header Files: 11 | #include 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libcryptonote/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/Lyra2RE.h: -------------------------------------------------------------------------------- 1 | #ifndef LYRA2RE_H 2 | #define LYRA2RE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void lyra2re_hash(const char* input, char* output); 9 | void lyra2re2_hash(const char* input, char* output); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/bcrypt.h: -------------------------------------------------------------------------------- 1 | #ifndef BCRYPT_H 2 | #define BCRYPT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void bcrypt_hash(const char *input, char *output); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/blake.c: -------------------------------------------------------------------------------- 1 | #include "blake.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_blake.h" 8 | 9 | 10 | void blake_hash(const char* input, char* output, uint32_t len) 11 | { 12 | sph_blake256_context ctx_blake; 13 | sph_blake256_init(&ctx_blake); 14 | sph_blake256(&ctx_blake, input, len); 15 | sph_blake256_close(&ctx_blake, output); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/blake.h: -------------------------------------------------------------------------------- 1 | #ifndef BLAKE_H 2 | #define BLAKE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void blake_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/blake2b.c: -------------------------------------------------------------------------------- 1 | #include "blake2b.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_blake2b.h" 8 | 9 | void blake2b_hash(const char* input, char* output, int inlen) 10 | { 11 | blake2b_ctx ctx_blake2b; 12 | blake2b_init(&ctx_blake2b, 32, NULL, 0); 13 | blake2b_update(&ctx_blake2b, input, inlen); 14 | blake2b_final(&ctx_blake2b, output); 15 | } 16 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/blake2b.h: -------------------------------------------------------------------------------- 1 | #ifndef BLAKE2B_H 2 | #define BLAKE2B_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void blake2b_hash(const char* input, char* output, int inlen); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/blake2s.c: -------------------------------------------------------------------------------- 1 | #include "blake2s.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_blake2s.h" 8 | 9 | void blake2s_hash(const char* input, char* output, int inlen) 10 | { 11 | blake2s_state ctx_blake2s; 12 | blake2s_init(&ctx_blake2s, BLAKE2S_OUTBYTES); 13 | blake2s_update(&ctx_blake2s, input, inlen); 14 | blake2s_final(&ctx_blake2s, output, BLAKE2S_OUTBYTES); 15 | } 16 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/blake2s.h: -------------------------------------------------------------------------------- 1 | #ifndef BLAKE2S_H 2 | #define BLAKE2S_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void blake2s_hash(const char* input, char* output, int inlen); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/boolberry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | void boolberry_hash(const char* input, uint32_t input_len, const char* scratchpad, uint64_t spad_length, char* output, uint64_t height); 7 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/c11.h: -------------------------------------------------------------------------------- 1 | #ifndef C11_H 2 | #define C11_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void c11_hash(const char* input, char* output); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/dcrypt.h: -------------------------------------------------------------------------------- 1 | #ifndef DCRYPT_H 2 | #define DCRYPT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void dcrypt_hash(const char* input, char* hash, uint32_t len); 11 | 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/hmac_sha256.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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 | #include "hmac_sha256.h" 6 | 7 | #include 8 | 9 | CHMAC_SHA256::CHMAC_SHA256(const unsigned char* key, size_t keylen) 10 | { 11 | unsigned char rkey[64]; 12 | if (keylen <= 64) { 13 | memcpy(rkey, key, keylen); 14 | memset(rkey + keylen, 0, 64 - keylen); 15 | } else { 16 | CSHA256().Write(key, keylen).Finalize(rkey); 17 | memset(rkey + 32, 0, 32); 18 | } 19 | 20 | for (int n = 0; n < 64; n++) 21 | rkey[n] ^= 0x5c; 22 | outer.Write(rkey, 64); 23 | 24 | for (int n = 0; n < 64; n++) 25 | rkey[n] ^= 0x5c ^ 0x36; 26 | inner.Write(rkey, 64); 27 | } 28 | 29 | void CHMAC_SHA256::Finalize(unsigned char hash[OUTPUT_SIZE]) 30 | { 31 | unsigned char temp[32]; 32 | inner.Finalize(temp); 33 | outer.Write(temp, 32).Finalize(hash); 34 | } 35 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/hmac_sha256.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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_HMAC_SHA256_H 6 | #define BITCOIN_CRYPTO_HMAC_SHA256_H 7 | 8 | #include "sha256.h" 9 | 10 | #include 11 | #include 12 | 13 | /** A hasher class for HMAC-SHA-512. */ 14 | class CHMAC_SHA256 15 | { 16 | private: 17 | CSHA256 outer; 18 | CSHA256 inner; 19 | 20 | public: 21 | static const size_t OUTPUT_SIZE = 32; 22 | 23 | CHMAC_SHA256(const unsigned char* key, size_t keylen); 24 | CHMAC_SHA256& Write(const unsigned char* data, size_t len) 25 | { 26 | inner.Write(data, len); 27 | return *this; 28 | } 29 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 30 | }; 31 | 32 | #endif // BITCOIN_CRYPTO_HMAC_SHA256_H 33 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/hmac_sha512.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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 | #include "hmac_sha512.h" 6 | 7 | #include 8 | 9 | CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen) 10 | { 11 | unsigned char rkey[128]; 12 | if (keylen <= 128) { 13 | memcpy(rkey, key, keylen); 14 | memset(rkey + keylen, 0, 128 - keylen); 15 | } else { 16 | CSHA512().Write(key, keylen).Finalize(rkey); 17 | memset(rkey + 64, 0, 64); 18 | } 19 | 20 | for (int n = 0; n < 128; n++) 21 | rkey[n] ^= 0x5c; 22 | outer.Write(rkey, 128); 23 | 24 | for (int n = 0; n < 128; n++) 25 | rkey[n] ^= 0x5c ^ 0x36; 26 | inner.Write(rkey, 128); 27 | } 28 | 29 | void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) 30 | { 31 | unsigned char temp[64]; 32 | inner.Finalize(temp); 33 | outer.Write(temp, 64).Finalize(hash); 34 | } 35 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/hmac_sha512.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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_HMAC_SHA512_H 6 | #define BITCOIN_CRYPTO_HMAC_SHA512_H 7 | 8 | #include "sha512.h" 9 | 10 | #include 11 | #include 12 | 13 | /** A hasher class for HMAC-SHA-512. */ 14 | class CHMAC_SHA512 15 | { 16 | private: 17 | CSHA512 outer; 18 | CSHA512 inner; 19 | 20 | public: 21 | static const size_t OUTPUT_SIZE = 64; 22 | 23 | CHMAC_SHA512(const unsigned char* key, size_t keylen); 24 | CHMAC_SHA512& Write(const unsigned char* data, size_t len) 25 | { 26 | inner.Write(data, len); 27 | return *this; 28 | } 29 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 30 | }; 31 | 32 | #endif // BITCOIN_CRYPTO_HMAC_SHA512_H 33 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/ripemd160.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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_RIPEMD160_H 6 | #define BITCOIN_CRYPTO_RIPEMD160_H 7 | 8 | #include 9 | #include 10 | 11 | /** A hasher class for RIPEMD-160. */ 12 | class CRIPEMD160 13 | { 14 | private: 15 | uint32_t s[5]; 16 | unsigned char buf[64]; 17 | size_t bytes; 18 | 19 | public: 20 | static const size_t OUTPUT_SIZE = 20; 21 | 22 | CRIPEMD160(); 23 | CRIPEMD160& Write(const unsigned char* data, size_t len); 24 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 25 | CRIPEMD160& Reset(); 26 | }; 27 | 28 | #endif // BITCOIN_CRYPTO_RIPEMD160_H 29 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/sha1.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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_SHA1_H 6 | #define BITCOIN_CRYPTO_SHA1_H 7 | 8 | #include 9 | #include 10 | 11 | /** A hasher class for SHA1. */ 12 | class CSHA1 13 | { 14 | private: 15 | uint32_t s[5]; 16 | unsigned char buf[64]; 17 | size_t bytes; 18 | 19 | public: 20 | static const size_t OUTPUT_SIZE = 20; 21 | 22 | CSHA1(); 23 | CSHA1& Write(const unsigned char* data, size_t len); 24 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 25 | CSHA1& Reset(); 26 | }; 27 | 28 | #endif // BITCOIN_CRYPTO_SHA1_H 29 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/sha256.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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 | 11 | 12 | /** A hasher class for SHA-256. */ 13 | class CSHA256 14 | { 15 | public: 16 | static const size_t OUTPUT_SIZE = 32; 17 | 18 | CSHA256(); 19 | CSHA256& Write(const unsigned char* data, size_t len); 20 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 21 | void FinalizeNoPadding(unsigned char hash[OUTPUT_SIZE]) { 22 | FinalizeNoPadding(hash, true); 23 | }; 24 | CSHA256& Reset(); 25 | 26 | private: 27 | uint32_t s[8]; 28 | unsigned char buf[64]; 29 | size_t bytes; 30 | void FinalizeNoPadding(unsigned char hash[OUTPUT_SIZE], bool enforce_compression); 31 | }; 32 | 33 | #endif // BITCOIN_CRYPTO_SHA256_H 34 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/crypto/sha512.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 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_SHA512_H 6 | #define BITCOIN_CRYPTO_SHA512_H 7 | 8 | #include 9 | #include 10 | 11 | /** A hasher class for SHA-512. */ 12 | class CSHA512 13 | { 14 | private: 15 | uint64_t s[8]; 16 | unsigned char buf[128]; 17 | size_t bytes; 18 | 19 | public: 20 | static const size_t OUTPUT_SIZE = 64; 21 | 22 | CSHA512(); 23 | CSHA512& Write(const unsigned char* data, size_t len); 24 | void Finalize(unsigned char hash[OUTPUT_SIZE]); 25 | CSHA512& Reset(); 26 | }; 27 | 28 | #endif // BITCOIN_CRYPTO_SHA512_H 29 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/equihashverify.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto/equihash.h" 3 | #include "equihashverify.h" 4 | 5 | bool verifyEH(const char *hdr, const std::vector &soln, unsigned int n){ 6 | unsigned int k = 9; 7 | 8 | // Hash state 9 | crypto_generichash_blake2b_state state; 10 | EhInitialiseState(n, k, state); 11 | 12 | crypto_generichash_blake2b_update(&state, (const unsigned char*)hdr, 140); 13 | 14 | bool isValid = false; 15 | EhIsValidSolution(n, k, state, soln, isValid); 16 | 17 | return isValid; 18 | } 19 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/equihashverify.h: -------------------------------------------------------------------------------- 1 | #ifndef EQUIHASHVERIFY_H 2 | #define EQUIHASHVERIFY_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | bool verifyEH(const char*, const std::vector&, unsigned int n); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/support/cleanse.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009-2010 Satoshi Nakamoto 2 | // Copyright (c) 2009-2015 The Bitcoin Core developers 3 | // Distributed under the MIT software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #include "cleanse.h" 7 | 8 | #ifndef _WIN32 9 | #include 10 | #else 11 | #include 12 | #endif 13 | 14 | void memory_cleanse(void *ptr, size_t len) 15 | { 16 | #ifndef _WIN32 17 | OPENSSL_cleanse(ptr, len); 18 | #else 19 | ZeroMemory(ptr, 0, len); 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi/support/cleanse.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009-2010 Satoshi Nakamoto 2 | // Copyright (c) 2009-2015 The Bitcoin Core developers 3 | // Distributed under the MIT software license, see the accompanying 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #ifndef BITCOIN_SUPPORT_CLEANSE_H 7 | #define BITCOIN_SUPPORT_CLEANSE_H 8 | 9 | #include 10 | 11 | void memory_cleanse(void *ptr, size_t len); 12 | 13 | #endif // BITCOIN_SUPPORT_CLEANSE_H 14 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi210/blake/blake2-config.h: -------------------------------------------------------------------------------- 1 | /* 2 | BLAKE2 reference source code package - optimized C implementations 3 | 4 | Written in 2012 by Samuel Neves 5 | 6 | To the extent possible under law, the author(s) have dedicated all copyright 7 | and related and neighboring rights to this software to the public domain 8 | worldwide. This software is distributed without any warranty. 9 | 10 | You should have received a copy of the CC0 Public Domain Dedication along with 11 | this software. If not, see . 12 | */ 13 | #pragma once 14 | #ifndef __BLAKE2_CONFIG_H__ 15 | #define __BLAKE2_CONFIG_H__ 16 | 17 | // These don't work everywhere 18 | #if defined(__SSE2__) 19 | #define HAVE_SSE2 20 | #endif 21 | 22 | #if defined(__SSSE3__) 23 | #define HAVE_SSSE3 24 | #endif 25 | 26 | #if defined(__SSE4_1__) 27 | #define HAVE_SSE41 28 | #endif 29 | 30 | #if defined(__AVX__) 31 | #define HAVE_AVX 32 | #endif 33 | 34 | #if defined(__XOP__) 35 | #define HAVE_XOP 36 | #endif 37 | 38 | 39 | #ifdef HAVE_AVX2 40 | #ifndef HAVE_AVX 41 | #define HAVE_AVX 42 | #endif 43 | #endif 44 | 45 | #ifdef HAVE_XOP 46 | #ifndef HAVE_AVX 47 | #define HAVE_AVX 48 | #endif 49 | #endif 50 | 51 | #ifdef HAVE_AVX 52 | #ifndef HAVE_SSE41 53 | #define HAVE_SSE41 54 | #endif 55 | #endif 56 | 57 | #ifdef HAVE_SSE41 58 | #ifndef HAVE_SSSE3 59 | #define HAVE_SSSE3 60 | #endif 61 | #endif 62 | 63 | #ifdef HAVE_SSSE3 64 | #define HAVE_SSE2 65 | #endif 66 | 67 | #if !defined(HAVE_SSE2) 68 | #error "This code requires at least SSE2." 69 | #endif 70 | 71 | #endif 72 | 73 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi210/equi/blake2b.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | bool blake2b(const char *in, const uint8_t len, unsigned char *out){ 7 | crypto_generichash_blake2b_state S; 8 | crypto_generichash_init(&S, NULL, 0, len); 9 | crypto_generichash_blake2b_update(&S, in, 10); 10 | crypto_generichash_blake2b_final(&S, out, len); 11 | uint8_t _len = strlen(out); 12 | if(_len < len) 13 | return 0; 14 | else 15 | return 1; 16 | } -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi210/equi/blake2b.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | bool blake2b(const char *in, const uint8_t len, unsigned char *out); -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi210/equi210verify.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "equi/equi210.h" 3 | #include "equi210verify.h" 4 | 5 | bool verifyEqui210(const char *hdr, const char *soln){ 6 | unsigned int n = 210; 7 | unsigned int k = 9; 8 | 9 | bool isValid = verifyEH210(hdr, soln, n, k); 10 | 11 | return isValid; 12 | } -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/equi210/equi210verify.h: -------------------------------------------------------------------------------- 1 | #ifndef EQUI210HASHVERIFY_H 2 | #define EQUI210HASHVERIFY_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | bool verifyEqui210(const char*, const char*); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/fresh.c: -------------------------------------------------------------------------------- 1 | #include "fresh.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_shavite.h" 8 | #include "sha3/sph_simd.h" 9 | #include "sha3/sph_echo.h" 10 | 11 | void fresh_hash(const char* input, char* output, uint32_t len) 12 | { 13 | sph_shavite512_context ctx_shavite1; 14 | sph_simd512_context ctx_simd1; 15 | sph_echo512_context ctx_echo1; 16 | 17 | //these uint512 in the c++ source of the client are backed by an array of uint32 18 | uint32_t hashA[16], hashB[16]; 19 | 20 | sph_shavite512_init (&ctx_shavite1); 21 | sph_shavite512 (&ctx_shavite1, input, len); 22 | sph_shavite512_close(&ctx_shavite1, hashA); 23 | 24 | sph_simd512_init (&ctx_simd1); 25 | sph_simd512 (&ctx_simd1, hashA, 64); 26 | sph_simd512_close(&ctx_simd1, hashB); 27 | 28 | sph_shavite512_init (&ctx_shavite1); 29 | sph_shavite512 (&ctx_shavite1, hashB, 64); 30 | sph_shavite512_close(&ctx_shavite1, hashA); 31 | 32 | sph_simd512_init (&ctx_simd1); 33 | sph_simd512 (&ctx_simd1, hashA, 64); 34 | sph_simd512_close(&ctx_simd1, hashB); 35 | 36 | sph_echo512_init (&ctx_echo1); 37 | sph_echo512 (&ctx_echo1, hashB, 64); 38 | sph_echo512_close(&ctx_echo1, hashA); 39 | 40 | memcpy(output, hashA, 32); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/fresh.h: -------------------------------------------------------------------------------- 1 | #ifndef FRESH_H 2 | #define FRESH_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void fresh_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/fugue.c: -------------------------------------------------------------------------------- 1 | #include "fugue.h" 2 | 3 | #include "sha3/sph_fugue.h" 4 | 5 | void fugue_hash(const char* input, char* output, uint32_t len) 6 | { 7 | sph_fugue256_context ctx_fugue; 8 | sph_fugue256_init(&ctx_fugue); 9 | sph_fugue256(&ctx_fugue, input, len); 10 | sph_fugue256_close(&ctx_fugue, output); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/fugue.h: -------------------------------------------------------------------------------- 1 | #ifndef FUGUE_H 2 | #define FUGUE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void fugue_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/groestl.c: -------------------------------------------------------------------------------- 1 | #include "groestl.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_groestl.h" 8 | #include "sha256.h" 9 | 10 | void groestl_hash(const char* input, char* output, uint32_t len) 11 | { 12 | char hash1[64]; 13 | char hash2[64]; 14 | 15 | sph_groestl512_context ctx_groestl; 16 | sph_groestl512_init(&ctx_groestl); 17 | sph_groestl512(&ctx_groestl, input, len); 18 | sph_groestl512_close(&ctx_groestl, &hash1); 19 | 20 | sph_groestl512(&ctx_groestl, hash1, 64); 21 | sph_groestl512_close(&ctx_groestl, &hash2); 22 | 23 | memcpy(output, &hash2, 32); 24 | } 25 | 26 | void groestlmyriad_hash(const char* input, char* output, uint32_t len) 27 | { 28 | char temp[64]; 29 | 30 | sph_groestl512_context ctx_groestl; 31 | sph_groestl512_init(&ctx_groestl); 32 | sph_groestl512(&ctx_groestl, input, len); 33 | sph_groestl512_close(&ctx_groestl, &temp); 34 | 35 | SHA256_CTX ctx_sha256; 36 | SHA256_Init(&ctx_sha256); 37 | SHA256_Update(&ctx_sha256, &temp, 64); 38 | SHA256_Final((unsigned char*) output, &ctx_sha256); 39 | } 40 | 41 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/groestl.h: -------------------------------------------------------------------------------- 1 | #ifndef GROESTL_H 2 | #define GROESTL_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void groestl_hash(const char* input, char* output, uint32_t len); 11 | void groestlmyriad_hash(const char* input, char* output, uint32_t len); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/hefty1.h: -------------------------------------------------------------------------------- 1 | #ifndef HEFTY1_H 2 | #define HEFTY1_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void hefty1_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/jh.c: -------------------------------------------------------------------------------- 1 | #include "jh.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "sha3/sph_jh.h" 8 | 9 | 10 | void jh_hash(const char* input, char* output, uint32_t len) { 11 | 12 | sph_jh256_context ctx_jh; 13 | sph_jh256_init(&ctx_jh); 14 | sph_jh256 (&ctx_jh, input, len); 15 | sph_jh256_close(&ctx_jh, output); 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/jh.h: -------------------------------------------------------------------------------- 1 | #ifndef JHA_H 2 | #define JHA_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void jh_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/keccak.c: -------------------------------------------------------------------------------- 1 | #include "keccak.h" 2 | 3 | #include "sha3/sph_types.h" 4 | #include "sha3/sph_keccak.h" 5 | 6 | 7 | void keccak_hash(const char* input, char* output, uint32_t size) 8 | { 9 | sph_keccak256_context ctx_keccak; 10 | sph_keccak256_init(&ctx_keccak); 11 | sph_keccak256 (&ctx_keccak, input, size);//80); 12 | sph_keccak256_close(&ctx_keccak, output); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/keccak.h: -------------------------------------------------------------------------------- 1 | #ifndef KECCAK_H 2 | #define KECCAK_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void keccak_hash(const char* input, char* output, uint32_t size); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/compiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of cpp-ethereum. 3 | 4 | cpp-ethereum is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | cpp-ethereum is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with cpp-ethereum. If not, see . 16 | */ 17 | /** @file compiler.h 18 | * @date 2014 19 | */ 20 | #pragma once 21 | 22 | // Visual Studio doesn't support the inline keyword in C mode 23 | #if defined(_MSC_VER) && !defined(__cplusplus) 24 | #define inline __inline 25 | #endif 26 | 27 | // pretend restrict is a standard keyword 28 | #if defined(_MSC_VER) 29 | #define restrict __restrict 30 | #else 31 | #define restrict __restrict__ 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/fnv.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of cpp-ethereum. 3 | 4 | cpp-ethereum is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | cpp-ethereum is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with cpp-ethereum. If not, see . 16 | */ 17 | /** @file fnv.h 18 | * @author Matthew Wampler-Doty 19 | * @date 2015 20 | */ 21 | 22 | #pragma once 23 | #include 24 | #include "compiler.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #define FNV_PRIME 0x01000193 31 | 32 | /* The FNV-1 spec multiplies the prime with the input one byte (octet) in turn. 33 | We instead multiply it with the full 32-bit input. 34 | This gives a different result compared to a canonical FNV-1 implementation. 35 | */ 36 | static inline uint32_t fnv_hash(uint32_t const x, uint32_t const y) 37 | { 38 | return x * FNV_PRIME ^ y; 39 | } 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/mmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ethash. 3 | 4 | ethash is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | ethash is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with ethash. If not, see . 16 | */ 17 | /** @file mmap.h 18 | * @author Lefteris Karapetsas 19 | * @date 2015 20 | */ 21 | #pragma once 22 | #if defined(__MINGW32__) || defined(_WIN32) 23 | #include 24 | 25 | #define PROT_READ 0x1 26 | #define PROT_WRITE 0x2 27 | /* This flag is only available in WinXP+ */ 28 | #ifdef FILE_MAP_EXECUTE 29 | #define PROT_EXEC 0x4 30 | #else 31 | #define PROT_EXEC 0x0 32 | #define FILE_MAP_EXECUTE 0 33 | #endif 34 | 35 | #define MAP_SHARED 0x01 36 | #define MAP_PRIVATE 0x02 37 | #define MAP_ANONYMOUS 0x20 38 | #define MAP_ANON MAP_ANONYMOUS 39 | #define MAP_FAILED ((void *) -1) 40 | 41 | void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset); 42 | void munmap(void* addr, size_t length); 43 | #else // posix, yay! ^_^ 44 | #include 45 | #endif 46 | 47 | 48 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/sha3.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include "compiler.h" 8 | #include 9 | #include 10 | 11 | struct ethash_h256; 12 | 13 | #define decsha3(bits) \ 14 | int sha3_##bits(uint8_t*, size_t, uint8_t const*, size_t); 15 | 16 | decsha3(256) 17 | decsha3(512) 18 | 19 | static inline void SHA3_256(struct ethash_h256 const* ret, uint8_t const* data, size_t const size) 20 | { 21 | sha3_256((uint8_t*)ret, 32, data, size); 22 | } 23 | 24 | static inline void SHA3_512(uint8_t* ret, uint8_t const* data, size_t const size) 25 | { 26 | sha3_512(ret, 64, data, size); 27 | } 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/sha3_cryptopp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ethash. 3 | 4 | ethash is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | ethash is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with ethash. If not, see . 16 | */ 17 | 18 | /** @file sha3.cpp 19 | * @author Tim Hughes 20 | * @date 2015 21 | */ 22 | #include 23 | #include 24 | 25 | extern "C" { 26 | struct ethash_h256; 27 | typedef struct ethash_h256 ethash_h256_t; 28 | void SHA3_256(ethash_h256_t const* ret, uint8_t const* data, size_t size) 29 | { 30 | CryptoPP::SHA3_256().CalculateDigest((uint8_t*)ret, data, size); 31 | } 32 | 33 | void SHA3_512(uint8_t* const ret, uint8_t const* data, size_t size) 34 | { 35 | CryptoPP::SHA3_512().CalculateDigest(ret, data, size); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/sha3_cryptopp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "compiler.h" 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | struct ethash_h256; 12 | 13 | void SHA3_256(struct ethash_h256 const* ret, uint8_t const* data, size_t size); 14 | void SHA3_512(uint8_t* const ret, uint8_t const* data, size_t size); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ethash. 3 | 4 | ethash is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | ethash is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with ethash. If not, see . 16 | */ 17 | /** @file util.h 18 | * @author Tim Hughes 19 | * @date 2015 20 | */ 21 | #pragma once 22 | #include 23 | #include "compiler.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #ifdef _MSC_VER 30 | void debugf(char const* str, ...); 31 | #else 32 | #define debugf printf 33 | #endif 34 | 35 | static inline uint32_t min_u32(uint32_t a, uint32_t b) 36 | { 37 | return a < b ? a : b; 38 | } 39 | 40 | static inline uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_) 41 | { 42 | return x < min_ ? min_ : (x > max_ ? max_ : x); 43 | } 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libethash/util_win32.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of cpp-ethereum. 3 | 4 | cpp-ethereum is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | cpp-ethereum is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with cpp-ethereum. If not, see . 16 | */ 17 | /** @file util.c 18 | * @author Tim Hughes 19 | * @date 2015 20 | */ 21 | #include 22 | #include 23 | #include "util.h" 24 | 25 | 26 | // foward declare without all of Windows.h 27 | __declspec(dllimport) void __stdcall OutputDebugStringA(char const* lpOutputString); 28 | 29 | void debugf(char const* str, ...) 30 | { 31 | va_list args; 32 | va_start(args, str); 33 | 34 | char buf[1<<16]; 35 | _vsnprintf_s(buf, sizeof(buf), sizeof(buf), str, args); 36 | buf[sizeof(buf)-1] = '\0'; 37 | OutputDebugStringA(buf); 38 | } 39 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/libmultihash.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26720.2 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmultihash", "libmultihash.vcxproj", "{2DE74E14-BF6D-4046-951B-8EBC8A1BA009}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x64.ActiveCfg = Debug|x64 17 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x64.Build.0 = Debug|x64 18 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x86.ActiveCfg = Debug|Win32 19 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x86.Build.0 = Debug|Win32 20 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x64.ActiveCfg = Release|x64 21 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x64.Build.0 = Release|x64 22 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x86.ActiveCfg = Release|Win32 23 | {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {DDE0FE54-030A-4DFD-98A1-952779FB461F} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/net-core-test/net-core-test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp1.1 6 | 7 | 8 | 9 | True 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/net-core-test/net-core-test.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26430.16 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "net-core-test", "net-core-test.csproj", "{23D6F17A-2FA5-4614-812B-864387322994}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {23D6F17A-2FA5-4614-812B-864387322994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {23D6F17A-2FA5-4614-812B-864387322994}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {23D6F17A-2FA5-4614-812B-864387322994}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {23D6F17A-2FA5-4614-812B-864387322994}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/nist5.c: -------------------------------------------------------------------------------- 1 | #include "nist5.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_blake.h" 8 | #include "sha3/sph_groestl.h" 9 | #include "sha3/sph_jh.h" 10 | #include "sha3/sph_keccak.h" 11 | #include "sha3/sph_skein.h" 12 | 13 | 14 | void nist5_hash(const char* input, char* output, uint32_t len) 15 | { 16 | sph_blake512_context ctx_blake; 17 | sph_groestl512_context ctx_groestl; 18 | sph_skein512_context ctx_skein; 19 | sph_jh512_context ctx_jh; 20 | sph_keccak512_context ctx_keccak; 21 | 22 | //these uint512 in the c++ source of the client are backed by an array of uint32 23 | uint32_t hash[16]; 24 | 25 | sph_blake512_init(&ctx_blake); 26 | sph_blake512 (&ctx_blake, input, len); 27 | sph_blake512_close (&ctx_blake, hash); 28 | 29 | sph_groestl512_init(&ctx_groestl); 30 | sph_groestl512 (&ctx_groestl, hash, 64); 31 | sph_groestl512_close(&ctx_groestl, hash); 32 | 33 | sph_jh512_init(&ctx_jh); 34 | sph_jh512 (&ctx_jh, hash, 64); 35 | sph_jh512_close(&ctx_jh, hash); 36 | 37 | sph_keccak512_init(&ctx_keccak); 38 | sph_keccak512 (&ctx_keccak, hash, 64); 39 | sph_keccak512_close(&ctx_keccak, hash); 40 | 41 | sph_skein512_init(&ctx_skein); 42 | sph_skein512 (&ctx_skein, hash, 64); 43 | sph_skein512_close (&ctx_skein, hash); 44 | 45 | memcpy(output, hash, 32); 46 | } -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/nist5.h: -------------------------------------------------------------------------------- 1 | #ifndef NIST5_H 2 | #define NIST5_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void nist5_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/quark.h: -------------------------------------------------------------------------------- 1 | #ifndef QUARK_H 2 | #define QUARK_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void quark_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/qubit.c: -------------------------------------------------------------------------------- 1 | #include "qubit.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "sha3/sph_cubehash.h" 7 | #include "sha3/sph_luffa.h" 8 | #include "sha3/sph_shavite.h" 9 | #include "sha3/sph_simd.h" 10 | #include "sha3/sph_echo.h" 11 | 12 | void qubit_hash(const char* input, char* output, uint32_t len) 13 | { 14 | sph_luffa512_context ctx_luffa; 15 | sph_cubehash512_context ctx_cubehash; 16 | sph_shavite512_context ctx_shavite; 17 | sph_simd512_context ctx_simd; 18 | sph_echo512_context ctx_echo; 19 | 20 | char hash1[64]; 21 | char hash2[64]; 22 | 23 | sph_luffa512_init(&ctx_luffa); 24 | sph_luffa512(&ctx_luffa, (const void*) input, len); 25 | sph_luffa512_close(&ctx_luffa, (void*) &hash1); // 1 26 | 27 | sph_cubehash512_init(&ctx_cubehash); 28 | sph_cubehash512(&ctx_cubehash, (const void*) &hash1, 64); // 1 29 | sph_cubehash512_close(&ctx_cubehash, (void*) &hash2); // 2 30 | 31 | sph_shavite512_init(&ctx_shavite); 32 | sph_shavite512(&ctx_shavite, (const void*) &hash2, 64); // 3 33 | sph_shavite512_close(&ctx_shavite, (void*) &hash1); // 4 34 | 35 | sph_simd512_init(&ctx_simd); 36 | sph_simd512(&ctx_simd, (const void*) &hash1, 64); // 4 37 | sph_simd512_close(&ctx_simd, (void*) &hash2); // 5 38 | 39 | sph_echo512_init(&ctx_echo); 40 | sph_echo512(&ctx_echo, (const void*) &hash2, 64); // 5 41 | sph_echo512_close(&ctx_echo, (void*) &hash1); // 6 42 | 43 | memcpy(output, &hash1, 32); 44 | } 45 | 46 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/qubit.h: -------------------------------------------------------------------------------- 1 | #ifndef QUBIT_H 2 | #define QUBIT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void qubit_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/s3.c: -------------------------------------------------------------------------------- 1 | #include "s3.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_skein.h" 8 | #include "sha3/sph_shavite.h" 9 | #include "sha3/sph_simd.h" 10 | 11 | void s3_hash(const char* input, char* output, uint32_t len) 12 | { 13 | sph_shavite512_context ctx_shavite1; 14 | sph_simd512_context ctx_simd1; 15 | sph_skein512_context ctx_skein; 16 | 17 | //these uint512 in the c++ source of the client are backed by an array of uint32 18 | uint32_t hashA[16], hashB[16]; 19 | 20 | sph_shavite512_init (&ctx_shavite1); 21 | sph_shavite512 (&ctx_shavite1, input, 80); 22 | sph_shavite512_close(&ctx_shavite1, hashA); 23 | 24 | sph_simd512_init (&ctx_simd1); 25 | sph_simd512 (&ctx_simd1, hashA, 64); 26 | sph_simd512_close(&ctx_simd1, hashB); 27 | 28 | sph_skein512_init(&ctx_skein); 29 | sph_skein512 (&ctx_skein, hashB, 64); 30 | sph_skein512_close (&ctx_skein, hashA); 31 | 32 | memcpy(output, hashA, 32); 33 | } 34 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/s3.h: -------------------------------------------------------------------------------- 1 | #ifndef S3_H 2 | #define S3_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void s3_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/scryptjane.h: -------------------------------------------------------------------------------- 1 | #ifndef SCRYPT_JANE_H 2 | #define SCRYPT_JANE_H 3 | 4 | #include 5 | 6 | #define SCRYPT_KECCAK512 7 | #define SCRYPT_CHACHA 8 | #define SCRYPT_CHOOSE_COMPILETIME 9 | 10 | /* 11 | Nfactor: Increases CPU & Memory Hardness 12 | N = (1 << (Nfactor + 1)): How many times to mix a chunk and how many temporary chunks are used 13 | 14 | rfactor: Increases Memory Hardness 15 | r = (1 << rfactor): How large a chunk is 16 | 17 | pfactor: Increases CPU Hardness 18 | p = (1 << pfactor): Number of times to mix the main chunk 19 | 20 | A block is the basic mixing unit (salsa/chacha block = 64 bytes) 21 | A chunk is (2 * r) blocks 22 | 23 | ~Memory used = (N + 2) * ((2 * r) * block size) 24 | */ 25 | 26 | #include 27 | 28 | typedef void (*scrypt_fatal_errorfn)(const char *msg); 29 | void scrypt_set_fatal_error(scrypt_fatal_errorfn fn); 30 | 31 | void scrypt(const unsigned char *password, size_t password_len, const unsigned char *salt, size_t salt_len, unsigned char Nfactor, unsigned char rfactor, unsigned char pfactor, unsigned char *out, size_t bytes); 32 | 33 | unsigned char GetNfactorJane(int nTimestamp, int nChainStartTime, int nMin, int nMax); 34 | void scryptjane_hash(const void* input, size_t inputlen, uint32_t *res, unsigned char Nfactor); 35 | 36 | #endif /* SCRYPT_JANE_H */ 37 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/scryptn.h: -------------------------------------------------------------------------------- 1 | #ifndef SCRYPTN_H 2 | #define SCRYPTN_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); 9 | void scrypt_N_R_1_256_sp(const char* input, char* output, char* scratchpad, uint32_t N, uint32_t R, uint32_t len); 10 | //const int scrypt_scratchpad_size = 131583; 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/sha3/sph_blake2b.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef __BLAKE2B_H__ 3 | #define __BLAKE2B_H__ 4 | 5 | #include 6 | #include 7 | 8 | #if defined(_MSC_VER) 9 | #include 10 | #define inline __inline 11 | #define ALIGN(x) __declspec(align(x)) 12 | #else 13 | #define ALIGN(x) __attribute__((aligned(x))) 14 | #endif 15 | 16 | #if defined(_MSC_VER) || defined(__x86_64__) || defined(__x86__) 17 | #define NATIVE_LITTLE_ENDIAN 18 | #endif 19 | 20 | // state context 21 | ALIGN(64) typedef struct { 22 | uint8_t b[128]; // input buffer 23 | uint64_t h[8]; // chained state 24 | uint64_t t[2]; // total number of bytes 25 | size_t c; // pointer for b[] 26 | size_t outlen; // digest size 27 | } blake2b_ctx; 28 | 29 | #if defined(__cplusplus) 30 | extern "C" { 31 | #endif 32 | 33 | int blake2b_init(blake2b_ctx *ctx, size_t outlen, const void *key, size_t keylen); 34 | void blake2b_update(blake2b_ctx *ctx, const void *in, size_t inlen); 35 | void blake2b_final(blake2b_ctx *ctx, void *out); 36 | 37 | #if defined(__cplusplus) 38 | } 39 | #endif 40 | 41 | #endif -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/shavite3.c: -------------------------------------------------------------------------------- 1 | #include "shavite3.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "sha3/sph_shavite.h" 7 | 8 | void shavite3_hash(const char* input, char* output, uint32_t len) 9 | { 10 | char hash1[64]; 11 | char hash2[64]; 12 | 13 | sph_shavite512_context ctx_shavite; 14 | 15 | sph_shavite512_init(&ctx_shavite); 16 | sph_shavite512(&ctx_shavite, (const void*) input, len); 17 | sph_shavite512_close(&ctx_shavite, (void*) &hash1); 18 | 19 | sph_shavite512(&ctx_shavite, (const void*) &hash1, 64); 20 | sph_shavite512_close(&ctx_shavite, (void*) &hash2); 21 | 22 | memcpy(output, &hash2, 32); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/shavite3.h: -------------------------------------------------------------------------------- 1 | #ifndef SHAVITE_H 2 | #define SHAVITE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void shavite3_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/skein.c: -------------------------------------------------------------------------------- 1 | #include "skein.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sha3/sph_skein.h" 8 | #include "sha256.h" 9 | 10 | #include 11 | 12 | void skein_hash(const char* input, char* output, uint32_t len) 13 | { 14 | char temp[64]; 15 | 16 | sph_skein512_context ctx_skien; 17 | sph_skein512_init(&ctx_skien); 18 | sph_skein512(&ctx_skien, input, len); 19 | sph_skein512_close(&ctx_skien, &temp); 20 | 21 | SHA256_CTX ctx_sha256; 22 | SHA256_Init(&ctx_sha256); 23 | SHA256_Update(&ctx_sha256, &temp, 64); 24 | SHA256_Final((unsigned char*) output, &ctx_sha256); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/skein.h: -------------------------------------------------------------------------------- 1 | #ifndef SKEIN_H 2 | #define SKEIN_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void skein_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // $safeprojectname$.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 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | // Windows Header Files: 12 | #include 13 | 14 | 15 | 16 | // TODO: reference additional headers your program requires here 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/core.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_core_H 3 | #define sodium_core_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT 12 | int sodium_init(void) 13 | __attribute__ ((warn_unused_result)); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_auth.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_H 2 | #define crypto_auth_H 3 | 4 | #include 5 | 6 | #include "crypto_auth_hmacsha512256.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_auth_bytes(void); 19 | 20 | #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_auth_keybytes(void); 23 | 24 | #define crypto_auth_PRIMITIVE "hmacsha512256" 25 | SODIUM_EXPORT 26 | const char *crypto_auth_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_auth(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k); 31 | 32 | SODIUM_EXPORT 33 | int crypto_auth_verify(const unsigned char *h, const unsigned char *in, 34 | unsigned long long inlen, const unsigned char *k) 35 | __attribute__ ((warn_unused_result)); 36 | 37 | SODIUM_EXPORT 38 | void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES]); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_core_hchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hchacha20_H 2 | #define crypto_core_hchacha20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hchacha20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hchacha20_outputbytes(void); 14 | 15 | #define crypto_core_hchacha20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hchacha20_inputbytes(void); 18 | 19 | #define crypto_core_hchacha20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hchacha20_keybytes(void); 22 | 23 | #define crypto_core_hchacha20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hchacha20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hchacha20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_core_hsalsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hsalsa20_H 2 | #define crypto_core_hsalsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hsalsa20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hsalsa20_outputbytes(void); 14 | 15 | #define crypto_core_hsalsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hsalsa20_inputbytes(void); 18 | 19 | #define crypto_core_hsalsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hsalsa20_keybytes(void); 22 | 23 | #define crypto_core_hsalsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hsalsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hsalsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_core_salsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa20_H 2 | #define crypto_core_salsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa20_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa20_outputbytes(void); 14 | 15 | #define crypto_core_salsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa20_inputbytes(void); 18 | 19 | #define crypto_core_salsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa20_keybytes(void); 22 | 23 | #define crypto_core_salsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_core_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa2012_H 2 | #define crypto_core_salsa2012_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa2012_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa2012_outputbytes(void); 14 | 15 | #define crypto_core_salsa2012_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa2012_inputbytes(void); 18 | 19 | #define crypto_core_salsa2012_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa2012_keybytes(void); 22 | 23 | #define crypto_core_salsa2012_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa2012_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa2012(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_core_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa208_H 2 | #define crypto_core_salsa208_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa208_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa208_outputbytes(void); 14 | 15 | #define crypto_core_salsa208_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa208_inputbytes(void); 18 | 19 | #define crypto_core_salsa208_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa208_keybytes(void); 22 | 23 | #define crypto_core_salsa208_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa208_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa208(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_hash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_H 2 | #define crypto_hash_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA512 for interoperatibility, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA512, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | 13 | #include "crypto_hash_sha512.h" 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_hash_BYTES crypto_hash_sha512_BYTES 24 | SODIUM_EXPORT 25 | size_t crypto_hash_bytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_hash(unsigned char *out, const unsigned char *in, 29 | unsigned long long inlen); 30 | 31 | #define crypto_hash_PRIMITIVE "sha512" 32 | SODIUM_EXPORT 33 | const char *crypto_hash_primitive(void) 34 | __attribute__ ((warn_unused_result)); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_kdf.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_H 2 | #define crypto_kdf_H 3 | 4 | #include 5 | #include 6 | 7 | #include "crypto_kdf_blake2b.h" 8 | #include "export.h" 9 | 10 | #ifdef __cplusplus 11 | # ifdef __GNUC__ 12 | # pragma GCC diagnostic ignored "-Wlong-long" 13 | # endif 14 | extern "C" { 15 | #endif 16 | 17 | #define crypto_kdf_BYTES_MIN crypto_kdf_blake2b_BYTES_MIN 18 | SODIUM_EXPORT 19 | size_t crypto_kdf_bytes_min(void); 20 | 21 | #define crypto_kdf_BYTES_MAX crypto_kdf_blake2b_BYTES_MAX 22 | SODIUM_EXPORT 23 | size_t crypto_kdf_bytes_max(void); 24 | 25 | #define crypto_kdf_CONTEXTBYTES crypto_kdf_blake2b_CONTEXTBYTES 26 | SODIUM_EXPORT 27 | size_t crypto_kdf_contextbytes(void); 28 | 29 | #define crypto_kdf_KEYBYTES crypto_kdf_blake2b_KEYBYTES 30 | SODIUM_EXPORT 31 | size_t crypto_kdf_keybytes(void); 32 | 33 | #define crypto_kdf_PRIMITIVE "blake2b" 34 | SODIUM_EXPORT 35 | const char *crypto_kdf_primitive(void) 36 | __attribute__ ((warn_unused_result)); 37 | 38 | SODIUM_EXPORT 39 | int crypto_kdf_derive_from_key(unsigned char *subkey, size_t subkey_len, 40 | uint64_t subkey_id, 41 | const char ctx[crypto_kdf_CONTEXTBYTES], 42 | const unsigned char key[crypto_kdf_KEYBYTES]); 43 | 44 | SODIUM_EXPORT 45 | void crypto_kdf_keygen(unsigned char k[crypto_kdf_KEYBYTES]); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_kdf_blake2b.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_blake2b_H 2 | #define crypto_kdf_blake2b_H 3 | 4 | #include 5 | #include 6 | 7 | #include "crypto_kdf_blake2b.h" 8 | #include "export.h" 9 | 10 | #ifdef __cplusplus 11 | # ifdef __GNUC__ 12 | # pragma GCC diagnostic ignored "-Wlong-long" 13 | # endif 14 | extern "C" { 15 | #endif 16 | 17 | #define crypto_kdf_blake2b_BYTES_MIN 16 18 | SODIUM_EXPORT 19 | size_t crypto_kdf_blake2b_bytes_min(void); 20 | 21 | #define crypto_kdf_blake2b_BYTES_MAX 64 22 | SODIUM_EXPORT 23 | size_t crypto_kdf_blake2b_bytes_max(void); 24 | 25 | #define crypto_kdf_blake2b_CONTEXTBYTES 8 26 | SODIUM_EXPORT 27 | size_t crypto_kdf_blake2b_contextbytes(void); 28 | 29 | #define crypto_kdf_blake2b_KEYBYTES 32 30 | SODIUM_EXPORT 31 | size_t crypto_kdf_blake2b_keybytes(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len, 35 | uint64_t subkey_id, 36 | const char ctx[crypto_kdf_blake2b_CONTEXTBYTES], 37 | const unsigned char key[crypto_kdf_blake2b_KEYBYTES]); 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_scalarmult.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_H 2 | #define crypto_scalarmult_H 3 | 4 | #include 5 | 6 | #include "crypto_scalarmult_curve25519.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_bytes(void); 16 | 17 | #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_scalarbytes(void); 20 | 21 | #define crypto_scalarmult_PRIMITIVE "curve25519" 22 | SODIUM_EXPORT 23 | const char *crypto_scalarmult_primitive(void); 24 | 25 | SODIUM_EXPORT 26 | int crypto_scalarmult_base(unsigned char *q, const unsigned char *n); 27 | 28 | SODIUM_EXPORT 29 | int crypto_scalarmult(unsigned char *q, const unsigned char *n, 30 | const unsigned char *p) 31 | __attribute__ ((warn_unused_result)); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_scalarmult_curve25519.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_curve25519_H 2 | #define crypto_scalarmult_curve25519_H 3 | 4 | #include 5 | 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define crypto_scalarmult_curve25519_BYTES 32U 13 | SODIUM_EXPORT 14 | size_t crypto_scalarmult_curve25519_bytes(void); 15 | 16 | #define crypto_scalarmult_curve25519_SCALARBYTES 32U 17 | SODIUM_EXPORT 18 | size_t crypto_scalarmult_curve25519_scalarbytes(void); 19 | 20 | SODIUM_EXPORT 21 | int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n, 22 | const unsigned char *p) 23 | __attribute__ ((warn_unused_result)); 24 | 25 | SODIUM_EXPORT 26 | int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_shorthash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_H 2 | #define crypto_shorthash_H 3 | 4 | #include 5 | 6 | #include "crypto_shorthash_siphash24.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_bytes(void); 19 | 20 | #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_keybytes(void); 23 | 24 | #define crypto_shorthash_PRIMITIVE "siphash24" 25 | SODIUM_EXPORT 26 | const char *crypto_shorthash_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_shorthash(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k); 31 | 32 | SODIUM_EXPORT 33 | void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES]); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_shorthash_siphash24.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_siphash24_H 2 | #define crypto_shorthash_siphash24_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | # ifdef __GNUC__ 9 | # pragma GCC diagnostic ignored "-Wlong-long" 10 | # endif 11 | extern "C" { 12 | #endif 13 | 14 | /* -- 64-bit output -- */ 15 | 16 | #define crypto_shorthash_siphash24_BYTES 8U 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_siphash24_bytes(void); 19 | 20 | #define crypto_shorthash_siphash24_KEYBYTES 16U 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_siphash24_keybytes(void); 23 | 24 | SODIUM_EXPORT 25 | int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in, 26 | unsigned long long inlen, const unsigned char *k); 27 | 28 | #ifndef SODIUM_LIBRARY_MINIMAL 29 | /* -- 128-bit output -- */ 30 | 31 | #define crypto_shorthash_siphashx24_BYTES 16U 32 | SODIUM_EXPORT 33 | size_t crypto_shorthash_siphashx24_bytes(void); 34 | 35 | #define crypto_shorthash_siphashx24_KEYBYTES 16U 36 | SODIUM_EXPORT 37 | size_t crypto_shorthash_siphashx24_keybytes(void); 38 | 39 | SODIUM_EXPORT 40 | int crypto_shorthash_siphashx24(unsigned char *out, const unsigned char *in, 41 | unsigned long long inlen, const unsigned char *k); 42 | #endif 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_stream.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_H 2 | #define crypto_stream_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | 14 | #include "crypto_stream_xsalsa20.h" 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | #define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES 25 | SODIUM_EXPORT 26 | size_t crypto_stream_keybytes(void); 27 | 28 | #define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES 29 | SODIUM_EXPORT 30 | size_t crypto_stream_noncebytes(void); 31 | 32 | #define crypto_stream_PRIMITIVE "xsalsa20" 33 | SODIUM_EXPORT 34 | const char *crypto_stream_primitive(void); 35 | 36 | SODIUM_EXPORT 37 | int crypto_stream(unsigned char *c, unsigned long long clen, 38 | const unsigned char *n, const unsigned char *k); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k); 44 | 45 | SODIUM_EXPORT 46 | void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES]); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_stream_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa2012_H 2 | #define crypto_stream_salsa2012_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa2012_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa2012_keybytes(void); 25 | 26 | #define crypto_stream_salsa2012_NONCEBYTES 8U 27 | SODIUM_EXPORT 28 | size_t crypto_stream_salsa2012_noncebytes(void); 29 | 30 | SODIUM_EXPORT 31 | int crypto_stream_salsa2012(unsigned char *c, unsigned long long clen, 32 | const unsigned char *n, const unsigned char *k); 33 | 34 | SODIUM_EXPORT 35 | int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m, 36 | unsigned long long mlen, const unsigned char *n, 37 | const unsigned char *k); 38 | 39 | SODIUM_EXPORT 40 | void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES]); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_stream_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa208_H 2 | #define crypto_stream_salsa208_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa208_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa208_keybytes(void); 25 | 26 | #define crypto_stream_salsa208_NONCEBYTES 8U 27 | SODIUM_EXPORT 28 | size_t crypto_stream_salsa208_noncebytes(void); 29 | 30 | SODIUM_EXPORT 31 | int crypto_stream_salsa208(unsigned char *c, unsigned long long clen, 32 | const unsigned char *n, const unsigned char *k); 33 | 34 | SODIUM_EXPORT 35 | int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m, 36 | unsigned long long mlen, const unsigned char *n, 37 | const unsigned char *k); 38 | 39 | SODIUM_EXPORT 40 | void crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES]); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_verify_16.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_16_H 2 | #define crypto_verify_16_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_16_BYTES 16U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_16_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_16(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_32_H 2 | #define crypto_verify_32_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_32_BYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_32_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_32(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/crypto_verify_64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_64_H 2 | #define crypto_verify_64_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_64_BYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_64_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_64(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_export_H 3 | #define sodium_export_H 4 | 5 | #ifndef __GNUC__ 6 | # ifdef __attribute__ 7 | # undef __attribute__ 8 | # endif 9 | # define __attribute__(a) 10 | #endif 11 | 12 | #ifdef SODIUM_STATIC 13 | # define SODIUM_EXPORT 14 | #else 15 | # if defined(_MSC_VER) 16 | # ifdef SODIUM_DLL_EXPORT 17 | # define SODIUM_EXPORT __declspec(dllexport) 18 | # else 19 | # define SODIUM_EXPORT __declspec(dllimport) 20 | # endif 21 | # else 22 | # if defined(__SUNPRO_C) 23 | # ifndef __GNU_C__ 24 | # define SODIUM_EXPORT __attribute__ (visibility(__global)) 25 | # else 26 | # define SODIUM_EXPORT __attribute__ __global 27 | # endif 28 | # elif defined(_MSG_VER) 29 | # define SODIUM_EXPORT extern __declspec(dllexport) 30 | # else 31 | # define SODIUM_EXPORT __attribute__ ((visibility ("default"))) 32 | # endif 33 | # endif 34 | #endif 35 | 36 | #ifndef CRYPTO_ALIGN 37 | # if defined(__INTEL_COMPILER) || defined(_MSC_VER) 38 | # define CRYPTO_ALIGN(x) __declspec(align(x)) 39 | # else 40 | # define CRYPTO_ALIGN(x) __attribute__ ((aligned(x))) 41 | # endif 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/randombytes_salsa20_random.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_salsa20_random_H 3 | #define randombytes_salsa20_random_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_salsa20_implementation; 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/randombytes_sysrandom.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_sysrandom_H 3 | #define randombytes_sysrandom_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_sysrandom_implementation; 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/runtime.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_runtime_H 3 | #define sodium_runtime_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT 12 | int sodium_runtime_has_neon(void); 13 | 14 | SODIUM_EXPORT 15 | int sodium_runtime_has_sse2(void); 16 | 17 | SODIUM_EXPORT 18 | int sodium_runtime_has_sse3(void); 19 | 20 | SODIUM_EXPORT 21 | int sodium_runtime_has_ssse3(void); 22 | 23 | SODIUM_EXPORT 24 | int sodium_runtime_has_sse41(void); 25 | 26 | SODIUM_EXPORT 27 | int sodium_runtime_has_avx(void); 28 | 29 | SODIUM_EXPORT 30 | int sodium_runtime_has_avx2(void); 31 | 32 | SODIUM_EXPORT 33 | int sodium_runtime_has_pclmul(void); 34 | 35 | SODIUM_EXPORT 36 | int sodium_runtime_has_aesni(void); 37 | 38 | /* ------------------------------------------------------------------------- */ 39 | 40 | int _sodium_runtime_get_cpu_features(void); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/include/libsodium/sodium/version.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_version_H 3 | #define sodium_version_H 4 | 5 | #include "export.h" 6 | 7 | #define SODIUM_VERSION_STRING "1.0.13" 8 | 9 | #define SODIUM_LIBRARY_VERSION_MAJOR 9 10 | #define SODIUM_LIBRARY_VERSION_MINOR 5 11 | 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | SODIUM_EXPORT 18 | const char *sodium_version_string(void); 19 | 20 | SODIUM_EXPORT 21 | int sodium_library_version_major(void); 22 | 23 | SODIUM_EXPORT 24 | int sodium_library_version_minor(void); 25 | 26 | SODIUM_EXPORT 27 | int sodium_library_minimal(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/windows/lib/x86/libsodium.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/aion_pool/src/Native/libmultihash/windows/lib/x86/libsodium.lib -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x11.h: -------------------------------------------------------------------------------- 1 | #ifndef X11_H 2 | #define X11_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void x11_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x13.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | void x13_hash(const char* input, char* output, uint32_t len); 6 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x14.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | void x14_hash(const char* input, char* output, uint32_t len); 6 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x15.h: -------------------------------------------------------------------------------- 1 | #ifndef X15_H 2 | #define X15_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void x15_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x16r.h: -------------------------------------------------------------------------------- 1 | #ifndef X16R_H 2 | #define X16R_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void x16r_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x16s.h: -------------------------------------------------------------------------------- 1 | #ifndef X16S_H 2 | #define X16S_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void x16s_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /aion_pool/src/Native/libmultihash/x17.h: -------------------------------------------------------------------------------- 1 | #ifndef X17_H 2 | #define X17_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | void x17_hash(const char* input, char* output, uint32_t len); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /ui/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/ui/public/favicon.ico -------------------------------------------------------------------------------- /ui/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 16 | AION Pool 17 | 18 | 19 |
20 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ui/src/components/charts.scss: -------------------------------------------------------------------------------- 1 | @import "styles/colors.scss"; 2 | @import "styles/fonts.scss"; 3 | 4 | .chartRegion { 5 | text-align: center; 6 | margin-bottom: 0.5rem; 7 | border-bottom: 0.2rem solid $backgroundColor; 8 | } 9 | 10 | .chartWrapper .nv-chart{ 11 | height: 20rem; 12 | } 13 | 14 | .chartWrapper .nv-legend-text { 15 | fill: $darkTextColor; 16 | } 17 | 18 | .chartLabel { 19 | text-align: center; 20 | padding: .4rem; 21 | margin: 1.5rem 0; 22 | color: $darkTextColor; 23 | } 24 | 25 | @media only screen and (min-width: 350px) and (max-width: 830px) { 26 | .chartWrapper .nv-chart { 27 | pointer-events: none; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ui/src/components/simpleTable.scss: -------------------------------------------------------------------------------- 1 | 2 | .simpleTable { 3 | font-size: .9rem; 4 | 5 | button { 6 | font-size: .9rem; 7 | margin: 0 .5rem; 8 | } 9 | 10 | .paging-wrapper { 11 | color: #5c7080; 12 | margin-bottom: .5rem; 13 | display: flex; 14 | 15 | > div { 16 | margin-left: auto; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ui/src/components/statsBoxes.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./statsBoxes.css"; 3 | 4 | export default ({ boxes, isLoadingData }) => { 5 | return ( 6 |
    7 | {boxes.map((box, index) => { 8 | return ( 9 |
  • 10 |
    11 | 12 |
    13 |
    14 | {box.value !== undefined ? box.value : "-"} 15 |
    16 |
    {box.title}
    17 |
  • 18 | ); 19 | })} 20 |
21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /ui/src/components/statsBoxes.scss: -------------------------------------------------------------------------------- 1 | @import 'styles/colors.scss'; 2 | @import 'styles/fonts.scss'; 3 | 4 | .statsBoxes { 5 | padding: 0; 6 | list-style-type: none; 7 | display: flex; 8 | width: 100%; 9 | flex-wrap: wrap; 10 | justify-content: center; 11 | margin-top: -1.5rem; 12 | margin-bottom: 2.5rem; 13 | 14 | li { 15 | margin-top: 3rem; 16 | margin-right: 3rem; 17 | text-align: center; 18 | min-width: 10rem; 19 | color: $boxTextColor; 20 | 21 | &:last-child { 22 | margin-right: 0; 23 | } 24 | 25 | .box__icon { 26 | text-align: center; 27 | padding: 0.7rem 0; 28 | span { 29 | font-size: 1.3rem; 30 | } 31 | } 32 | 33 | .box__title { 34 | font-size: $boxTitle; 35 | margin: 1.2rem 0; 36 | } 37 | 38 | .box__description { 39 | font-size: 0.7rem; 40 | } 41 | } 42 | 43 | @media only screen and (max-width: 650px) { 44 | display: block; 45 | li { 46 | width: 100%; 47 | margin-right: 0; 48 | margin-top: 0.5rem; 49 | &:first-child { 50 | margin-left: 0; 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /ui/src/components/toaster.js: -------------------------------------------------------------------------------- 1 | import { Position, Toaster } from "@blueprintjs/core"; 2 | 3 | export const AppToaster = Toaster.create({ 4 | className: "pool-toaster", 5 | position: Position.TOP 6 | }); 7 | -------------------------------------------------------------------------------- /ui/src/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiUrl": "http://127.0.0.1:4000/api" 3 | } 4 | -------------------------------------------------------------------------------- /ui/src/containers/app/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Route, Redirect } from "react-router-dom"; 3 | 4 | import Home from "../home"; 5 | import Stats from "../stats"; 6 | import MinerStats from "../minerStats"; 7 | import MinerDetails from "../minerDetails"; 8 | 9 | import "./styles.css"; 10 | 11 | const App = () => ( 12 |
13 |
14 | } /> 15 | 16 | 17 | 18 | 19 |
20 |
21 | ); 22 | 23 | export default App; 24 | -------------------------------------------------------------------------------- /ui/src/containers/app/styles.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/colors.scss'; 2 | 3 | #pool-app { 4 | max-width: 1160px; 5 | margin: 0 auto; 6 | min-height: calc(100vh - 8rem); 7 | } 8 | 9 | .pool__app--color { 10 | background: white; 11 | } 12 | -------------------------------------------------------------------------------- /ui/src/containers/assets/fonts/myriadpro-semibold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/ui/src/containers/assets/fonts/myriadpro-semibold.otf -------------------------------------------------------------------------------- /ui/src/containers/assets/fonts/myriadpro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/ui/src/containers/assets/fonts/myriadpro-semibold.ttf -------------------------------------------------------------------------------- /ui/src/containers/assets/fonts/myriadpro.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/ui/src/containers/assets/fonts/myriadpro.otf -------------------------------------------------------------------------------- /ui/src/containers/assets/fonts/myriadpro.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aionnetwork/aion_pool2/e8fb5f97f75f952f4eb317c2ae5bd05f7bf07fda/ui/src/containers/assets/fonts/myriadpro.ttf -------------------------------------------------------------------------------- /ui/src/containers/assets/logo_aion.svg: -------------------------------------------------------------------------------- 1 | Aion Logo Wordmark -------------------------------------------------------------------------------- /ui/src/containers/assets/logo_aion_mobile.svg: -------------------------------------------------------------------------------- 1 | Aion Logo -------------------------------------------------------------------------------- /ui/src/containers/footer/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./styles.css"; 3 | 4 | const Footer = () => ( 5 | 9 | ); 10 | 11 | export default Footer; 12 | -------------------------------------------------------------------------------- /ui/src/containers/footer/styles.scss: -------------------------------------------------------------------------------- 1 | footer { 2 | text-align: center; 3 | margin: 1rem 0; 4 | color: white; 5 | } 6 | 7 | .heart { 8 | color: #e25555; 9 | } -------------------------------------------------------------------------------- /ui/src/containers/header/menuItem.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "react-router-dom"; 3 | import texts from "../../texts"; 4 | 5 | const MenuItems = ({ pathname, menuItem, onItemClicked }) => { 6 | return ( 7 | 8 | 9 |   10 | 11 |
{texts[menuItem.textKey]}
12 |
17 |   18 |
19 | 20 | ); 21 | }; 22 | 23 | export default MenuItems; 24 | -------------------------------------------------------------------------------- /ui/src/containers/home/actions.js: -------------------------------------------------------------------------------- 1 | import { getLastBlocks, getCoinPrice } from "data-access"; 2 | import { 3 | GET_HOME_STATS_START, 4 | GET_HOME_STATS_SUCCESS, 5 | GET_HOME_STATS_FAIL 6 | } from "./constants"; 7 | import { getPoolId } from "../pools/actions"; 8 | 9 | const COIN = "aion"; 10 | 11 | export const getHomeStats = () => { 12 | return (dispatch, getState) => { 13 | dispatch({ type: GET_HOME_STATS_START }); 14 | 15 | getPoolId(dispatch).then(poolId => { 16 | dispatch({ type: GET_HOME_STATS_START }); 17 | 18 | Promise.all([getLastBlocks(poolId), getCoinPrice(COIN)]) 19 | .then(([lastMinedBlocks, market]) => { 20 | dispatch({ 21 | type: GET_HOME_STATS_SUCCESS, 22 | payload: { 23 | lastMinedBlocks, 24 | price: market.priceUSD.toFixed(2) 25 | } 26 | }); 27 | }) 28 | .catch(() => dispatch({ type: GET_HOME_STATS_FAIL })); 29 | }); 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /ui/src/containers/home/components/featuresList.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default ({ features }) => ( 4 |
5 |

Features

6 |
    7 | {features.map((feature, index) => ( 8 |
  • 9 | {feature} 10 |
  • 11 | ))} 12 |
13 |
14 | ); 15 | -------------------------------------------------------------------------------- /ui/src/containers/home/components/featuresSection.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import Features from "./featuresList"; 4 | import LastMinedBlocks from "./lastMinedBlocksList"; 5 | 6 | export default ({ lastMinedBlocks, poolFeePercent, isLoadingStats }) => { 7 | const features = [ 8 | "AION Pool", 9 | "Pay Per Last N Shares (PPLNS)", 10 | "Accurate hashrate reporting", 11 | "Full stratum support", 12 | "Efficient mining engine, low orphan rate", 13 | `${poolFeePercent}% fee` 14 | ]; 15 | 16 | return ( 17 |
18 | 19 | 23 |
24 | ); 25 | }; 26 | -------------------------------------------------------------------------------- /ui/src/containers/home/components/homeStatsBoxes.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { getReadableHashRateString } from "utils"; 3 | import StatsBoxes from "components/statsBoxes"; 4 | 5 | export default ({ 6 | hashRate, 7 | activeMiners, 8 | price, 9 | totalPaid, 10 | lastMinedBlockNumber, 11 | isLoadingStats 12 | }) => { 13 | const boxes = [ 14 | { 15 | title: "POOL HASHRATE", 16 | icon: "pt-icon-dashboard", 17 | value: getReadableHashRateString(hashRate) 18 | }, 19 | { 20 | title: "CONNECTED MINERS", 21 | icon: "pt-icon-wrench", 22 | value: activeMiners 23 | }, 24 | { 25 | title: "LAST MINED BLOCK", 26 | icon: "pt-icon-box", 27 | value: lastMinedBlockNumber 28 | }, 29 | { 30 | title: "TOTAL PAID", 31 | icon: "pt-icon-bank-account", 32 | value: totalPaid.toFixed(2) 33 | }, 34 | { 35 | title: "AION PRICE", 36 | icon: "pt-icon-dollar", 37 | value: price 38 | } 39 | ]; 40 | 41 | return ; 42 | }; 43 | -------------------------------------------------------------------------------- /ui/src/containers/home/components/lastMinedBlocksList.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | import SimpleTable from "components/simpleTable"; 4 | import { Link } from "react-router-dom"; 5 | import { Spinner } from "@blueprintjs/core"; 6 | 7 | const columns = [ 8 | { 9 | title: "Height", 10 | property: "blockHeight", 11 | width: 75 12 | }, 13 | { 14 | title: "Miner", 15 | property: "miner", 16 | width: 580 17 | } 18 | ]; 19 | 20 | const renderCellContent = (rowIndex, columnIndex, cellData) => { 21 | if (columnIndex === 1) { 22 | return {cellData}; 23 | } 24 | 25 | return cellData; 26 | }; 27 | 28 | const LastMinedBlocks = ({ lastMinedBlocks, isLoadingStats }) => ( 29 |
30 |

Last Mined Blocks

31 | 32 | {isLoadingStats ? ( 33 |
34 | 35 |
36 | ) : ( 37 | 42 | )} 43 |
44 | ); 45 | 46 | LastMinedBlocks.propTypes = { 47 | lastMinedBlocks: PropTypes.array.isRequired 48 | }; 49 | 50 | export default LastMinedBlocks; 51 | -------------------------------------------------------------------------------- /ui/src/containers/home/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_HOME_STATS_START = "GET_HOME_STATS_START"; 2 | export const GET_HOME_STATS_SUCCESS = "GET_HOME_STATS_SUCESS"; 3 | export const GET_HOME_STATS_FAIL = "GET_HOME_STATS_FAIL"; 4 | -------------------------------------------------------------------------------- /ui/src/containers/home/reducer.js: -------------------------------------------------------------------------------- 1 | import { handleActions } from "redux-actions"; 2 | import { 3 | GET_HOME_STATS_START, 4 | GET_HOME_STATS_SUCCESS, 5 | GET_HOME_STATS_FAIL 6 | } from "./constants"; 7 | 8 | const initialState = { 9 | isLoadingStats: false, 10 | hashRate: "", 11 | activeMiners: "", 12 | price: "", 13 | lastMinedBlockNumber: "", 14 | lastMinedBlocks: [] 15 | }; 16 | 17 | export default handleActions( 18 | { 19 | [GET_HOME_STATS_START]: state => ({ ...state, isLoadingStats: true }), 20 | [GET_HOME_STATS_SUCCESS]: (state, { payload }) => ({ 21 | ...state, 22 | isLoadingStats: false, 23 | ...payload 24 | }), 25 | [GET_HOME_STATS_FAIL]: (state, { payload }) => ({ 26 | ...state, 27 | isLoadingStats: false, 28 | errorMessage: payload 29 | }) 30 | }, 31 | initialState 32 | ); 33 | -------------------------------------------------------------------------------- /ui/src/containers/minerDetails/components/minerHashRate.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { HashRateChart } from "components/charts"; 3 | import get from "lodash.get"; 4 | 5 | export default ({ hashrate }) => 6 | get(hashrate, "[0].values.length", 0) > 0 ? ( 7 | 8 | ) : ( 9 | "" 10 | ); 11 | -------------------------------------------------------------------------------- /ui/src/containers/minerDetails/components/minerStatsBoxes.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import StatsBoxes from "components/statsBoxes"; 3 | import get from "lodash.get"; 4 | 5 | export default ({ isLoadingMinerData, minerDetails }) => { 6 | const boxes = [ 7 | { 8 | title: "PENDING SHARES", 9 | icon: "pt-icon-polygon-filter", 10 | value: get(minerDetails, "pendingShares", 0) 11 | }, 12 | { 13 | title: "PENDING BALANCE", 14 | icon: "pt-icon-time", 15 | value: get(minerDetails, "pendingBalance", 0).toFixed(3) 16 | }, 17 | { 18 | title: "TOTAL PAID", 19 | icon: "pt-icon-bank-account", 20 | value: get(minerDetails, "totalPaid", 0).toFixed(3) 21 | } 22 | ]; 23 | 24 | return ; 25 | }; 26 | -------------------------------------------------------------------------------- /ui/src/containers/minerDetails/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_MINER_DETAILS_START = "GET_MINER_DETAILS_START"; 2 | export const GET_MINER_DETAILS_SUCCESS = "GET_MINER_DETAILS_SUCESS"; 3 | export const GET_MINER_DETAILS_FAIL = "GET_MINER_DETAILS_FAIL"; 4 | export const GET_MINER_PAYMENTS_PAGE_START = "GET_MINER_PAYMENTS_PAGE_START"; 5 | export const GET_MINER_PAYMENTS_PAGE_SUCCESS = "GET_MINER_PAYMENTS_PAGE_SUCESS"; 6 | export const GET_MINER_PAYMENTS_PAGE_FAIL = "GET_MINER_PAYMENTS_PAGE_FAIL"; 7 | -------------------------------------------------------------------------------- /ui/src/containers/minerDetails/styles.scss: -------------------------------------------------------------------------------- 1 | 2 | @import '../../styles/fonts.scss'; 3 | @import '../../styles/colors.scss'; 4 | 5 | .minerDetailsPage { 6 | padding: 0 1rem 4rem 1rem; 7 | margin-bottom: 0.5rem; 8 | 9 | .paymentsTable { 10 | max-width: 60.3rem; 11 | margin: auto; 12 | } 13 | 14 | .table_section_title, .chartLabel { 15 | font-weight: 600; 16 | text-align: center; 17 | padding: 1rem; 18 | margin: 2.5rem 0; 19 | color: $darkTextColor; 20 | } 21 | 22 | p { 23 | text-align: center; 24 | } 25 | 26 | .statsBoxes { 27 | margin-top: 0; 28 | } 29 | 30 | .page_subtitle { 31 | font-size: $h1Sub; 32 | text-align: center; 33 | color: $darkTextColor; 34 | h2 { 35 | word-wrap: break-word; 36 | color: #106ba3; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ui/src/containers/minerStats/components/minersTable.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import SimpleTable from "components/simpleTable"; 3 | import { getReadableHashRateString } from "utils"; 4 | import { Link } from "react-router-dom"; 5 | 6 | const columns = [ 7 | { 8 | title: "Miner Address", 9 | property: "miner", 10 | width: 510 11 | }, 12 | { 13 | title: "Hashrate", 14 | property: "hashrate", 15 | width: 265 16 | }, 17 | { 18 | title: "Shares Per Second", 19 | property: "sharesPerSecond", 20 | width: 265 21 | } 22 | ]; 23 | 24 | const renderCellContent = (rowIndex, columnIndex, cellData) => { 25 | switch (columnIndex) { 26 | case 0: 27 | return {cellData}; 28 | case 1: 29 | return getReadableHashRateString(cellData); 30 | case 2: 31 | return cellData.toFixed(2); 32 | default: 33 | return cellData; 34 | } 35 | }; 36 | 37 | export default ({ 38 | miners, 39 | minersPage, 40 | getMinersPage, 41 | isLoadingMinersPage, 42 | totalMinersPages 43 | }) => ( 44 | 54 | ); 55 | -------------------------------------------------------------------------------- /ui/src/containers/minerStats/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_MINER_STATS_START = "GET_MINER_STATS_START"; 2 | export const GET_MINER_STATS_SUCCESS = "GET_MINER_STATS_SUCESS"; 3 | export const GET_MINER_STATS_FAIL = "GET_MINER_STATS_FAIL"; 4 | 5 | export const GET_PAYMENTS_PAGE_START = "GET_PAYMENTS_PAGE_START"; 6 | export const GET_PAYMENTS_PAGE_SUCCESS = "GET_PAYMENTS_PAGE_SUCCESS"; 7 | export const GET_PAYMENTS_PAGE_FAIL = "GET_PAYMENTS_PAGE_FAIL"; 8 | 9 | export const GET_MINERS_PAGE_START = "GET_MINERS_PAGE_START"; 10 | export const GET_MINERS_PAGE_SUCCESS = "GET_MINERS_PAGE_SUCCESS"; 11 | export const GET_MINERS_PAGE_FAIL = "GET_MINERS_PAGE_FAIL"; 12 | -------------------------------------------------------------------------------- /ui/src/containers/minerStats/styles.scss: -------------------------------------------------------------------------------- 1 | .minersPage { 2 | padding-bottom: 4rem; 3 | margin-bottom: 0.5rem; 4 | padding: 0 1rem 4rem 1rem; 5 | } 6 | 7 | .minerStatsTable { 8 | max-width: 65rem; 9 | outline: none; 10 | margin: auto; 11 | } 12 | 13 | .minersPage .payments__title { 14 | padding-top: 3rem; 15 | } -------------------------------------------------------------------------------- /ui/src/containers/pools/actions.js: -------------------------------------------------------------------------------- 1 | import { getPools as getPoolsApi } from "data-access"; 2 | import { 3 | GET_POOLS_START, 4 | GET_POOLS_SUCCESS, 5 | GET_POOLS_FAIL 6 | } from "./constants"; 7 | import get from "lodash.get"; 8 | 9 | export const getPools = () => { 10 | return dispatch => { 11 | dispatch({ type: GET_POOLS_START }); 12 | 13 | return getPoolsApi() 14 | .then(payload => { 15 | const poolId = get(payload, "pools[0].id"); 16 | 17 | return poolId 18 | ? dispatch({ type: GET_POOLS_SUCCESS, payload: payload }) 19 | : dispatch({ type: GET_POOLS_FAIL }); 20 | }) 21 | .catch(() => dispatch({ type: GET_POOLS_FAIL })); 22 | }; 23 | }; 24 | 25 | let poolIdPromise; 26 | 27 | export const getPoolId = dispatch => { 28 | if (poolIdPromise) { 29 | return poolIdPromise; 30 | } 31 | 32 | poolIdPromise = dispatch(getPools()).then(({ payload }) => { 33 | const poolId = get(payload, "pools[0].id"); 34 | 35 | return poolId; 36 | }); 37 | 38 | return poolIdPromise; 39 | }; 40 | -------------------------------------------------------------------------------- /ui/src/containers/pools/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_POOLS_START = "GET_POOLS_START"; 2 | export const GET_POOLS_SUCCESS = "GET_POOLS_SUCESS"; 3 | export const GET_POOLS_FAIL = "GET_POOLS_FAIL"; 4 | -------------------------------------------------------------------------------- /ui/src/containers/pools/reducer.js: -------------------------------------------------------------------------------- 1 | import { handleActions } from "redux-actions"; 2 | import { 3 | GET_POOLS_START, 4 | GET_POOLS_SUCCESS, 5 | GET_POOLS_FAIL 6 | } from "./constants"; 7 | 8 | const initialState = { 9 | list: [], 10 | isLoadingStats: false 11 | }; 12 | 13 | export default handleActions( 14 | { 15 | [GET_POOLS_START]: state => ({ ...state, isLoadingStats: true }), 16 | [GET_POOLS_SUCCESS]: (state, { payload }) => ({ 17 | ...state, 18 | list: payload.pools, 19 | isLoadingStats: false 20 | }), 21 | [GET_POOLS_FAIL]: (state, { payload }) => ({ 22 | ...state, 23 | isLoadingStats: false, 24 | errorMessage: 25 | payload || 26 | "Could not load pool data. Make sure the connection to the server is correctly configured." 27 | }) 28 | }, 29 | initialState 30 | ); 31 | -------------------------------------------------------------------------------- /ui/src/containers/stats/actions.js: -------------------------------------------------------------------------------- 1 | import { getPoolStats as getPoolStatsApi } from "data-access"; 2 | import { 3 | GET_POOL_STATS_START, 4 | GET_POOL_STATS_SUCCESS, 5 | GET_POOL_STATS_FAIL 6 | } from "./constants"; 7 | import { getPoolId } from "../pools/actions"; 8 | 9 | export const getPoolStats = () => { 10 | return (dispatch, getState) => { 11 | dispatch({ type: GET_POOL_STATS_START }); 12 | 13 | getPoolId(dispatch).then(poolId => { 14 | getPoolStatsApi(poolId) 15 | .then(stats => 16 | dispatch({ type: GET_POOL_STATS_SUCCESS, payload: stats }) 17 | ) 18 | .catch(() => dispatch({ type: GET_POOL_STATS_FAIL })); 19 | }); 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /ui/src/containers/stats/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_POOL_STATS_START = "GET_POOL_STATS_START"; 2 | export const GET_POOL_STATS_SUCCESS = "GET_POOL_STATS_SUCESS"; 3 | export const GET_POOL_STATS_FAIL = "GET_POOL_STATS_FAIL"; 4 | -------------------------------------------------------------------------------- /ui/src/index.js: -------------------------------------------------------------------------------- 1 | import React, { Fragment } from "react"; 2 | import { render } from "react-dom"; 3 | import { Provider } from "react-redux"; 4 | import { ConnectedRouter } from "react-router-redux"; 5 | import store, { history } from "./store"; 6 | 7 | import App from "./containers/app"; 8 | import Header from "./containers/header"; 9 | import Footer from "./containers/footer"; 10 | 11 | import "sanitize.css/sanitize.css"; 12 | import "./index.css"; 13 | 14 | const target = document.querySelector("#root"); 15 | 16 | render( 17 | 18 | 19 | 20 |
21 | 22 |