From 8ae84ad7f9615e8b352fc7b46944e3b71ee49f93 Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 31 Oct 2022 18:16:13 +0100 Subject: [PATCH] Add license header to source files. --- Cargo.toml | 2 +- bin/cashierd/Cargo.toml | 2 +- bin/cashierd/example/eth.rs | 18 ++++++++++++++++++ bin/cashierd/src/error.rs | 18 ++++++++++++++++++ bin/cashierd/src/lib.rs | 18 ++++++++++++++++++ bin/cashierd/src/main.rs | 18 ++++++++++++++++++ bin/cashierd/src/service/bridge.rs | 18 ++++++++++++++++++ bin/cashierd/src/service/btc.rs | 18 ++++++++++++++++++ bin/cashierd/src/service/eth.rs | 18 ++++++++++++++++++ bin/cashierd/src/service/mod.rs | 18 ++++++++++++++++++ bin/cashierd/src/service/sol.rs | 18 ++++++++++++++++++ bin/dao/dao-cli/Cargo.toml | 2 +- bin/dao/dao-cli/src/main.rs | 18 ++++++++++++++++++ bin/dao/dao-cli/src/rpc.rs | 18 ++++++++++++++++++ bin/dao/daod/Cargo.toml | 2 +- bin/dao/daod/src/contract/dao/exec/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/exec/validate.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/exec/wallet.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/mint/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/mint/validate.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/mint/wallet.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/propose/mod.rs | 18 ++++++++++++++++++ .../daod/src/contract/dao/propose/validate.rs | 18 ++++++++++++++++++ .../daod/src/contract/dao/propose/wallet.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/state.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/vote/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/vote/validate.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/dao/vote/wallet.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/example/foo/mod.rs | 18 ++++++++++++++++++ .../daod/src/contract/example/foo/validate.rs | 18 ++++++++++++++++++ .../daod/src/contract/example/foo/wallet.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/example/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/example/state.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/money/mod.rs | 18 ++++++++++++++++++ bin/dao/daod/src/contract/money/state.rs | 18 ++++++++++++++++++ .../daod/src/contract/money/transfer/mod.rs | 18 ++++++++++++++++++ .../src/contract/money/transfer/validate.rs | 18 ++++++++++++++++++ .../daod/src/contract/money/transfer/wallet.rs | 18 ++++++++++++++++++ bin/dao/daod/src/error.rs | 18 ++++++++++++++++++ bin/dao/daod/src/main.rs | 18 ++++++++++++++++++ bin/dao/daod/src/note.rs | 18 ++++++++++++++++++ bin/dao/daod/src/rpc.rs | 18 ++++++++++++++++++ bin/dao/daod/src/util.rs | 18 ++++++++++++++++++ bin/darkfid/Cargo.toml | 2 +- bin/darkfid/src/error.rs | 18 ++++++++++++++++++ bin/darkfid/src/internal.rs | 18 ++++++++++++++++++ bin/darkfid/src/main.rs | 18 ++++++++++++++++++ bin/darkfid/src/rpc_blockchain.rs | 18 ++++++++++++++++++ bin/darkfid/src/rpc_misc.rs | 18 ++++++++++++++++++ bin/darkfid/src/rpc_tx.rs | 18 ++++++++++++++++++ bin/darkfid/src/rpc_wallet.rs | 18 ++++++++++++++++++ bin/darkotc/Cargo.toml | 2 +- bin/darkotc/src/cli_util.rs | 18 ++++++++++++++++++ bin/darkotc/src/main.rs | 18 ++++++++++++++++++ bin/darkotc/src/rpc.rs | 18 ++++++++++++++++++ bin/darkwiki/darkwiki-cli/Cargo.toml | 2 +- bin/darkwiki/darkwiki-cli/src/main.rs | 18 ++++++++++++++++++ bin/darkwiki/darkwikid/Cargo.toml | 2 +- bin/darkwiki/darkwikid/src/jsonrpc.rs | 18 ++++++++++++++++++ bin/darkwiki/darkwikid/src/lcs.rs | 18 ++++++++++++++++++ bin/darkwiki/darkwikid/src/main.rs | 18 ++++++++++++++++++ bin/darkwiki/darkwikid/src/patch.rs | 18 ++++++++++++++++++ bin/darkwiki/darkwikid/src/util.rs | 18 ++++++++++++++++++ bin/dnetview/Cargo.toml | 2 +- bin/dnetview/src/config.rs | 18 ++++++++++++++++++ bin/dnetview/src/error.rs | 18 ++++++++++++++++++ bin/dnetview/src/main.rs | 18 ++++++++++++++++++ bin/dnetview/src/model.rs | 18 ++++++++++++++++++ bin/dnetview/src/options.rs | 18 ++++++++++++++++++ bin/dnetview/src/parser.rs | 18 ++++++++++++++++++ bin/dnetview/src/rpc.rs | 18 ++++++++++++++++++ bin/dnetview/src/util.rs | 18 ++++++++++++++++++ bin/dnetview/src/view.rs | 18 ++++++++++++++++++ bin/drk/Cargo.toml | 2 +- bin/drk/src/deploy_contract.rs | 18 ++++++++++++++++++ bin/drk/src/main.rs | 18 ++++++++++++++++++ bin/faucetd/Cargo.toml | 2 +- bin/faucetd/src/error.rs | 18 ++++++++++++++++++ bin/faucetd/src/main.rs | 18 ++++++++++++++++++ bin/fud/fu/Cargo.toml | 2 +- bin/fud/fu/src/main.rs | 18 ++++++++++++++++++ bin/fud/fud/Cargo.toml | 2 +- bin/fud/fud/src/error.rs | 18 ++++++++++++++++++ bin/fud/fud/src/main.rs | 18 ++++++++++++++++++ bin/ircd/Cargo.toml | 2 +- bin/ircd/src/buffers.rs | 18 ++++++++++++++++++ bin/ircd/src/crypto.rs | 18 ++++++++++++++++++ bin/ircd/src/irc/client.rs | 18 ++++++++++++++++++ bin/ircd/src/irc/mod.rs | 18 ++++++++++++++++++ bin/ircd/src/main.rs | 18 ++++++++++++++++++ bin/ircd/src/model.rs | 18 ++++++++++++++++++ bin/ircd/src/privmsg.rs | 18 ++++++++++++++++++ bin/ircd/src/protocol_privmsg.rs | 18 ++++++++++++++++++ bin/ircd/src/protocol_privmsg2.rs | 18 ++++++++++++++++++ bin/ircd/src/rpc.rs | 18 ++++++++++++++++++ bin/ircd/src/settings.rs | 18 ++++++++++++++++++ bin/ircd/src/view.rs | 18 ++++++++++++++++++ bin/ircd2/Cargo.toml | 2 +- bin/ircd2/src/crypto.rs | 18 ++++++++++++++++++ bin/ircd2/src/events_queue.rs | 18 ++++++++++++++++++ bin/ircd2/src/irc/client.rs | 18 ++++++++++++++++++ bin/ircd2/src/irc/mod.rs | 18 ++++++++++++++++++ bin/ircd2/src/main.rs | 18 ++++++++++++++++++ bin/ircd2/src/model.rs | 18 ++++++++++++++++++ bin/ircd2/src/privmsg.rs | 18 ++++++++++++++++++ bin/ircd2/src/protocol_event.rs | 18 ++++++++++++++++++ bin/ircd2/src/rpc.rs | 18 ++++++++++++++++++ bin/ircd2/src/settings.rs | 18 ++++++++++++++++++ bin/ircd2/src/view.rs | 18 ++++++++++++++++++ bin/lilith/Cargo.toml | 2 +- bin/lilith/src/config.rs | 18 ++++++++++++++++++ bin/lilith/src/main.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/Cargo.toml | 2 +- bin/tau/tau-cli/src/drawdown.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/src/filter.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/src/main.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/src/primitives.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/src/rpc.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/src/util.rs | 18 ++++++++++++++++++ bin/tau/tau-cli/src/view.rs | 18 ++++++++++++++++++ bin/tau/taud/Cargo.toml | 2 +- bin/tau/taud/src/error.rs | 18 ++++++++++++++++++ bin/tau/taud/src/jsonrpc.rs | 18 ++++++++++++++++++ bin/tau/taud/src/main.rs | 18 ++++++++++++++++++ bin/tau/taud/src/month_tasks.rs | 18 ++++++++++++++++++ bin/tau/taud/src/settings.rs | 18 ++++++++++++++++++ bin/tau/taud/src/task_info.rs | 18 ++++++++++++++++++ bin/tau/taud/src/util.rs | 18 ++++++++++++++++++ bin/vanityaddr/Cargo.toml | 2 +- bin/vanityaddr/src/main.rs | 18 ++++++++++++++++++ bin/zkas/Cargo.toml | 2 +- bin/zkas/src/main.rs | 18 ++++++++++++++++++ contract/money/Cargo.toml | 2 +- contract/money/src/lib.rs | 18 ++++++++++++++++++ contract/money/src/transfer.rs | 18 ++++++++++++++++++ example/crypsinous.rs | 18 ++++++++++++++++++ example/dao/Cargo.toml | 2 +- example/dao/src/contract/dao/exec/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/exec/validate.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/exec/wallet.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/mint/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/mint/validate.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/mint/wallet.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/propose/mod.rs | 18 ++++++++++++++++++ .../dao/src/contract/dao/propose/validate.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/propose/wallet.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/state.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/vote/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/vote/validate.rs | 18 ++++++++++++++++++ example/dao/src/contract/dao/vote/wallet.rs | 18 ++++++++++++++++++ example/dao/src/contract/example/foo/mod.rs | 18 ++++++++++++++++++ .../dao/src/contract/example/foo/validate.rs | 18 ++++++++++++++++++ example/dao/src/contract/example/foo/wallet.rs | 18 ++++++++++++++++++ example/dao/src/contract/example/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/example/state.rs | 18 ++++++++++++++++++ example/dao/src/contract/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/money/mod.rs | 18 ++++++++++++++++++ example/dao/src/contract/money/state.rs | 18 ++++++++++++++++++ example/dao/src/contract/money/transfer/mod.rs | 18 ++++++++++++++++++ .../src/contract/money/transfer/validate.rs | 18 ++++++++++++++++++ .../dao/src/contract/money/transfer/wallet.rs | 18 ++++++++++++++++++ example/dao/src/dao.rs | 18 ++++++++++++++++++ example/dao/src/error.rs | 18 ++++++++++++++++++ example/dao/src/note.rs | 18 ++++++++++++++++++ example/dao/src/util.rs | 18 ++++++++++++++++++ example/dchat/Cargo.toml | 2 +- example/dchat/src/dchat_error.rs | 18 ++++++++++++++++++ example/dchat/src/dchatmsg.rs | 18 ++++++++++++++++++ example/dchat/src/main.rs | 18 ++++++++++++++++++ example/dchat/src/protocol_dchat.rs | 18 ++++++++++++++++++ example/dchat/src/rpc.rs | 18 ++++++++++++++++++ example/lead.rs | 18 ++++++++++++++++++ example/net.rs | 18 ++++++++++++++++++ example/p2pdebug/Cargo.toml | 2 +- example/p2pdebug/src/main.rs | 18 ++++++++++++++++++ example/p2pdebug/src/proto/debugmsg.rs | 18 ++++++++++++++++++ example/p2pdebug/src/proto/mod.rs | 18 ++++++++++++++++++ example/p2pdebug/src/rpc.rs | 18 ++++++++++++++++++ example/smart-contract/Cargo.toml | 2 +- example/smart-contract/src/lib.rs | 18 ++++++++++++++++++ example/smart-contract/tests/runtime.rs | 18 ++++++++++++++++++ example/tx.rs | 18 ++++++++++++++++++ example/zk.rs | 18 ++++++++++++++++++ .../crypsinous/zk/plonk-by-hand/Cargo.toml | 2 +- .../crypsinous/zk/plonk-by-hand/src/main.rs | 18 ++++++++++++++++++ .../research/crypsinous_playground/Cargo.toml | 2 +- .../research/crypsinous_playground/src/main.rs | 18 ++++++++++++++++++ script/research/dhtd/Cargo.toml | 2 +- script/research/dhtd/src/error.rs | 18 ++++++++++++++++++ script/research/dhtd/src/main.rs | 18 ++++++++++++++++++ .../merkletree_null_benchmark/Cargo.toml | 2 +- .../merkletree_null_benchmark/src/main.rs | 18 ++++++++++++++++++ script/research/nodes-tool/Cargo.toml | 2 +- script/research/nodes-tool/src/main.rs | 18 ++++++++++++++++++ script/research/pasta/Cargo.toml | 2 +- script/research/pasta/main.rs | 18 ++++++++++++++++++ script/research/raft-diag/Cargo.toml | 2 +- script/research/raft-diag/src/main.rs | 18 ++++++++++++++++++ .../research/state_usage_analyser/Cargo.toml | 2 +- .../research/state_usage_analyser/src/main.rs | 18 ++++++++++++++++++ script/research/x3dh/Cargo.toml | 2 +- script/research/x3dh/src/hkdf.rs | 18 ++++++++++++++++++ script/research/x3dh/src/hmac.rs | 18 ++++++++++++++++++ script/research/x3dh/src/main.rs | 18 ++++++++++++++++++ script/research/x3dh/src/xeddsa.rs | 18 ++++++++++++++++++ src/blockchain/blockstore.rs | 18 ++++++++++++++++++ src/blockchain/metadatastore.rs | 18 ++++++++++++++++++ src/blockchain/mod.rs | 18 ++++++++++++++++++ src/blockchain/nfstore.rs | 18 ++++++++++++++++++ src/blockchain/rootstore.rs | 18 ++++++++++++++++++ src/blockchain/statestore.rs | 18 ++++++++++++++++++ src/blockchain/txstore.rs | 18 ++++++++++++++++++ src/consensus/block.rs | 18 ++++++++++++++++++ src/consensus/clock.rs | 18 ++++++++++++++++++ src/consensus/coins.rs | 18 ++++++++++++++++++ src/consensus/metadata.rs | 18 ++++++++++++++++++ src/consensus/mod.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/consts.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/epoch.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/epochconsensus.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/mod.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/stakeholder.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/state.rs | 18 ++++++++++++++++++ src/consensus/ouroboros/workspace.rs | 18 ++++++++++++++++++ src/consensus/participant.rs | 18 ++++++++++++++++++ src/consensus/proto/mod.rs | 18 ++++++++++++++++++ src/consensus/proto/protocol_participant.rs | 18 ++++++++++++++++++ src/consensus/proto/protocol_proposal.rs | 18 ++++++++++++++++++ src/consensus/proto/protocol_sync.rs | 18 ++++++++++++++++++ src/consensus/proto/protocol_sync_consensus.rs | 18 ++++++++++++++++++ src/consensus/proto/protocol_tx.rs | 18 ++++++++++++++++++ src/consensus/state.rs | 18 ++++++++++++++++++ src/consensus/task/block_sync.rs | 18 ++++++++++++++++++ src/consensus/task/consensus_sync.rs | 18 ++++++++++++++++++ src/consensus/task/mod.rs | 18 ++++++++++++++++++ src/consensus/task/proposal.rs | 18 ++++++++++++++++++ src/consensus/types.rs | 18 ++++++++++++++++++ src/consensus/utils.rs | 18 ++++++++++++++++++ src/crypto/address.rs | 18 ++++++++++++++++++ src/crypto/burn_proof.rs | 18 ++++++++++++++++++ src/crypto/coin.rs | 18 ++++++++++++++++++ src/crypto/contract_id.rs | 18 ++++++++++++++++++ src/crypto/diffie_hellman.rs | 18 ++++++++++++++++++ src/crypto/keypair.rs | 18 ++++++++++++++++++ src/crypto/lead_proof.rs | 18 ++++++++++++++++++ src/crypto/leadcoin.rs | 18 ++++++++++++++++++ src/crypto/mimc_vdf.rs | 18 ++++++++++++++++++ src/crypto/mint_proof.rs | 18 ++++++++++++++++++ src/crypto/mod.rs | 18 ++++++++++++++++++ src/crypto/note.rs | 18 ++++++++++++++++++ src/crypto/proof.rs | 18 ++++++++++++++++++ src/crypto/schnorr.rs | 18 ++++++++++++++++++ src/crypto/token_id.rs | 18 ++++++++++++++++++ src/crypto/token_list.rs | 18 ++++++++++++++++++ src/crypto/types.rs | 18 ++++++++++++++++++ src/crypto/util.rs | 18 ++++++++++++++++++ src/dht/messages.rs | 18 ++++++++++++++++++ src/dht/mod.rs | 18 ++++++++++++++++++ src/dht/protocol.rs | 18 ++++++++++++++++++ src/error.rs | 18 ++++++++++++++++++ src/lib.rs | 18 ++++++++++++++++++ src/net/acceptor.rs | 18 ++++++++++++++++++ src/net/channel.rs | 18 ++++++++++++++++++ src/net/connector.rs | 18 ++++++++++++++++++ src/net/constants.rs | 18 ++++++++++++++++++ src/net/hosts.rs | 18 ++++++++++++++++++ src/net/message.rs | 18 ++++++++++++++++++ src/net/message_subscriber.rs | 18 ++++++++++++++++++ src/net/mod.rs | 18 ++++++++++++++++++ src/net/p2p.rs | 18 ++++++++++++++++++ src/net/protocol/mod.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_address.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_base.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_jobs_manager.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_ping.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_registry.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_seed.rs | 18 ++++++++++++++++++ src/net/protocol/protocol_version.rs | 18 ++++++++++++++++++ src/net/session/inbound_session.rs | 18 ++++++++++++++++++ src/net/session/manual_session.rs | 18 ++++++++++++++++++ src/net/session/mod.rs | 18 ++++++++++++++++++ src/net/session/outbound_session.rs | 18 ++++++++++++++++++ src/net/session/seedsync_session.rs | 18 ++++++++++++++++++ src/net/settings.rs | 18 ++++++++++++++++++ src/net/transport.rs | 18 ++++++++++++++++++ src/net/transport/tcp.rs | 18 ++++++++++++++++++ src/net/transport/tor.rs | 18 ++++++++++++++++++ src/net/transport/unix.rs | 18 ++++++++++++++++++ src/net/transport/upgrade_tls.rs | 18 ++++++++++++++++++ src/node/client.rs | 18 ++++++++++++++++++ src/node/memorystate.rs | 18 ++++++++++++++++++ src/node/mod.rs | 18 ++++++++++++++++++ src/node/state.rs | 18 ++++++++++++++++++ src/raft/consensus.rs | 18 ++++++++++++++++++ src/raft/consensus_candidate.rs | 18 ++++++++++++++++++ src/raft/consensus_follower.rs | 18 ++++++++++++++++++ src/raft/consensus_leader.rs | 18 ++++++++++++++++++ src/raft/datastore.rs | 18 ++++++++++++++++++ src/raft/mod.rs | 18 ++++++++++++++++++ src/raft/primitives.rs | 18 ++++++++++++++++++ src/raft/protocol_raft.rs | 18 ++++++++++++++++++ src/raft/settings.rs | 18 ++++++++++++++++++ src/rpc/client.rs | 18 ++++++++++++++++++ src/rpc/clock_sync.rs | 18 ++++++++++++++++++ src/rpc/jsonrpc.rs | 18 ++++++++++++++++++ src/rpc/mod.rs | 18 ++++++++++++++++++ src/rpc/server.rs | 18 ++++++++++++++++++ src/rpc/websockets.rs | 18 ++++++++++++++++++ src/runtime/chain_state.rs | 18 ++++++++++++++++++ src/runtime/memory.rs | 18 ++++++++++++++++++ src/runtime/mod.rs | 18 ++++++++++++++++++ src/runtime/util.rs | 18 ++++++++++++++++++ src/runtime/vm_runtime.rs | 18 ++++++++++++++++++ src/sdk/Cargo.toml | 2 +- src/sdk/src/crypto/constants.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/constants/fixed_bases.rs | 18 ++++++++++++++++++ .../constants/fixed_bases/commit_ivk_r.rs | 18 ++++++++++++++++++ .../constants/fixed_bases/note_commit_r.rs | 18 ++++++++++++++++++ .../constants/fixed_bases/nullifier_k.rs | 18 ++++++++++++++++++ .../constants/fixed_bases/spend_auth_g.rs | 18 ++++++++++++++++++ .../constants/fixed_bases/value_commit_r.rs | 18 ++++++++++++++++++ .../constants/fixed_bases/value_commit_v.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/constants/load.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/constants/sinsemilla.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/constants/util.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/merkle_node.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/mod.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/nullifier.rs | 18 ++++++++++++++++++ src/sdk/src/crypto/pedersen.rs | 18 ++++++++++++++++++ src/sdk/src/entrypoint.rs | 18 ++++++++++++++++++ src/sdk/src/error.rs | 18 ++++++++++++++++++ src/sdk/src/lib.rs | 18 ++++++++++++++++++ src/sdk/src/log.rs | 18 ++++++++++++++++++ src/sdk/src/state.rs | 18 ++++++++++++++++++ src/serial/Cargo.toml | 2 +- src/serial/derive-internal/Cargo.toml | 2 +- src/serial/derive-internal/src/helpers.rs | 18 ++++++++++++++++++ src/serial/derive-internal/src/lib.rs | 18 ++++++++++++++++++ src/serial/derive/Cargo.toml | 2 +- src/serial/derive/src/lib.rs | 18 ++++++++++++++++++ src/serial/src/async_serial.rs | 18 ++++++++++++++++++ src/serial/src/endian.rs | 18 ++++++++++++++++++ src/serial/src/lib.rs | 18 ++++++++++++++++++ src/serial/src/types.rs | 18 ++++++++++++++++++ src/serial/src/types/collections.rs | 18 ++++++++++++++++++ src/serial/src/types/hash.rs | 18 ++++++++++++++++++ src/serial/src/types/incrementalmerkletree.rs | 18 ++++++++++++++++++ src/serial/src/types/pasta.rs | 18 ++++++++++++++++++ src/serial/src/types/url.rs | 18 ++++++++++++++++++ src/serial/src/types/x25519.rs | 18 ++++++++++++++++++ src/system/mod.rs | 18 ++++++++++++++++++ src/system/stoppable_task.rs | 18 ++++++++++++++++++ src/system/subscriber.rs | 18 ++++++++++++++++++ src/system/types.rs | 18 ++++++++++++++++++ src/tx/builder.rs | 18 ++++++++++++++++++ src/tx/contract.rs | 18 ++++++++++++++++++ src/tx/mod.rs | 18 ++++++++++++++++++ src/tx/partial.rs | 18 ++++++++++++++++++ src/util/async_util.rs | 18 ++++++++++++++++++ src/util/cli.rs | 18 ++++++++++++++++++ src/util/encoding/base32.rs | 18 ++++++++++++++++++ src/util/encoding/mod.rs | 18 ++++++++++++++++++ src/util/file.rs | 18 ++++++++++++++++++ src/util/mod.rs | 18 ++++++++++++++++++ src/util/net_name.rs | 18 ++++++++++++++++++ src/util/parse.rs | 18 ++++++++++++++++++ src/util/path.rs | 18 ++++++++++++++++++ src/util/time.rs | 18 ++++++++++++++++++ src/wallet/cashierdb.rs | 18 ++++++++++++++++++ src/wallet/mod.rs | 18 ++++++++++++++++++ src/wallet/walletdb.rs | 18 ++++++++++++++++++ src/zk/circuit/burn_contract.rs | 18 ++++++++++++++++++ src/zk/circuit/lead_contract.rs | 18 ++++++++++++++++++ src/zk/circuit/mint_contract.rs | 18 ++++++++++++++++++ src/zk/circuit/mod.rs | 18 ++++++++++++++++++ src/zk/circuit/tx_contract.rs | 18 ++++++++++++++++++ src/zk/gadget/arithmetic.rs | 18 ++++++++++++++++++ src/zk/gadget/is_zero.rs | 18 ++++++++++++++++++ src/zk/gadget/less_than.rs | 18 ++++++++++++++++++ src/zk/gadget/mod.rs | 18 ++++++++++++++++++ src/zk/gadget/native_range_check.rs | 18 ++++++++++++++++++ src/zk/gadget/small_range_check.rs | 18 ++++++++++++++++++ src/zk/mod.rs | 18 ++++++++++++++++++ src/zk/vm.rs | 18 ++++++++++++++++++ src/zk/vm_stack.rs | 18 ++++++++++++++++++ src/zkas/analyzer.rs | 18 ++++++++++++++++++ src/zkas/ast.rs | 18 ++++++++++++++++++ src/zkas/compiler.rs | 18 ++++++++++++++++++ src/zkas/decoder.rs | 18 ++++++++++++++++++ src/zkas/error.rs | 18 ++++++++++++++++++ src/zkas/lexer.rs | 18 ++++++++++++++++++ src/zkas/mod.rs | 18 ++++++++++++++++++ src/zkas/opcode.rs | 18 ++++++++++++++++++ src/zkas/parser.rs | 18 ++++++++++++++++++ src/zkas/types.rs | 18 ++++++++++++++++++ tests/arithmetic_proof.rs | 18 ++++++++++++++++++ tests/burn_proof.rs | 18 ++++++++++++++++++ tests/mint_proof.rs | 18 ++++++++++++++++++ tests/network_transports.rs | 18 ++++++++++++++++++ tests/zkvm_opcodes.rs | 18 ++++++++++++++++++ 403 files changed, 6608 insertions(+), 38 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a2046e99d..60a1da260 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "darkfi" version = "0.3.0" homepage = "https://dark.fi" description = "Anonymous. Uncensored. Sovereign." -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/cashierd/Cargo.toml b/bin/cashierd/Cargo.toml index 41f0fb8fe..30cec71de 100644 --- a/bin/cashierd/Cargo.toml +++ b/bin/cashierd/Cargo.toml @@ -3,7 +3,7 @@ name = "cashierd" version = "0.3.0" homepage = "https://dark.fi" description = "cashier daemon for DarkFi" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/cashierd/example/eth.rs b/bin/cashierd/example/eth.rs index aaa45c12a..2385b04cc 100644 --- a/bin/cashierd/example/eth.rs +++ b/bin/cashierd/example/eth.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use num_bigint::BigUint; use simplelog::{ColorChoice, LevelFilter, TermLogger, TerminalMode}; diff --git a/bin/cashierd/src/error.rs b/bin/cashierd/src/error.rs index e8411a155..c54969e07 100644 --- a/bin/cashierd/src/error.rs +++ b/bin/cashierd/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub type Result = std::result::Result; #[derive(Debug, Clone, thiserror::Error)] diff --git a/bin/cashierd/src/lib.rs b/bin/cashierd/src/lib.rs index 03141d739..d38e232f7 100644 --- a/bin/cashierd/src/lib.rs +++ b/bin/cashierd/src/lib.rs @@ -1,2 +1,20 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod error; pub mod service; diff --git a/bin/cashierd/src/main.rs b/bin/cashierd/src/main.rs index dec0a4a2c..536435101 100644 --- a/bin/cashierd/src/main.rs +++ b/bin/cashierd/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{net::SocketAddr, path::PathBuf, str::FromStr}; use async_executor::Executor; diff --git a/bin/cashierd/src/service/bridge.rs b/bin/cashierd/src/service/bridge.rs index 66fa03b55..eab95ef8e 100644 --- a/bin/cashierd/src/service/bridge.rs +++ b/bin/cashierd/src/service/bridge.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use async_executor::Executor; diff --git a/bin/cashierd/src/service/btc.rs b/bin/cashierd/src/service/btc.rs index 040916158..db6e41cd7 100644 --- a/bin/cashierd/src/service/btc.rs +++ b/bin/cashierd/src/service/btc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // TODO: This module needs cleanup related to PublicKey/SecretKey types. use std::{ diff --git a/bin/cashierd/src/service/eth.rs b/bin/cashierd/src/service/eth.rs index 1918f39af..7a438b070 100644 --- a/bin/cashierd/src/service/eth.rs +++ b/bin/cashierd/src/service/eth.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::convert::TryInto; use async_executor::Executor; diff --git a/bin/cashierd/src/service/mod.rs b/bin/cashierd/src/service/mod.rs index 9c3a7234c..eaeb4e1b1 100644 --- a/bin/cashierd/src/service/mod.rs +++ b/bin/cashierd/src/service/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod bridge; #[cfg(feature = "btc")] diff --git a/bin/cashierd/src/service/sol.rs b/bin/cashierd/src/service/sol.rs index a16f96dc8..2b0b8b36e 100644 --- a/bin/cashierd/src/service/sol.rs +++ b/bin/cashierd/src/service/sol.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::FromStr; use async_executor::Executor; diff --git a/bin/dao/dao-cli/Cargo.toml b/bin/dao/dao-cli/Cargo.toml index b73c3c9e7..47cd27134 100644 --- a/bin/dao/dao-cli/Cargo.toml +++ b/bin/dao/dao-cli/Cargo.toml @@ -3,7 +3,7 @@ name = "dao" version = "0.3.0" homepage = "https://dark.fi" description = "CLI utility for interacting with daod" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/dao/dao-cli/src/main.rs b/bin/dao/dao-cli/src/main.rs index 3b666be44..19611be39 100644 --- a/bin/dao/dao-cli/src/main.rs +++ b/bin/dao/dao-cli/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::process::exit; use clap::{IntoApp, Parser, Subcommand}; diff --git a/bin/dao/dao-cli/src/rpc.rs b/bin/dao/dao-cli/src/rpc.rs index a84f234ac..c1c488189 100644 --- a/bin/dao/dao-cli/src/rpc.rs +++ b/bin/dao/dao-cli/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::{json, Value}; use darkfi::{rpc::jsonrpc::JsonRequest, Result}; diff --git a/bin/dao/daod/Cargo.toml b/bin/dao/daod/Cargo.toml index fadb66360..d348e262e 100644 --- a/bin/dao/daod/Cargo.toml +++ b/bin/dao/daod/Cargo.toml @@ -3,7 +3,7 @@ name = "daod" version = "0.3.0" homepage = "https://dark.fi" description = "DarkFi DAO daemon" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/dao/daod/src/contract/dao/exec/mod.rs b/bin/dao/daod/src/contract/dao/exec/mod.rs index bd241396a..554d86b3f 100644 --- a/bin/dao/daod/src/contract/dao/exec/mod.rs +++ b/bin/dao/daod/src/contract/dao/exec/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/dao/exec/validate.rs b/bin/dao/daod/src/contract/dao/exec/validate.rs index 9c8a52c6f..beb0dd783 100644 --- a/bin/dao/daod/src/contract/dao/exec/validate.rs +++ b/bin/dao/daod/src/contract/dao/exec/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use pasta_curves::{ diff --git a/bin/dao/daod/src/contract/dao/exec/wallet.rs b/bin/dao/daod/src/contract/dao/exec/wallet.rs index eedba67c7..47d824191 100644 --- a/bin/dao/daod/src/contract/dao/exec/wallet.rs +++ b/bin/dao/daod/src/contract/dao/exec/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::circuit::Value; use log::debug; use pasta_curves::{arithmetic::CurveAffine, group::Curve, pallas}; diff --git a/bin/dao/daod/src/contract/dao/mint/mod.rs b/bin/dao/daod/src/contract/dao/mint/mod.rs index 871ab40be..98566f54e 100644 --- a/bin/dao/daod/src/contract/dao/mint/mod.rs +++ b/bin/dao/daod/src/contract/dao/mint/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/dao/mint/validate.rs b/bin/dao/daod/src/contract/dao/mint/validate.rs index ddd13dcda..b86231b27 100644 --- a/bin/dao/daod/src/contract/dao/mint/validate.rs +++ b/bin/dao/daod/src/contract/dao/mint/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi::crypto::{keypair::PublicKey, types::DrkCircuitField}; diff --git a/bin/dao/daod/src/contract/dao/mint/wallet.rs b/bin/dao/daod/src/contract/dao/mint/wallet.rs index 9882fd06f..c434eb010 100644 --- a/bin/dao/daod/src/contract/dao/mint/wallet.rs +++ b/bin/dao/daod/src/contract/dao/mint/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::circuit::Value; use pasta_curves::{arithmetic::CurveAffine, group::Curve, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/dao/mod.rs b/bin/dao/daod/src/contract/dao/mod.rs index a795d74be..d97b39c5f 100644 --- a/bin/dao/daod/src/contract/dao/mod.rs +++ b/bin/dao/daod/src/contract/dao/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/dao/propose/mod.rs b/bin/dao/daod/src/contract/dao/propose/mod.rs index bd241396a..554d86b3f 100644 --- a/bin/dao/daod/src/contract/dao/propose/mod.rs +++ b/bin/dao/daod/src/contract/dao/propose/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/dao/propose/validate.rs b/bin/dao/daod/src/contract/dao/propose/validate.rs index 227c2f5e5..b9f3ef5b1 100644 --- a/bin/dao/daod/src/contract/dao/propose/validate.rs +++ b/bin/dao/daod/src/contract/dao/propose/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi_sdk::crypto::MerkleNode; diff --git a/bin/dao/daod/src/contract/dao/propose/wallet.rs b/bin/dao/daod/src/contract/dao/propose/wallet.rs index a2d210bc8..367e02e0a 100644 --- a/bin/dao/daod/src/contract/dao/propose/wallet.rs +++ b/bin/dao/daod/src/contract/dao/propose/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use darkfi_serial::{SerialDecodable, SerialEncodable}; use halo2_proofs::circuit::Value; diff --git a/bin/dao/daod/src/contract/dao/state.rs b/bin/dao/daod/src/contract/dao/state.rs index b4b77dd9a..76b012857 100644 --- a/bin/dao/daod/src/contract/dao/state.rs +++ b/bin/dao/daod/src/contract/dao/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{any::Any, collections::HashMap}; use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; diff --git a/bin/dao/daod/src/contract/dao/vote/mod.rs b/bin/dao/daod/src/contract/dao/vote/mod.rs index bd241396a..554d86b3f 100644 --- a/bin/dao/daod/src/contract/dao/vote/mod.rs +++ b/bin/dao/daod/src/contract/dao/vote/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/dao/vote/validate.rs b/bin/dao/daod/src/contract/dao/vote/validate.rs index 3b5df07ca..b0e7922f5 100644 --- a/bin/dao/daod/src/contract/dao/vote/validate.rs +++ b/bin/dao/daod/src/contract/dao/vote/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi_sdk::crypto::{MerkleNode, Nullifier}; diff --git a/bin/dao/daod/src/contract/dao/vote/wallet.rs b/bin/dao/daod/src/contract/dao/vote/wallet.rs index 1f784ecc2..075a82f7b 100644 --- a/bin/dao/daod/src/contract/dao/vote/wallet.rs +++ b/bin/dao/daod/src/contract/dao/vote/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{MerkleNode, Nullifier}; use darkfi_serial::{SerialDecodable, SerialEncodable}; use halo2_proofs::circuit::Value; diff --git a/bin/dao/daod/src/contract/example/foo/mod.rs b/bin/dao/daod/src/contract/example/foo/mod.rs index bd241396a..554d86b3f 100644 --- a/bin/dao/daod/src/contract/example/foo/mod.rs +++ b/bin/dao/daod/src/contract/example/foo/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/example/foo/validate.rs b/bin/dao/daod/src/contract/example/foo/validate.rs index e463d048c..6c1b36f34 100644 --- a/bin/dao/daod/src/contract/example/foo/validate.rs +++ b/bin/dao/daod/src/contract/example/foo/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::Any; use pasta_curves::pallas; diff --git a/bin/dao/daod/src/contract/example/foo/wallet.rs b/bin/dao/daod/src/contract/example/foo/wallet.rs index fec043d73..b2b8b966d 100644 --- a/bin/dao/daod/src/contract/example/foo/wallet.rs +++ b/bin/dao/daod/src/contract/example/foo/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // use log::debug; // use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/example/mod.rs b/bin/dao/daod/src/contract/example/mod.rs index ff17f70fd..7ebf05b9c 100644 --- a/bin/dao/daod/src/contract/example/mod.rs +++ b/bin/dao/daod/src/contract/example/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/example/state.rs b/bin/dao/daod/src/contract/example/state.rs index 3b6328e93..132e97524 100644 --- a/bin/dao/daod/src/contract/example/state.rs +++ b/bin/dao/daod/src/contract/example/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // use std::any::Any; use pasta_curves::pallas; diff --git a/bin/dao/daod/src/contract/mod.rs b/bin/dao/daod/src/contract/mod.rs index bb4d195c3..4c10737c4 100644 --- a/bin/dao/daod/src/contract/mod.rs +++ b/bin/dao/daod/src/contract/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod dao; pub mod example; pub mod money; diff --git a/bin/dao/daod/src/contract/money/mod.rs b/bin/dao/daod/src/contract/money/mod.rs index 52c888f99..2046f1ebd 100644 --- a/bin/dao/daod/src/contract/money/mod.rs +++ b/bin/dao/daod/src/contract/money/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/money/state.rs b/bin/dao/daod/src/contract/money/state.rs index 8a65b0797..c40a9a3f7 100644 --- a/bin/dao/daod/src/contract/money/state.rs +++ b/bin/dao/daod/src/contract/money/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; diff --git a/bin/dao/daod/src/contract/money/transfer/mod.rs b/bin/dao/daod/src/contract/money/transfer/mod.rs index 8134f0b30..fbd8d1f52 100644 --- a/bin/dao/daod/src/contract/money/transfer/mod.rs +++ b/bin/dao/daod/src/contract/money/transfer/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/contract/money/transfer/validate.rs b/bin/dao/daod/src/contract/money/transfer/validate.rs index a4d8011e8..635cfdea5 100644 --- a/bin/dao/daod/src/contract/money/transfer/validate.rs +++ b/bin/dao/daod/src/contract/money/transfer/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi_sdk::crypto::{MerkleNode, Nullifier}; diff --git a/bin/dao/daod/src/contract/money/transfer/wallet.rs b/bin/dao/daod/src/contract/money/transfer/wallet.rs index 5cabb8baf..a4025e93e 100644 --- a/bin/dao/daod/src/contract/money/transfer/wallet.rs +++ b/bin/dao/daod/src/contract/money/transfer/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use darkfi_serial::{SerialDecodable, SerialEncodable}; use pasta_curves::group::ff::Field; diff --git a/bin/dao/daod/src/error.rs b/bin/dao/daod/src/error.rs index d33356221..676feb840 100644 --- a/bin/dao/daod/src/error.rs +++ b/bin/dao/daod/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::Value; use darkfi::rpc::jsonrpc::{ErrorCode::ServerError, JsonError, JsonResult}; diff --git a/bin/dao/daod/src/main.rs b/bin/dao/daod/src/main.rs index c4eb790ec..3f8b87e34 100644 --- a/bin/dao/daod/src/main.rs +++ b/bin/dao/daod/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{sync::Arc, time::Instant}; use fxhash::FxHashMap; diff --git a/bin/dao/daod/src/note.rs b/bin/dao/daod/src/note.rs index 3e97b55fc..3a1dfcffa 100644 --- a/bin/dao/daod/src/note.rs +++ b/bin/dao/daod/src/note.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crypto_api_chachapoly::ChachaPolyIetf; use rand::rngs::OsRng; diff --git a/bin/dao/daod/src/rpc.rs b/bin/dao/daod/src/rpc.rs index 96233acc8..0b70e2d16 100644 --- a/bin/dao/daod/src/rpc.rs +++ b/bin/dao/daod/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Mutex; use std::{str::FromStr, sync::Arc}; diff --git a/bin/dao/daod/src/util.rs b/bin/dao/daod/src/util.rs index 1a8eeee94..9e6b94ce1 100644 --- a/bin/dao/daod/src/util.rs +++ b/bin/dao/daod/src/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{any::Any, collections::HashMap, hash::Hasher}; use lazy_static::lazy_static; diff --git a/bin/darkfid/Cargo.toml b/bin/darkfid/Cargo.toml index 8646bb24f..d3fb1268a 100644 --- a/bin/darkfid/Cargo.toml +++ b/bin/darkfid/Cargo.toml @@ -3,7 +3,7 @@ name = "darkfid" version = "0.3.0" homepage = "https://dark.fi" description = "DarkFi node daemon" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/darkfid/src/error.rs b/bin/darkfid/src/error.rs index a210e95d6..f17f08c77 100644 --- a/bin/darkfid/src/error.rs +++ b/bin/darkfid/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::Value; use darkfi::rpc::jsonrpc::{ErrorCode::ServerError, JsonError, JsonResult}; diff --git a/bin/darkfid/src/internal.rs b/bin/darkfid/src/internal.rs index a699413f8..02a2b4457 100644 --- a/bin/darkfid/src/internal.rs +++ b/bin/darkfid/src/internal.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi::{ consensus::ValidatorState, node::{state::StateUpdate, MemoryState}, diff --git a/bin/darkfid/src/main.rs b/bin/darkfid/src/main.rs index c88c32526..db81fb3f2 100644 --- a/bin/darkfid/src/main.rs +++ b/bin/darkfid/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::FromStr; use async_std::sync::{Arc, Mutex}; diff --git a/bin/darkfid/src/rpc_blockchain.rs b/bin/darkfid/src/rpc_blockchain.rs index 36607e949..97459b06e 100644 --- a/bin/darkfid/src/rpc_blockchain.rs +++ b/bin/darkfid/src/rpc_blockchain.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use log::{debug, error}; use serde_json::{json, Value}; diff --git a/bin/darkfid/src/rpc_misc.rs b/bin/darkfid/src/rpc_misc.rs index efcb4ed52..b38a99926 100644 --- a/bin/darkfid/src/rpc_misc.rs +++ b/bin/darkfid/src/rpc_misc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::{json, Value}; use darkfi::{ diff --git a/bin/darkfid/src/rpc_tx.rs b/bin/darkfid/src/rpc_tx.rs index ddb9cd0fd..30a19b8ed 100644 --- a/bin/darkfid/src/rpc_tx.rs +++ b/bin/darkfid/src/rpc_tx.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::FromStr; use darkfi_serial::{deserialize, serialize}; diff --git a/bin/darkfid/src/rpc_wallet.rs b/bin/darkfid/src/rpc_wallet.rs index 858888989..c82485a19 100644 --- a/bin/darkfid/src/rpc_wallet.rs +++ b/bin/darkfid/src/rpc_wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{deserialize, serialize}; use fxhash::FxHashMap; use incrementalmerkletree::Tree; diff --git a/bin/darkotc/Cargo.toml b/bin/darkotc/Cargo.toml index e0c4ef94f..25627df90 100644 --- a/bin/darkotc/Cargo.toml +++ b/bin/darkotc/Cargo.toml @@ -3,7 +3,7 @@ name = "darkotc" version = "0.3.0" homepage = "https://dark.fi" description = "Atomic swap commandline tool" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/darkotc/src/cli_util.rs b/bin/darkotc/src/cli_util.rs index 7cabdb2d6..92ede3efe 100644 --- a/bin/darkotc/src/cli_util.rs +++ b/bin/darkotc/src/cli_util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::process::exit; use halo2_proofs::pasta::group::ff::PrimeField; diff --git a/bin/darkotc/src/main.rs b/bin/darkotc/src/main.rs index df70f8fc4..9fd3817ac 100644 --- a/bin/darkotc/src/main.rs +++ b/bin/darkotc/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ io::{stdin, Read}, process::exit, diff --git a/bin/darkotc/src/rpc.rs b/bin/darkotc/src/rpc.rs index 0dabbb315..2bfdec9f1 100644 --- a/bin/darkotc/src/rpc.rs +++ b/bin/darkotc/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{process::exit, str::FromStr}; use darkfi_sdk::crypto::MerkleNode; diff --git a/bin/darkwiki/darkwiki-cli/Cargo.toml b/bin/darkwiki/darkwiki-cli/Cargo.toml index e1fdc58fe..f6aa0029d 100644 --- a/bin/darkwiki/darkwiki-cli/Cargo.toml +++ b/bin/darkwiki/darkwiki-cli/Cargo.toml @@ -3,7 +3,7 @@ name = "darkwiki" description = "CLI utility for interacting with darkwikid" version = "0.4.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/darkwiki/darkwiki-cli/src/main.rs b/bin/darkwiki/darkwiki-cli/src/main.rs index f7a7537cf..2fd29e365 100644 --- a/bin/darkwiki/darkwiki-cli/src/main.rs +++ b/bin/darkwiki/darkwiki-cli/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::json; use simplelog::{ColorChoice, TermLogger, TerminalMode}; use structopt::StructOpt; diff --git a/bin/darkwiki/darkwikid/Cargo.toml b/bin/darkwiki/darkwikid/Cargo.toml index c79f02971..e88381e2f 100644 --- a/bin/darkwiki/darkwikid/Cargo.toml +++ b/bin/darkwiki/darkwikid/Cargo.toml @@ -3,7 +3,7 @@ name = "darkwikid" version = "0.4.0" homepage = "https://dark.fi" description = "Reference daemon for a decentralized P2P wiki" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/darkwiki/darkwikid/src/jsonrpc.rs b/bin/darkwiki/darkwikid/src/jsonrpc.rs index 4b68e466c..d27b2a601 100644 --- a/bin/darkwiki/darkwikid/src/jsonrpc.rs +++ b/bin/darkwiki/darkwikid/src/jsonrpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_trait::async_trait; use log::error; use serde_json::{json, Value}; diff --git a/bin/darkwiki/darkwikid/src/lcs.rs b/bin/darkwiki/darkwikid/src/lcs.rs index 0f7209df8..efa9dfa60 100644 --- a/bin/darkwiki/darkwikid/src/lcs.rs +++ b/bin/darkwiki/darkwikid/src/lcs.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crate::{patch::OpMethod, util::str_to_chars}; pub struct Lcs<'a> { diff --git a/bin/darkwiki/darkwikid/src/main.rs b/bin/darkwiki/darkwikid/src/main.rs index c767eb046..319b95203 100644 --- a/bin/darkwiki/darkwikid/src/main.rs +++ b/bin/darkwiki/darkwikid/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ fs::{create_dir_all, read_dir, remove_file}, io::stdin, diff --git a/bin/darkwiki/darkwikid/src/patch.rs b/bin/darkwiki/darkwikid/src/patch.rs index 846fd23a5..ea9ed7097 100644 --- a/bin/darkwiki/darkwikid/src/patch.rs +++ b/bin/darkwiki/darkwikid/src/patch.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{cmp::Ordering, io}; use darkfi_serial::{Decodable, Encodable, SerialDecodable, SerialEncodable, VarInt}; diff --git a/bin/darkwiki/darkwikid/src/util.rs b/bin/darkwiki/darkwikid/src/util.rs index 656d6b124..dfdf5f35d 100644 --- a/bin/darkwiki/darkwikid/src/util.rs +++ b/bin/darkwiki/darkwikid/src/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ fs::{create_dir_all, read_dir}, path::{Path, PathBuf}, diff --git a/bin/dnetview/Cargo.toml b/bin/dnetview/Cargo.toml index cdd5753b8..9d5180fd3 100644 --- a/bin/dnetview/Cargo.toml +++ b/bin/dnetview/Cargo.toml @@ -3,7 +3,7 @@ name = "dnetview" description = "P2P network monitoring TUI utility" version = "0.3.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/dnetview/src/config.rs b/bin/dnetview/src/config.rs index 6d36bd0c5..2e60082c8 100644 --- a/bin/dnetview/src/config.rs +++ b/bin/dnetview/src/config.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde::{Deserialize, Serialize}; pub const CONFIG_FILE: &str = "dnetview_config.toml"; diff --git a/bin/dnetview/src/error.rs b/bin/dnetview/src/error.rs index 5bb015856..c5b02dc7c 100644 --- a/bin/dnetview/src/error.rs +++ b/bin/dnetview/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //use serde_json::Value; //use darkfi::rpc::jsonrpc::{error as jsonerr, response as jsonresp, ErrorCode, JsonResult}; diff --git a/bin/dnetview/src/main.rs b/bin/dnetview/src/main.rs index fcc002528..b1468e86f 100644 --- a/bin/dnetview/src/main.rs +++ b/bin/dnetview/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{fs::File, io, io::Read}; use async_std::sync::Arc; diff --git a/bin/dnetview/src/model.rs b/bin/dnetview/src/model.rs index 31ff4fa81..5e4639a4c 100644 --- a/bin/dnetview/src/model.rs +++ b/bin/dnetview/src/model.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use fxhash::FxHashMap; use serde::{Deserialize, Serialize}; diff --git a/bin/dnetview/src/options.rs b/bin/dnetview/src/options.rs index 4e7e1cc3d..1de2241a9 100644 --- a/bin/dnetview/src/options.rs +++ b/bin/dnetview/src/options.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi::cli_desc; #[derive(clap::Parser)] diff --git a/bin/dnetview/src/parser.rs b/bin/dnetview/src/parser.rs index 40780a5af..55ea21047 100644 --- a/bin/dnetview/src/parser.rs +++ b/bin/dnetview/src/parser.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::collections::hash_map::Entry; use async_std::sync::Arc; diff --git a/bin/dnetview/src/rpc.rs b/bin/dnetview/src/rpc.rs index 01c07fc22..0c1a516ee 100644 --- a/bin/dnetview/src/rpc.rs +++ b/bin/dnetview/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::{json, Value}; use url::Url; diff --git a/bin/dnetview/src/util.rs b/bin/dnetview/src/util.rs index c8b598869..b8c8227ff 100644 --- a/bin/dnetview/src/util.rs +++ b/bin/dnetview/src/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi::Result; use crate::model::{ConnectInfo, Session}; diff --git a/bin/dnetview/src/view.rs b/bin/dnetview/src/view.rs index 02313702b..b7322982e 100644 --- a/bin/dnetview/src/view.rs +++ b/bin/dnetview/src/view.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use fxhash::FxHashMap; use tui::{ backend::Backend, diff --git a/bin/drk/Cargo.toml b/bin/drk/Cargo.toml index f8c8b58bf..aaa8e7905 100644 --- a/bin/drk/Cargo.toml +++ b/bin/drk/Cargo.toml @@ -3,7 +3,7 @@ name = "drk" version = "0.3.0" homepage = "https://dark.fi" description = "Command-line client for darkfid" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/drk/src/deploy_contract.rs b/bin/drk/src/deploy_contract.rs index 27111ca36..b8cac13fb 100644 --- a/bin/drk/src/deploy_contract.rs +++ b/bin/drk/src/deploy_contract.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ env::set_current_dir, fs::{read, read_dir, read_to_string, File}, diff --git a/bin/drk/src/main.rs b/bin/drk/src/main.rs index 351131c7a..26655d96a 100644 --- a/bin/drk/src/main.rs +++ b/bin/drk/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ io::{stdin, Read}, path::PathBuf, diff --git a/bin/faucetd/Cargo.toml b/bin/faucetd/Cargo.toml index faabc4b32..e75317c8c 100644 --- a/bin/faucetd/Cargo.toml +++ b/bin/faucetd/Cargo.toml @@ -3,7 +3,7 @@ name = "faucetd" version = "0.3.0" homepage = "https://dark.fi" description = "DarkFi faucet daemon" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/faucetd/src/error.rs b/bin/faucetd/src/error.rs index 3d37a1c18..4b2ae5f38 100644 --- a/bin/faucetd/src/error.rs +++ b/bin/faucetd/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::Value; use darkfi::rpc::jsonrpc::{ErrorCode::ServerError, JsonError, JsonResult}; diff --git a/bin/faucetd/src/main.rs b/bin/faucetd/src/main.rs index d6d0f7ffc..9af9faaa5 100644 --- a/bin/faucetd/src/main.rs +++ b/bin/faucetd/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{collections::HashMap, str::FromStr}; use async_std::sync::{Arc, Mutex}; diff --git a/bin/fud/fu/Cargo.toml b/bin/fud/fu/Cargo.toml index e2b86da6b..7940e8601 100644 --- a/bin/fud/fu/Cargo.toml +++ b/bin/fud/fu/Cargo.toml @@ -3,7 +3,7 @@ name = "fu" description = "Command-line client for fud" version = "0.3.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/fud/fu/src/main.rs b/bin/fud/fu/src/main.rs index c96844ffd..b11224212 100644 --- a/bin/fud/fu/src/main.rs +++ b/bin/fud/fu/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use clap::{Parser, Subcommand}; use log::info; use serde_json::json; diff --git a/bin/fud/fud/Cargo.toml b/bin/fud/fud/Cargo.toml index 252cee434..4cbfd4523 100644 --- a/bin/fud/fud/Cargo.toml +++ b/bin/fud/fud/Cargo.toml @@ -3,7 +3,7 @@ name = "fud" description = "File-sharing Utility Daemon, using DHT for records discovery." version = "0.3.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/fud/fud/src/error.rs b/bin/fud/fud/src/error.rs index 31a8254bc..ce02b875d 100644 --- a/bin/fud/fud/src/error.rs +++ b/bin/fud/fud/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::Value; use darkfi::rpc::jsonrpc::{ErrorCode::ServerError, JsonError, JsonResult}; diff --git a/bin/fud/fud/src/main.rs b/bin/fud/fud/src/main.rs index cbc01afb4..d43b3d84a 100644 --- a/bin/fud/fud/src/main.rs +++ b/bin/fud/fud/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{collections::HashSet, fs, path::PathBuf}; use async_std::sync::Arc; diff --git a/bin/ircd/Cargo.toml b/bin/ircd/Cargo.toml index d81a8810a..05f256756 100644 --- a/bin/ircd/Cargo.toml +++ b/bin/ircd/Cargo.toml @@ -3,7 +3,7 @@ name = "ircd" description = "P2P IRC daemon" version = "0.4.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/ircd/src/buffers.rs b/bin/ircd/src/buffers.rs index d24be0c33..6c6e48ff4 100644 --- a/bin/ircd/src/buffers.rs +++ b/bin/ircd/src/buffers.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use std::{ cmp::Ordering, diff --git a/bin/ircd/src/crypto.rs b/bin/ircd/src/crypto.rs index 7ba634efa..9e5384250 100644 --- a/bin/ircd/src/crypto.rs +++ b/bin/ircd/src/crypto.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crypto_box::{ aead::{Aead, AeadCore}, SalsaBox, diff --git a/bin/ircd/src/irc/client.rs b/bin/ircd/src/irc/client.rs index d28baf87b..337a2e117 100644 --- a/bin/ircd/src/irc/client.rs +++ b/bin/ircd/src/irc/client.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use std::net::SocketAddr; diff --git a/bin/ircd/src/irc/mod.rs b/bin/ircd/src/irc/mod.rs index 924f35b96..6f1a04b10 100644 --- a/bin/ircd/src/irc/mod.rs +++ b/bin/ircd/src/irc/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{fs::File, net::SocketAddr}; use async_std::{ diff --git a/bin/ircd/src/main.rs b/bin/ircd/src/main.rs index 927dc50b0..223f26fe2 100644 --- a/bin/ircd/src/main.rs +++ b/bin/ircd/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::fmt; use async_std::sync::{Arc, Mutex}; diff --git a/bin/ircd/src/model.rs b/bin/ircd/src/model.rs index 987253c41..1ea4e262c 100644 --- a/bin/ircd/src/model.rs +++ b/bin/ircd/src/model.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{cmp::Ordering, fmt, io}; use async_std::sync::Arc; diff --git a/bin/ircd/src/privmsg.rs b/bin/ircd/src/privmsg.rs index 70017ff8e..23e2a8e8c 100644 --- a/bin/ircd/src/privmsg.rs +++ b/bin/ircd/src/privmsg.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use chrono::Utc; use darkfi_serial::{SerialDecodable, SerialEncodable}; use rand::{rngs::OsRng, RngCore}; diff --git a/bin/ircd/src/protocol_privmsg.rs b/bin/ircd/src/protocol_privmsg.rs index 152b85414..76ea71c51 100644 --- a/bin/ircd/src/protocol_privmsg.rs +++ b/bin/ircd/src/protocol_privmsg.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use async_trait::async_trait; use darkfi_serial::{SerialDecodable, SerialEncodable}; diff --git a/bin/ircd/src/protocol_privmsg2.rs b/bin/ircd/src/protocol_privmsg2.rs index 4784fa103..6b9b4b84c 100644 --- a/bin/ircd/src/protocol_privmsg2.rs +++ b/bin/ircd/src/protocol_privmsg2.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::collections::VecDeque; use async_std::sync::{Arc, Mutex}; diff --git a/bin/ircd/src/rpc.rs b/bin/ircd/src/rpc.rs index 76cb184ec..4eac442da 100644 --- a/bin/ircd/src/rpc.rs +++ b/bin/ircd/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_trait::async_trait; use log::debug; use serde_json::{json, Value}; diff --git a/bin/ircd/src/settings.rs b/bin/ircd/src/settings.rs index 6b5876f70..b613791bd 100644 --- a/bin/ircd/src/settings.rs +++ b/bin/ircd/src/settings.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crypto_box::SalsaBox; use fxhash::FxHashMap; use log::{info, warn}; diff --git a/bin/ircd/src/view.rs b/bin/ircd/src/view.rs index 91ef43224..457262399 100644 --- a/bin/ircd/src/view.rs +++ b/bin/ircd/src/view.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use fxhash::FxHashMap; use darkfi::Result; diff --git a/bin/ircd2/Cargo.toml b/bin/ircd2/Cargo.toml index 5f81765d8..e5624de2f 100644 --- a/bin/ircd2/Cargo.toml +++ b/bin/ircd2/Cargo.toml @@ -3,7 +3,7 @@ name = "ircd2" description = "P2P IRC daemon" version = "0.4.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/ircd2/src/crypto.rs b/bin/ircd2/src/crypto.rs index 15c9a3d4c..fe4fdb09b 100644 --- a/bin/ircd2/src/crypto.rs +++ b/bin/ircd2/src/crypto.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{collections::HashMap, fmt}; use crypto_box::{ diff --git a/bin/ircd2/src/events_queue.rs b/bin/ircd2/src/events_queue.rs index afe53fbc3..9ddb538d9 100644 --- a/bin/ircd2/src/events_queue.rs +++ b/bin/ircd2/src/events_queue.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use darkfi::{Error, Result}; diff --git a/bin/ircd2/src/irc/client.rs b/bin/ircd2/src/irc/client.rs index 3656d2e29..472a13c1e 100644 --- a/bin/ircd2/src/irc/client.rs +++ b/bin/ircd2/src/irc/client.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::net::SocketAddr; use futures::{ diff --git a/bin/ircd2/src/irc/mod.rs b/bin/ircd2/src/irc/mod.rs index 93a90b647..184b31885 100644 --- a/bin/ircd2/src/irc/mod.rs +++ b/bin/ircd2/src/irc/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{collections::HashMap, fs::File, net::SocketAddr}; use async_std::{net::TcpListener, sync::Arc}; diff --git a/bin/ircd2/src/main.rs b/bin/ircd2/src/main.rs index 3aedfbebd..546bb3391 100644 --- a/bin/ircd2/src/main.rs +++ b/bin/ircd2/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use log::{info, warn}; use rand::rngs::OsRng; diff --git a/bin/ircd2/src/model.rs b/bin/ircd2/src/model.rs index 8a1428b0e..e62bea17b 100644 --- a/bin/ircd2/src/model.rs +++ b/bin/ircd2/src/model.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{cmp::Ordering, fmt}; use async_std::sync::{Arc, Mutex}; diff --git a/bin/ircd2/src/privmsg.rs b/bin/ircd2/src/privmsg.rs index 30e77e09f..606649601 100644 --- a/bin/ircd2/src/privmsg.rs +++ b/bin/ircd2/src/privmsg.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io; use darkfi_serial::{Decodable, Encodable, ReadExt, SerialDecodable, SerialEncodable}; diff --git a/bin/ircd2/src/protocol_event.rs b/bin/ircd2/src/protocol_event.rs index a3f24c153..6cc7a2909 100644 --- a/bin/ircd2/src/protocol_event.rs +++ b/bin/ircd2/src/protocol_event.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::collections::VecDeque; use async_std::sync::{Arc, Mutex}; diff --git a/bin/ircd2/src/rpc.rs b/bin/ircd2/src/rpc.rs index 76cb184ec..4eac442da 100644 --- a/bin/ircd2/src/rpc.rs +++ b/bin/ircd2/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_trait::async_trait; use log::debug; use serde_json::{json, Value}; diff --git a/bin/ircd2/src/settings.rs b/bin/ircd2/src/settings.rs index 410bd8037..cb91e495f 100644 --- a/bin/ircd2/src/settings.rs +++ b/bin/ircd2/src/settings.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crypto_box::SalsaBox; use log::error; use serde::{self, Deserialize, Serialize}; diff --git a/bin/ircd2/src/view.rs b/bin/ircd2/src/view.rs index 204256d30..58a4c95fd 100644 --- a/bin/ircd2/src/view.rs +++ b/bin/ircd2/src/view.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use fxhash::FxHashMap; use darkfi::Result; diff --git a/bin/lilith/Cargo.toml b/bin/lilith/Cargo.toml index daf4b3d5c..5882c69e8 100644 --- a/bin/lilith/Cargo.toml +++ b/bin/lilith/Cargo.toml @@ -3,7 +3,7 @@ name = "lilith" description = "Daemon that spawns P2P seeds" version = "0.3.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/lilith/src/config.rs b/bin/lilith/src/config.rs index 3b3706393..4e4c55aad 100644 --- a/bin/lilith/src/config.rs +++ b/bin/lilith/src/config.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use fxhash::FxHashMap; use log::{info, warn}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; diff --git a/bin/lilith/src/main.rs b/bin/lilith/src/main.rs index 10977392b..4132402da 100644 --- a/bin/lilith/src/main.rs +++ b/bin/lilith/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::path::Path; use async_std::sync::Arc; diff --git a/bin/tau/tau-cli/Cargo.toml b/bin/tau/tau-cli/Cargo.toml index d72dbbfb4..a65bc9a18 100644 --- a/bin/tau/tau-cli/Cargo.toml +++ b/bin/tau/tau-cli/Cargo.toml @@ -3,7 +3,7 @@ name = "tau" description = "Command-line client for taud" version = "0.4.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/tau/tau-cli/src/drawdown.rs b/bin/tau/tau-cli/src/drawdown.rs index 8cc78806d..7a1144e22 100644 --- a/bin/tau/tau-cli/src/drawdown.rs +++ b/bin/tau/tau-cli/src/drawdown.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use chrono::{Datelike, Duration, NaiveDate, NaiveDateTime, Utc}; use colored::Colorize; use fxhash::FxHashMap; diff --git a/bin/tau/tau-cli/src/filter.rs b/bin/tau/tau-cli/src/filter.rs index afda36aa6..a60885c5f 100644 --- a/bin/tau/tau-cli/src/filter.rs +++ b/bin/tau/tau-cli/src/filter.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ io::{stdin, stdout, Write}, process::exit, diff --git a/bin/tau/tau-cli/src/main.rs b/bin/tau/tau-cli/src/main.rs index bfc0157e3..0b3068cb5 100644 --- a/bin/tau/tau-cli/src/main.rs +++ b/bin/tau/tau-cli/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::process::exit; use clap::{Parser, Subcommand}; diff --git a/bin/tau/tau-cli/src/primitives.rs b/bin/tau/tau-cli/src/primitives.rs index 8d81fece7..16a1cbe8e 100644 --- a/bin/tau/tau-cli/src/primitives.rs +++ b/bin/tau/tau-cli/src/primitives.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{fmt, str::FromStr}; use darkfi::{util::time::Timestamp, Error, Result}; diff --git a/bin/tau/tau-cli/src/rpc.rs b/bin/tau/tau-cli/src/rpc.rs index 9689dc794..896b29de2 100644 --- a/bin/tau/tau-cli/src/rpc.rs +++ b/bin/tau/tau-cli/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use log::debug; use serde_json::json; diff --git a/bin/tau/tau-cli/src/util.rs b/bin/tau/tau-cli/src/util.rs index a2e3ef928..ec586da95 100644 --- a/bin/tau/tau-cli/src/util.rs +++ b/bin/tau/tau-cli/src/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ env, fs::{self, File}, diff --git a/bin/tau/tau-cli/src/view.rs b/bin/tau/tau-cli/src/view.rs index 2055b8fbb..67fe3682b 100644 --- a/bin/tau/tau-cli/src/view.rs +++ b/bin/tau/tau-cli/src/view.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{cmp::Ordering, fmt::Write, str::FromStr}; use prettytable::{ diff --git a/bin/tau/taud/Cargo.toml b/bin/tau/taud/Cargo.toml index b3386c676..db059e5ed 100644 --- a/bin/tau/taud/Cargo.toml +++ b/bin/tau/taud/Cargo.toml @@ -3,7 +3,7 @@ name = "taud" description = "Encrypted tasks management app using peer-to-peer network and raft consensus." version = "0.4.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" homepage = "https://dark.fi" repository = "https://github.com/darkrenaissance/darkfi" diff --git a/bin/tau/taud/src/error.rs b/bin/tau/taud/src/error.rs index 18b953b26..d013c606e 100644 --- a/bin/tau/taud/src/error.rs +++ b/bin/tau/taud/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::Value; use darkfi::rpc::jsonrpc::{ErrorCode, JsonError, JsonResponse, JsonResult}; diff --git a/bin/tau/taud/src/jsonrpc.rs b/bin/tau/taud/src/jsonrpc.rs index ab99f95c7..84289cb80 100644 --- a/bin/tau/taud/src/jsonrpc.rs +++ b/bin/tau/taud/src/jsonrpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{fs::create_dir_all, path::PathBuf}; use async_std::sync::Mutex; diff --git a/bin/tau/taud/src/main.rs b/bin/tau/taud/src/main.rs index 07f844f1d..a3e54f9bf 100644 --- a/bin/tau/taud/src/main.rs +++ b/bin/tau/taud/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ env, fs::{create_dir_all, remove_dir_all}, diff --git a/bin/tau/taud/src/month_tasks.rs b/bin/tau/taud/src/month_tasks.rs index 4d6c2ab0a..fb032d414 100644 --- a/bin/tau/taud/src/month_tasks.rs +++ b/bin/tau/taud/src/month_tasks.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ fs, io, path::{Path, PathBuf}, diff --git a/bin/tau/taud/src/settings.rs b/bin/tau/taud/src/settings.rs index 572612eed..b76225145 100644 --- a/bin/tau/taud/src/settings.rs +++ b/bin/tau/taud/src/settings.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde::Deserialize; use structopt::StructOpt; use structopt_toml::StructOptToml; diff --git a/bin/tau/taud/src/task_info.rs b/bin/tau/taud/src/task_info.rs index e285d8532..7d8966eaf 100644 --- a/bin/tau/taud/src/task_info.rs +++ b/bin/tau/taud/src/task_info.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::path::{Path, PathBuf}; use darkfi_serial::{SerialDecodable, SerialEncodable}; diff --git a/bin/tau/taud/src/util.rs b/bin/tau/taud/src/util.rs index c5db1c717..97e548a88 100644 --- a/bin/tau/taud/src/util.rs +++ b/bin/tau/taud/src/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub fn find_free_id(task_ids: &[u32]) -> u32 { for i in 1.. { if !task_ids.contains(&i) { diff --git a/bin/vanityaddr/Cargo.toml b/bin/vanityaddr/Cargo.toml index 60cc52520..bceb80226 100644 --- a/bin/vanityaddr/Cargo.toml +++ b/bin/vanityaddr/Cargo.toml @@ -3,7 +3,7 @@ name = "vanityaddr" version = "0.3.0" homepage = "https://dark.fi" description = "Vanity address generation tool for DarkFi keypairs." -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/vanityaddr/src/main.rs b/bin/vanityaddr/src/main.rs index 44c662433..b8b2ebbf3 100644 --- a/bin/vanityaddr/src/main.rs +++ b/bin/vanityaddr/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{process::exit, sync::mpsc::channel}; use clap::Parser; diff --git a/bin/zkas/Cargo.toml b/bin/zkas/Cargo.toml index 961fa8c44..b2bc7ecac 100644 --- a/bin/zkas/Cargo.toml +++ b/bin/zkas/Cargo.toml @@ -3,7 +3,7 @@ name = "zkas" version = "0.3.0" homepage = "https://dark.fi" description = "Compiler for the Halo2 zkVM language used in DarkFi." -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/bin/zkas/src/main.rs b/bin/zkas/src/main.rs index 2682922c5..99643e31c 100644 --- a/bin/zkas/src/main.rs +++ b/bin/zkas/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ fs::{read_to_string, File}, io::Write, diff --git a/contract/money/Cargo.toml b/contract/money/Cargo.toml index 2687c503f..b80b56db3 100644 --- a/contract/money/Cargo.toml +++ b/contract/money/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "darkfi-money-contract" version = "0.4.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/contract/money/src/lib.rs b/contract/money/src/lib.rs index 310c3f3ac..50ab38474 100644 --- a/contract/money/src/lib.rs +++ b/contract/money/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::{ crypto::{MerkleNode, Nullifier}, entrypoint, diff --git a/contract/money/src/transfer.rs b/contract/money/src/transfer.rs index 3882bdabc..e8e765eb2 100644 --- a/contract/money/src/transfer.rs +++ b/contract/money/src/transfer.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::{ crypto::{ pedersen::{pedersen_commitment_base, pedersen_commitment_u64, ValueCommit}, diff --git a/example/crypsinous.rs b/example/crypsinous.rs index 9af95850e..1ef41fa31 100644 --- a/example/crypsinous.rs +++ b/example/crypsinous.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use clap::Parser; diff --git a/example/dao/Cargo.toml b/example/dao/Cargo.toml index 11c7a66a7..1ff2cf9d9 100644 --- a/example/dao/Cargo.toml +++ b/example/dao/Cargo.toml @@ -2,7 +2,7 @@ name = "dao" version = "0.3.0" edition = "2021" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" [dependencies] diff --git a/example/dao/src/contract/dao/exec/mod.rs b/example/dao/src/contract/dao/exec/mod.rs index bd241396a..554d86b3f 100644 --- a/example/dao/src/contract/dao/exec/mod.rs +++ b/example/dao/src/contract/dao/exec/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/dao/exec/validate.rs b/example/dao/src/contract/dao/exec/validate.rs index 9c8a52c6f..beb0dd783 100644 --- a/example/dao/src/contract/dao/exec/validate.rs +++ b/example/dao/src/contract/dao/exec/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use pasta_curves::{ diff --git a/example/dao/src/contract/dao/exec/wallet.rs b/example/dao/src/contract/dao/exec/wallet.rs index eedba67c7..47d824191 100644 --- a/example/dao/src/contract/dao/exec/wallet.rs +++ b/example/dao/src/contract/dao/exec/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::circuit::Value; use log::debug; use pasta_curves::{arithmetic::CurveAffine, group::Curve, pallas}; diff --git a/example/dao/src/contract/dao/mint/mod.rs b/example/dao/src/contract/dao/mint/mod.rs index 871ab40be..98566f54e 100644 --- a/example/dao/src/contract/dao/mint/mod.rs +++ b/example/dao/src/contract/dao/mint/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/dao/mint/validate.rs b/example/dao/src/contract/dao/mint/validate.rs index ddd13dcda..b86231b27 100644 --- a/example/dao/src/contract/dao/mint/validate.rs +++ b/example/dao/src/contract/dao/mint/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi::crypto::{keypair::PublicKey, types::DrkCircuitField}; diff --git a/example/dao/src/contract/dao/mint/wallet.rs b/example/dao/src/contract/dao/mint/wallet.rs index 9882fd06f..c434eb010 100644 --- a/example/dao/src/contract/dao/mint/wallet.rs +++ b/example/dao/src/contract/dao/mint/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::circuit::Value; use pasta_curves::{arithmetic::CurveAffine, group::Curve, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/dao/mod.rs b/example/dao/src/contract/dao/mod.rs index a795d74be..d97b39c5f 100644 --- a/example/dao/src/contract/dao/mod.rs +++ b/example/dao/src/contract/dao/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/dao/propose/mod.rs b/example/dao/src/contract/dao/propose/mod.rs index bd241396a..554d86b3f 100644 --- a/example/dao/src/contract/dao/propose/mod.rs +++ b/example/dao/src/contract/dao/propose/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/dao/propose/validate.rs b/example/dao/src/contract/dao/propose/validate.rs index 227c2f5e5..b9f3ef5b1 100644 --- a/example/dao/src/contract/dao/propose/validate.rs +++ b/example/dao/src/contract/dao/propose/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi_sdk::crypto::MerkleNode; diff --git a/example/dao/src/contract/dao/propose/wallet.rs b/example/dao/src/contract/dao/propose/wallet.rs index a2d210bc8..367e02e0a 100644 --- a/example/dao/src/contract/dao/propose/wallet.rs +++ b/example/dao/src/contract/dao/propose/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use darkfi_serial::{SerialDecodable, SerialEncodable}; use halo2_proofs::circuit::Value; diff --git a/example/dao/src/contract/dao/state.rs b/example/dao/src/contract/dao/state.rs index b4b77dd9a..76b012857 100644 --- a/example/dao/src/contract/dao/state.rs +++ b/example/dao/src/contract/dao/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{any::Any, collections::HashMap}; use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; diff --git a/example/dao/src/contract/dao/vote/mod.rs b/example/dao/src/contract/dao/vote/mod.rs index bd241396a..554d86b3f 100644 --- a/example/dao/src/contract/dao/vote/mod.rs +++ b/example/dao/src/contract/dao/vote/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/dao/vote/validate.rs b/example/dao/src/contract/dao/vote/validate.rs index 3b5df07ca..b0e7922f5 100644 --- a/example/dao/src/contract/dao/vote/validate.rs +++ b/example/dao/src/contract/dao/vote/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi_sdk::crypto::{MerkleNode, Nullifier}; diff --git a/example/dao/src/contract/dao/vote/wallet.rs b/example/dao/src/contract/dao/vote/wallet.rs index 1f784ecc2..075a82f7b 100644 --- a/example/dao/src/contract/dao/vote/wallet.rs +++ b/example/dao/src/contract/dao/vote/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{MerkleNode, Nullifier}; use darkfi_serial::{SerialDecodable, SerialEncodable}; use halo2_proofs::circuit::Value; diff --git a/example/dao/src/contract/example/foo/mod.rs b/example/dao/src/contract/example/foo/mod.rs index bd241396a..554d86b3f 100644 --- a/example/dao/src/contract/example/foo/mod.rs +++ b/example/dao/src/contract/example/foo/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/example/foo/validate.rs b/example/dao/src/contract/example/foo/validate.rs index 6d445856d..90ec50ea1 100644 --- a/example/dao/src/contract/example/foo/validate.rs +++ b/example/dao/src/contract/example/foo/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use pasta_curves::pallas; diff --git a/example/dao/src/contract/example/foo/wallet.rs b/example/dao/src/contract/example/foo/wallet.rs index 719b2e05b..ae016a740 100644 --- a/example/dao/src/contract/example/foo/wallet.rs +++ b/example/dao/src/contract/example/foo/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use log::debug; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/example/mod.rs b/example/dao/src/contract/example/mod.rs index ff17f70fd..7ebf05b9c 100644 --- a/example/dao/src/contract/example/mod.rs +++ b/example/dao/src/contract/example/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/example/state.rs b/example/dao/src/contract/example/state.rs index d7b6218ff..a14d25566 100644 --- a/example/dao/src/contract/example/state.rs +++ b/example/dao/src/contract/example/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::Any; use pasta_curves::pallas; diff --git a/example/dao/src/contract/mod.rs b/example/dao/src/contract/mod.rs index bb4d195c3..4c10737c4 100644 --- a/example/dao/src/contract/mod.rs +++ b/example/dao/src/contract/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod dao; pub mod example; pub mod money; diff --git a/example/dao/src/contract/money/mod.rs b/example/dao/src/contract/money/mod.rs index 52c888f99..2046f1ebd 100644 --- a/example/dao/src/contract/money/mod.rs +++ b/example/dao/src/contract/money/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/money/state.rs b/example/dao/src/contract/money/state.rs index 8a65b0797..c40a9a3f7 100644 --- a/example/dao/src/contract/money/state.rs +++ b/example/dao/src/contract/money/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; diff --git a/example/dao/src/contract/money/transfer/mod.rs b/example/dao/src/contract/money/transfer/mod.rs index 8134f0b30..fbd8d1f52 100644 --- a/example/dao/src/contract/money/transfer/mod.rs +++ b/example/dao/src/contract/money/transfer/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use lazy_static::lazy_static; use pasta_curves::{group::ff::Field, pallas}; use rand::rngs::OsRng; diff --git a/example/dao/src/contract/money/transfer/validate.rs b/example/dao/src/contract/money/transfer/validate.rs index a4d8011e8..635cfdea5 100644 --- a/example/dao/src/contract/money/transfer/validate.rs +++ b/example/dao/src/contract/money/transfer/validate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::any::{Any, TypeId}; use darkfi_sdk::crypto::{MerkleNode, Nullifier}; diff --git a/example/dao/src/contract/money/transfer/wallet.rs b/example/dao/src/contract/money/transfer/wallet.rs index 5cabb8baf..a4025e93e 100644 --- a/example/dao/src/contract/money/transfer/wallet.rs +++ b/example/dao/src/contract/money/transfer/wallet.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use darkfi_serial::{SerialDecodable, SerialEncodable}; use pasta_curves::group::ff::Field; diff --git a/example/dao/src/dao.rs b/example/dao/src/dao.rs index 77c7b7eff..17f452a58 100644 --- a/example/dao/src/dao.rs +++ b/example/dao/src/dao.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{any::TypeId, time::Instant}; use incrementalmerkletree::Tree; diff --git a/example/dao/src/error.rs b/example/dao/src/error.rs index cdddf0f31..eca4dd9b4 100644 --- a/example/dao/src/error.rs +++ b/example/dao/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // use serde_json::Value; // use darkfi::rpc::jsonrpc::{ErrorCode::ServerError, JsonError, JsonResult}; diff --git a/example/dao/src/note.rs b/example/dao/src/note.rs index b5f72e68f..114ce1c9e 100644 --- a/example/dao/src/note.rs +++ b/example/dao/src/note.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crypto_api_chachapoly::ChachaPolyIetf; use rand::rngs::OsRng; diff --git a/example/dao/src/util.rs b/example/dao/src/util.rs index 3258751d7..94b510f23 100644 --- a/example/dao/src/util.rs +++ b/example/dao/src/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{any::Any, collections::HashMap, hash::Hasher}; use lazy_static::lazy_static; diff --git a/example/dchat/Cargo.toml b/example/dchat/Cargo.toml index cb5930927..d64675c2d 100644 --- a/example/dchat/Cargo.toml +++ b/example/dchat/Cargo.toml @@ -3,7 +3,7 @@ name = "dchat" version = "0.1.0" homepage = "https://dark.fi" description = "Demo chat app used to document DarkFi networking code" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/example/dchat/src/dchat_error.rs b/example/dchat/src/dchat_error.rs index be3d31c89..58ab8c394 100644 --- a/example/dchat/src/dchat_error.rs +++ b/example/dchat/src/dchat_error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // ANCHOR: error use std::{error, fmt}; diff --git a/example/dchat/src/dchatmsg.rs b/example/dchat/src/dchatmsg.rs index 3a1b443b3..fe085c582 100644 --- a/example/dchat/src/dchatmsg.rs +++ b/example/dchat/src/dchatmsg.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // ANCHOR: msg use async_std::sync::{Arc, Mutex}; diff --git a/example/dchat/src/main.rs b/example/dchat/src/main.rs index 81ce88a2a..2c6cddd51 100644 --- a/example/dchat/src/main.rs +++ b/example/dchat/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{error, fs::File, io::stdin}; // ANCHOR: daemon_deps diff --git a/example/dchat/src/protocol_dchat.rs b/example/dchat/src/protocol_dchat.rs index 28900bcd3..8f1eb9f29 100644 --- a/example/dchat/src/protocol_dchat.rs +++ b/example/dchat/src/protocol_dchat.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // ANCHOR: protocol_dchat use async_std::sync::Arc; use async_trait::async_trait; diff --git a/example/dchat/src/rpc.rs b/example/dchat/src/rpc.rs index 4eefa8cfb..86d3a6ee3 100644 --- a/example/dchat/src/rpc.rs +++ b/example/dchat/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_trait::async_trait; use log::debug; use serde_json::{json, Value}; diff --git a/example/lead.rs b/example/lead.rs index d10c2d661..a82f9413a 100644 --- a/example/lead.rs +++ b/example/lead.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use futures::executor::block_on; use halo2_proofs::dev::MockProver; use pasta_curves::pallas; diff --git a/example/net.rs b/example/net.rs index 4a9b8c8fb..92195fc55 100644 --- a/example/net.rs +++ b/example/net.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use clap::Parser; diff --git a/example/p2pdebug/Cargo.toml b/example/p2pdebug/Cargo.toml index 0bef95751..f46455dc9 100644 --- a/example/p2pdebug/Cargo.toml +++ b/example/p2pdebug/Cargo.toml @@ -2,7 +2,7 @@ name = "p2pdebug" version = "0.3.0" homepage = "https://dark.fi" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/example/p2pdebug/src/main.rs b/example/p2pdebug/src/main.rs index 34ff0f3b9..71a9bc8fd 100644 --- a/example/p2pdebug/src/main.rs +++ b/example/p2pdebug/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use async_executor::Executor; diff --git a/example/p2pdebug/src/proto/debugmsg.rs b/example/p2pdebug/src/proto/debugmsg.rs index db7545e7f..e1d10c7e2 100644 --- a/example/p2pdebug/src/proto/debugmsg.rs +++ b/example/p2pdebug/src/proto/debugmsg.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use async_channel::Sender; diff --git a/example/p2pdebug/src/proto/mod.rs b/example/p2pdebug/src/proto/mod.rs index 08a6118f2..75def00c5 100644 --- a/example/p2pdebug/src/proto/mod.rs +++ b/example/p2pdebug/src/proto/mod.rs @@ -1 +1,19 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub(crate) mod debugmsg; diff --git a/example/p2pdebug/src/rpc.rs b/example/p2pdebug/src/rpc.rs index 76cb184ec..4eac442da 100644 --- a/example/p2pdebug/src/rpc.rs +++ b/example/p2pdebug/src/rpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_trait::async_trait; use log::debug; use serde_json::{json, Value}; diff --git a/example/smart-contract/Cargo.toml b/example/smart-contract/Cargo.toml index f79e06859..688c11c60 100644 --- a/example/smart-contract/Cargo.toml +++ b/example/smart-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "smart-contract" version = "0.3.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/example/smart-contract/src/lib.rs b/example/smart-contract/src/lib.rs index af821a9c7..7fe18303f 100644 --- a/example/smart-contract/src/lib.rs +++ b/example/smart-contract/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{deserialize, SerialDecodable, SerialEncodable}; use darkfi_sdk::{ crypto::Nullifier, diff --git a/example/smart-contract/tests/runtime.rs b/example/smart-contract/tests/runtime.rs index 6ca503a27..09d96156a 100644 --- a/example/smart-contract/tests/runtime.rs +++ b/example/smart-contract/tests/runtime.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::serialize; use darkfi::{ node::{MemoryState, State}, diff --git a/example/tx.rs b/example/tx.rs index 16c61c0a7..f5100f075 100644 --- a/example/tx.rs +++ b/example/tx.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // Example transaction flow use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; diff --git a/example/zk.rs b/example/zk.rs index e17b0b876..839868aec 100644 --- a/example/zk.rs +++ b/example/zk.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // ../zkas simple.zk use darkfi::{ diff --git a/script/research/crypsinous/zk/plonk-by-hand/Cargo.toml b/script/research/crypsinous/zk/plonk-by-hand/Cargo.toml index 04b1da509..16aa12e45 100644 --- a/script/research/crypsinous/zk/plonk-by-hand/Cargo.toml +++ b/script/research/crypsinous/zk/plonk-by-hand/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "plonkbyhand" version = "0.3.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/crypsinous/zk/plonk-by-hand/src/main.rs b/script/research/crypsinous/zk/plonk-by-hand/src/main.rs index 392399ec5..228434c5f 100644 --- a/script/research/crypsinous/zk/plonk-by-hand/src/main.rs +++ b/script/research/crypsinous/zk/plonk-by-hand/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::marker::PhantomData; use halo2::{ diff --git a/script/research/crypsinous_playground/Cargo.toml b/script/research/crypsinous_playground/Cargo.toml index 9fd470b9d..793bb99a0 100644 --- a/script/research/crypsinous_playground/Cargo.toml +++ b/script/research/crypsinous_playground/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "crypsinous_playground" version = "0.1.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/crypsinous_playground/src/main.rs b/script/research/crypsinous_playground/src/main.rs index ddfaf5c62..a08cc139a 100644 --- a/script/research/crypsinous_playground/src/main.rs +++ b/script/research/crypsinous_playground/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use log::{error, info}; use pasta_curves::pallas; diff --git a/script/research/dhtd/Cargo.toml b/script/research/dhtd/Cargo.toml index cdb238ab9..bb26f4287 100644 --- a/script/research/dhtd/Cargo.toml +++ b/script/research/dhtd/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dhtd" version = "0.3.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/dhtd/src/error.rs b/script/research/dhtd/src/error.rs index cf83b6be0..ea36608e1 100644 --- a/script/research/dhtd/src/error.rs +++ b/script/research/dhtd/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use serde_json::Value; use darkfi::rpc::jsonrpc::{ErrorCode::ServerError, JsonError, JsonResult}; diff --git a/script/research/dhtd/src/main.rs b/script/research/dhtd/src/main.rs index cde536180..5ea9997f7 100644 --- a/script/research/dhtd/src/main.rs +++ b/script/research/dhtd/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_executor::Executor; use async_std::sync::Arc; use async_trait::async_trait; diff --git a/script/research/merkletree_null_benchmark/Cargo.toml b/script/research/merkletree_null_benchmark/Cargo.toml index 1a24d6f22..3ed832552 100644 --- a/script/research/merkletree_null_benchmark/Cargo.toml +++ b/script/research/merkletree_null_benchmark/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "merkletree_null_benchmark" version = "0.1.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/merkletree_null_benchmark/src/main.rs b/script/research/merkletree_null_benchmark/src/main.rs index 56efb4b4c..8597b829f 100644 --- a/script/research/merkletree_null_benchmark/src/main.rs +++ b/script/research/merkletree_null_benchmark/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{collections::HashMap, fs::write, time::Instant}; use darkfi::crypto::coin::Coin; diff --git a/script/research/nodes-tool/Cargo.toml b/script/research/nodes-tool/Cargo.toml index efda9d082..09b317c75 100644 --- a/script/research/nodes-tool/Cargo.toml +++ b/script/research/nodes-tool/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nodes-tool" version = "0.3.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/nodes-tool/src/main.rs b/script/research/nodes-tool/src/main.rs index fa15e2f53..041899ee7 100644 --- a/script/research/nodes-tool/src/main.rs +++ b/script/research/nodes-tool/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use std::{fs::File, io::Write}; diff --git a/script/research/pasta/Cargo.toml b/script/research/pasta/Cargo.toml index fde41c390..e4af5284f 100644 --- a/script/research/pasta/Cargo.toml +++ b/script/research/pasta/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pasta" version = "0.3.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2018" diff --git a/script/research/pasta/main.rs b/script/research/pasta/main.rs index c1021326a..ef89e78b3 100644 --- a/script/research/pasta/main.rs +++ b/script/research/pasta/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves as pasta; use group::{Group, Curve}; use rand::rngs::OsRng; diff --git a/script/research/raft-diag/Cargo.toml b/script/research/raft-diag/Cargo.toml index d3fe6a1e6..29cb5e1a4 100644 --- a/script/research/raft-diag/Cargo.toml +++ b/script/research/raft-diag/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "raft-diag" version = "0.1.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] edition = "2021" [workspace] diff --git a/script/research/raft-diag/src/main.rs b/script/research/raft-diag/src/main.rs index 677b73ee7..09d064969 100644 --- a/script/research/raft-diag/src/main.rs +++ b/script/research/raft-diag/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use std::path::Path; diff --git a/script/research/state_usage_analyser/Cargo.toml b/script/research/state_usage_analyser/Cargo.toml index b6117304a..326232dd8 100644 --- a/script/research/state_usage_analyser/Cargo.toml +++ b/script/research/state_usage_analyser/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "state_usage_analyser" version = "0.3.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/state_usage_analyser/src/main.rs b/script/research/state_usage_analyser/src/main.rs index a63720a27..89b18df7a 100644 --- a/script/research/state_usage_analyser/src/main.rs +++ b/script/research/state_usage_analyser/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use incrementalmerkletree::bridgetree::BridgeTree; use lazy_init::Lazy; diff --git a/script/research/x3dh/Cargo.toml b/script/research/x3dh/Cargo.toml index 2214120eb..619d55284 100644 --- a/script/research/x3dh/Cargo.toml +++ b/script/research/x3dh/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "x3dh" version = "0.1.0" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] license = "AGPL-3.0-only" edition = "2021" diff --git a/script/research/x3dh/src/hkdf.rs b/script/research/x3dh/src/hkdf.rs index 3bece2f89..0040cefb9 100644 --- a/script/research/x3dh/src/hkdf.rs +++ b/script/research/x3dh/src/hkdf.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! HMAC-based Extract-and-Expand Key Derivation Function (HKDF) //! https://tools.ietf.org/html/rfc5869 use core::fmt; diff --git a/script/research/x3dh/src/hmac.rs b/script/research/x3dh/src/hmac.rs index 6655fbf6e..8ecaaa7eb 100644 --- a/script/research/x3dh/src/hmac.rs +++ b/script/research/x3dh/src/hmac.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! HMAC simplementation. //! https://en.wikipedia.org/wiki/Hmac use digest::{ diff --git a/script/research/x3dh/src/main.rs b/script/research/x3dh/src/main.rs index 7c9dcd22d..b22343f28 100644 --- a/script/research/x3dh/src/main.rs +++ b/script/research/x3dh/src/main.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! https://signal.org/docs/specifications/x3dh/x3dh.pdf //! https://signal.org/docs/specifications/doubleratchet/doubleratchet.pdf use std::collections::{HashMap, VecDeque}; diff --git a/script/research/x3dh/src/xeddsa.rs b/script/research/x3dh/src/xeddsa.rs index ff1e43150..d9668657b 100644 --- a/script/research/x3dh/src/xeddsa.rs +++ b/script/research/x3dh/src/xeddsa.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Taken from https://docs.rs/ockam_vault/latest/src/ockam_vault/xeddsa.rs.html //! XEdDSA according to use curve25519_dalek::{ diff --git a/src/blockchain/blockstore.rs b/src/blockchain/blockstore.rs index 9aaf2921b..53e33ce05 100644 --- a/src/blockchain/blockstore.rs +++ b/src/blockchain/blockstore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{deserialize, serialize}; use crate::{ diff --git a/src/blockchain/metadatastore.rs b/src/blockchain/metadatastore.rs index a2aa38d29..0492d143b 100644 --- a/src/blockchain/metadatastore.rs +++ b/src/blockchain/metadatastore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{deserialize, serialize}; use crate::{ diff --git a/src/blockchain/mod.rs b/src/blockchain/mod.rs index b69d19a80..9c9196dbc 100644 --- a/src/blockchain/mod.rs +++ b/src/blockchain/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use log::debug; use crate::{ diff --git a/src/blockchain/nfstore.rs b/src/blockchain/nfstore.rs index 0a644b1bc..1debf6b94 100644 --- a/src/blockchain/nfstore.rs +++ b/src/blockchain/nfstore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::Nullifier; use darkfi_serial::{deserialize, serialize}; diff --git a/src/blockchain/rootstore.rs b/src/blockchain/rootstore.rs index 5557ca1f0..05326b851 100644 --- a/src/blockchain/rootstore.rs +++ b/src/blockchain/rootstore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use darkfi_serial::{deserialize, serialize}; diff --git a/src/blockchain/statestore.rs b/src/blockchain/statestore.rs index 03636f761..7a1d73540 100644 --- a/src/blockchain/statestore.rs +++ b/src/blockchain/statestore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::serialize; use crate::{crypto::contract_id::ContractId, Result}; diff --git a/src/blockchain/txstore.rs b/src/blockchain/txstore.rs index 1961c2df0..e7332f312 100644 --- a/src/blockchain/txstore.rs +++ b/src/blockchain/txstore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{deserialize, serialize}; use crate::{tx::Transaction, Error, Result}; diff --git a/src/consensus/block.rs b/src/consensus/block.rs index 5a1f553ed..9aad4b949 100644 --- a/src/consensus/block.rs +++ b/src/consensus/block.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::fmt; use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode}; diff --git a/src/consensus/clock.rs b/src/consensus/clock.rs index 901130e2c..5744a9098 100644 --- a/src/consensus/clock.rs +++ b/src/consensus/clock.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crate::{util::time::Timestamp, Result}; use log::debug; use std::{thread, time::Duration}; diff --git a/src/consensus/coins.rs b/src/consensus/coins.rs index 896298626..074f0cad6 100644 --- a/src/consensus/coins.rs +++ b/src/consensus/coins.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_gadgets::poseidon::primitives as poseidon; use halo2_proofs::arithmetic::Field; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; diff --git a/src/consensus/metadata.rs b/src/consensus/metadata.rs index 297049c6d..ffbfea823 100644 --- a/src/consensus/metadata.rs +++ b/src/consensus/metadata.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{SerialDecodable, SerialEncodable}; use pasta_curves::pallas; use rand::rngs::OsRng; diff --git a/src/consensus/mod.rs b/src/consensus/mod.rs index 3476abc90..86ae8ff7d 100644 --- a/src/consensus/mod.rs +++ b/src/consensus/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Block definition pub mod block; pub use block::{Block, BlockInfo, BlockProposal, Header, ProposalChain}; diff --git a/src/consensus/ouroboros/consts.rs b/src/consensus/ouroboros/consts.rs index 67dfee5c0..fa66c28e2 100644 --- a/src/consensus/ouroboros/consts.rs +++ b/src/consensus/ouroboros/consts.rs @@ -1,2 +1,20 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub(crate) const LOG_T: &str = "stakeholder"; pub(crate) const TREE_LEN: usize = 100; diff --git a/src/consensus/ouroboros/epoch.rs b/src/consensus/ouroboros/epoch.rs index 56a1c8d33..1b88f636b 100644 --- a/src/consensus/ouroboros/epoch.rs +++ b/src/consensus/ouroboros/epoch.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crate::{ consensus::{coins, ouroboros::EpochConsensus}, crypto::{ diff --git a/src/consensus/ouroboros/epochconsensus.rs b/src/consensus/ouroboros/epochconsensus.rs index 328407196..4a6889fe0 100644 --- a/src/consensus/ouroboros/epochconsensus.rs +++ b/src/consensus/ouroboros/epochconsensus.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// epoch configuration /// this struct need be a singleton, /// TODO should be populated from configuration file. diff --git a/src/consensus/ouroboros/mod.rs b/src/consensus/ouroboros/mod.rs index 319125781..6f3e8c507 100644 --- a/src/consensus/ouroboros/mod.rs +++ b/src/consensus/ouroboros/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod consts; pub mod epochconsensus; pub use epochconsensus::EpochConsensus; diff --git a/src/consensus/ouroboros/stakeholder.rs b/src/consensus/ouroboros/stakeholder.rs index d2dd85e8e..f5deb8bb5 100644 --- a/src/consensus/ouroboros/stakeholder.rs +++ b/src/consensus/ouroboros/stakeholder.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crate::{ blockchain::Blockchain, consensus::{ diff --git a/src/consensus/ouroboros/state.rs b/src/consensus/ouroboros/state.rs index 1549f29a8..bf9b189af 100644 --- a/src/consensus/ouroboros/state.rs +++ b/src/consensus/ouroboros/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; diff --git a/src/consensus/ouroboros/workspace.rs b/src/consensus/ouroboros/workspace.rs index f8a1799c1..e6a6a69d6 100644 --- a/src/consensus/ouroboros/workspace.rs +++ b/src/consensus/ouroboros/workspace.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use pasta_curves::pallas; diff --git a/src/consensus/participant.rs b/src/consensus/participant.rs index ef16f356e..66f95bf9b 100644 --- a/src/consensus/participant.rs +++ b/src/consensus/participant.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{SerialDecodable, SerialEncodable}; use pasta_curves::pallas; diff --git a/src/consensus/proto/mod.rs b/src/consensus/proto/mod.rs index 3d30fa574..46cf9691e 100644 --- a/src/consensus/proto/mod.rs +++ b/src/consensus/proto/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Participant announce protocol mod protocol_participant; pub use protocol_participant::ProtocolParticipant; diff --git a/src/consensus/proto/protocol_participant.rs b/src/consensus/proto/protocol_participant.rs index 115f42c5f..90d8e0e6d 100644 --- a/src/consensus/proto/protocol_participant.rs +++ b/src/consensus/proto/protocol_participant.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use async_trait::async_trait; use log::{debug, error}; diff --git a/src/consensus/proto/protocol_proposal.rs b/src/consensus/proto/protocol_proposal.rs index f2c25dbe9..e4b5ef7d0 100644 --- a/src/consensus/proto/protocol_proposal.rs +++ b/src/consensus/proto/protocol_proposal.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use async_trait::async_trait; use log::{debug, error, info}; diff --git a/src/consensus/proto/protocol_sync.rs b/src/consensus/proto/protocol_sync.rs index d24a671e5..2a468a487 100644 --- a/src/consensus/proto/protocol_sync.rs +++ b/src/consensus/proto/protocol_sync.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use async_trait::async_trait; use log::{debug, error, info}; diff --git a/src/consensus/proto/protocol_sync_consensus.rs b/src/consensus/proto/protocol_sync_consensus.rs index df4f924f0..983a6123b 100644 --- a/src/consensus/proto/protocol_sync_consensus.rs +++ b/src/consensus/proto/protocol_sync_consensus.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use async_trait::async_trait; use log::{debug, error}; diff --git a/src/consensus/proto/protocol_tx.rs b/src/consensus/proto/protocol_tx.rs index e11ca40d5..9fb732504 100644 --- a/src/consensus/proto/protocol_tx.rs +++ b/src/consensus/proto/protocol_tx.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use async_trait::async_trait; use log::{debug, error}; diff --git a/src/consensus/state.rs b/src/consensus/state.rs index 02d88ced8..5c5baad61 100644 --- a/src/consensus/state.rs +++ b/src/consensus/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // TODO: Use sets instead of vectors where possible. use std::{ collections::{hash_map::DefaultHasher, BTreeMap}, diff --git a/src/consensus/task/block_sync.rs b/src/consensus/task/block_sync.rs index e8b8ba110..bbe5f1aca 100644 --- a/src/consensus/task/block_sync.rs +++ b/src/consensus/task/block_sync.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crate::{ consensus::{ block::{BlockOrder, BlockResponse}, diff --git a/src/consensus/task/consensus_sync.rs b/src/consensus/task/consensus_sync.rs index 92ddb98e2..4a189bac7 100644 --- a/src/consensus/task/consensus_sync.rs +++ b/src/consensus/task/consensus_sync.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use log::{info, warn}; use crate::{ diff --git a/src/consensus/task/mod.rs b/src/consensus/task/mod.rs index fa6285b52..cb0d84959 100644 --- a/src/consensus/task/mod.rs +++ b/src/consensus/task/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // TODO: Handle ? with matches in these files. They should be robust. mod block_sync; diff --git a/src/consensus/task/proposal.rs b/src/consensus/task/proposal.rs index 54db70477..686e43211 100644 --- a/src/consensus/task/proposal.rs +++ b/src/consensus/task/proposal.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::Duration; use log::{debug, error, info}; diff --git a/src/consensus/types.rs b/src/consensus/types.rs index 20a87f0bc..091a45cbc 100644 --- a/src/consensus/types.rs +++ b/src/consensus/types.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Type aliases used in the consensus codevbase. use dashu::float::{round::mode::Zero, FBig}; diff --git a/src/consensus/utils.rs b/src/consensus/utils.rs index 58af4f144..7e7692f2c 100644 --- a/src/consensus/utils.rs +++ b/src/consensus/utils.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use super::Float10; use dashu::integer::{IBig, Sign}; use log::{debug, info}; diff --git a/src/crypto/address.rs b/src/crypto/address.rs index 3edf5b45e..4474aab25 100644 --- a/src/crypto/address.rs +++ b/src/crypto/address.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::FromStr; use darkfi_serial::{SerialDecodable, SerialEncodable}; diff --git a/src/crypto/burn_proof.rs b/src/crypto/burn_proof.rs index 79b1f3ec4..67008a529 100644 --- a/src/crypto/burn_proof.rs +++ b/src/crypto/burn_proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::Instant; use darkfi_sdk::crypto::{MerkleNode, Nullifier}; diff --git a/src/crypto/coin.rs b/src/crypto/coin.rs index 79476c80b..f7760156d 100644 --- a/src/crypto/coin.rs +++ b/src/crypto/coin.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::Nullifier; use darkfi_serial::{SerialDecodable, SerialEncodable}; use pasta_curves::{group::ff::PrimeField, pallas}; diff --git a/src/crypto/contract_id.rs b/src/crypto/contract_id.rs index dacdde867..509f6805f 100644 --- a/src/crypto/contract_id.rs +++ b/src/crypto/contract_id.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{SerialDecodable, SerialEncodable}; use pasta_curves::pallas; diff --git a/src/crypto/diffie_hellman.rs b/src/crypto/diffie_hellman.rs index f43d94b63..1398cdf15 100644 --- a/src/crypto/diffie_hellman.rs +++ b/src/crypto/diffie_hellman.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use blake2b_simd::{Hash as Blake2bHash, Params as Blake2bParams}; use pasta_curves::group::{cofactor::CofactorGroup, GroupEncoding, Wnaf}; diff --git a/src/crypto/keypair.rs b/src/crypto/keypair.rs index 3bb7d7bb6..4ac83b203 100644 --- a/src/crypto/keypair.rs +++ b/src/crypto/keypair.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ convert::TryFrom, hash::{Hash, Hasher}, diff --git a/src/crypto/lead_proof.rs b/src/crypto/lead_proof.rs index 461eb4ff8..41f6dc1c4 100644 --- a/src/crypto/lead_proof.rs +++ b/src/crypto/lead_proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use log::error; use rand::rngs::OsRng; diff --git a/src/crypto/leadcoin.rs b/src/crypto/leadcoin.rs index 860a8907e..886b487e3 100644 --- a/src/crypto/leadcoin.rs +++ b/src/crypto/leadcoin.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{constants::MERKLE_DEPTH_ORCHARD, MerkleNode}; use halo2_gadgets::poseidon::primitives as poseidon; use halo2_proofs::circuit::Value; diff --git a/src/crypto/mimc_vdf.rs b/src/crypto/mimc_vdf.rs index 6e75ec65a..b6ba3d42e 100644 --- a/src/crypto/mimc_vdf.rs +++ b/src/crypto/mimc_vdf.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! https://vitalik.ca/general/2018/07/21/starks_part_3.html use num_bigint::BigUint; diff --git a/src/crypto/mint_proof.rs b/src/crypto/mint_proof.rs index 36a77ba73..8f37dea4b 100644 --- a/src/crypto/mint_proof.rs +++ b/src/crypto/mint_proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::Instant; use darkfi_serial::{SerialDecodable, SerialEncodable}; diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 832dd7538..e6c52c631 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod address; pub mod burn_proof; pub mod coin; diff --git a/src/crypto/note.rs b/src/crypto/note.rs index 56c852fa6..48013d75d 100644 --- a/src/crypto/note.rs +++ b/src/crypto/note.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use chacha20poly1305::{AeadInPlace, ChaCha20Poly1305, KeyInit}; use darkfi_serial::{Decodable, Encodable, SerialDecodable, SerialEncodable}; use rand::rngs::OsRng; diff --git a/src/crypto/proof.rs b/src/crypto/proof.rs index f49ea2688..2fdaa3124 100644 --- a/src/crypto/proof.rs +++ b/src/crypto/proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{SerialDecodable, SerialEncodable}; use halo2_proofs::{ plonk, diff --git a/src/crypto/schnorr.rs b/src/crypto/schnorr.rs index 2c06038a4..cf7e0c90e 100644 --- a/src/crypto/schnorr.rs +++ b/src/crypto/schnorr.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::constants::{NullifierK, DRK_SCHNORR_DOMAIN}; use darkfi_serial::{SerialDecodable, SerialEncodable}; use halo2_gadgets::ecc::chip::FixedPoint; diff --git a/src/crypto/token_id.rs b/src/crypto/token_id.rs index 342b1b647..41f27caa8 100644 --- a/src/crypto/token_id.rs +++ b/src/crypto/token_id.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::group::ff::PrimeField; use super::types::DrkTokenId; diff --git a/src/crypto/token_list.rs b/src/crypto/token_list.rs index 1d4e9beff..ded15cf0f 100644 --- a/src/crypto/token_list.rs +++ b/src/crypto/token_list.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::FromStr; use fxhash::FxHashMap; diff --git a/src/crypto/types.rs b/src/crypto/types.rs index 1fbc5221f..d6529d6e3 100644 --- a/src/crypto/types.rs +++ b/src/crypto/types.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Type aliases used in the codebase. // Helpful for changing the curve and crypto we're using. use pasta_curves::pallas; diff --git a/src/crypto/util.rs b/src/crypto/util.rs index 642eafc31..1fb22bd7e 100644 --- a/src/crypto/util.rs +++ b/src/crypto/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use blake2b_simd::Params; use darkfi_sdk::crypto::constants::{ fixed_bases::{ diff --git a/src/dht/messages.rs b/src/dht/messages.rs index 74fff8dc9..a57259ee9 100644 --- a/src/dht/messages.rs +++ b/src/dht/messages.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::collections::{HashMap, HashSet}; use darkfi_serial::{serialize, SerialDecodable, SerialEncodable}; diff --git a/src/dht/mod.rs b/src/dht/mod.rs index 21d988f16..e0e35a7b3 100644 --- a/src/dht/mod.rs +++ b/src/dht/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::collections::{HashMap, HashSet}; use async_std::sync::{Arc, RwLock}; diff --git a/src/dht/protocol.rs b/src/dht/protocol.rs index 4b7ba1fc5..90ddc9906 100644 --- a/src/dht/protocol.rs +++ b/src/dht/protocol.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use async_trait::async_trait; use chrono::Utc; diff --git a/src/error.rs b/src/error.rs index b7185486e..9742b0f19 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + // Hello developer. Please add your error to the according subsection // that is commented, or make a new subsection. Keep it clean. diff --git a/src/lib.rs b/src/lib.rs index c79061136..6793a9638 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod error; pub use error::{ClientFailed, ClientResult, Error, Result, VerifyFailed, VerifyResult}; diff --git a/src/net/acceptor.rs b/src/net/acceptor.rs index 6a6c40982..62213da1d 100644 --- a/src/net/acceptor.rs +++ b/src/net/acceptor.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{env, fs}; use async_std::sync::{Arc, Mutex}; diff --git a/src/net/channel.rs b/src/net/channel.rs index 05a5ad8c2..08f03878f 100644 --- a/src/net/channel.rs +++ b/src/net/channel.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use futures::{ io::{ReadHalf, WriteHalf}, diff --git a/src/net/connector.rs b/src/net/connector.rs index f18c6401f..526cac670 100644 --- a/src/net/connector.rs +++ b/src/net/connector.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{env, time::Duration}; use async_std::sync::Arc; diff --git a/src/net/constants.rs b/src/net/constants.rs index 9ce7cc7a9..87123c365 100644 --- a/src/net/constants.rs +++ b/src/net/constants.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Localnet addresses pub const LOCALNET: [&str; 5] = ["localhost", "0.0.0.0", "[::]", "127.0.0.1", "[::1]"]; diff --git a/src/net/hosts.rs b/src/net/hosts.rs index 10bcaa4f0..24a3b3e36 100644 --- a/src/net/hosts.rs +++ b/src/net/hosts.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use std::net::IpAddr; diff --git a/src/net/message.rs b/src/net/message.rs index 70827c02d..b97ffbe1e 100644 --- a/src/net/message.rs +++ b/src/net/message.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{Decodable, Encodable, SerialDecodable, SerialEncodable, VarInt}; use futures::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}; use log::debug; diff --git a/src/net/message_subscriber.rs b/src/net/message_subscriber.rs index 0f186091a..cd543aece 100644 --- a/src/net/message_subscriber.rs +++ b/src/net/message_subscriber.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Mutex; use std::{any::Any, io::Cursor, sync::Arc}; diff --git a/src/net/mod.rs b/src/net/mod.rs index 32b3c7d7f..a1abf064b 100644 --- a/src/net/mod.rs +++ b/src/net/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Acceptor class handles the acceptance of inbound socket connections. It's /// used to start listening on a local socket address, to accept incoming /// connections and to handle network errors. diff --git a/src/net/p2p.rs b/src/net/p2p.rs index 7f2842a48..526ae6e51 100644 --- a/src/net/p2p.rs +++ b/src/net/p2p.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::fmt; use async_std::sync::{Arc, Mutex}; diff --git a/src/net/protocol/mod.rs b/src/net/protocol/mod.rs index 7746fbc84..743c016ad 100644 --- a/src/net/protocol/mod.rs +++ b/src/net/protocol/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Protocol for address and get-address messages. Implements how nodes exchange /// connection information about other nodes on the network. Address and /// get-address messages are exchanged continually alongside ping-pong messages diff --git a/src/net/protocol/protocol_address.rs b/src/net/protocol/protocol_address.rs index 89da5b630..2ad038868 100644 --- a/src/net/protocol/protocol_address.rs +++ b/src/net/protocol/protocol_address.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use async_trait::async_trait; diff --git a/src/net/protocol/protocol_base.rs b/src/net/protocol/protocol_base.rs index 90b8fcfb2..061db9e15 100644 --- a/src/net/protocol/protocol_base.rs +++ b/src/net/protocol/protocol_base.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use async_trait::async_trait; diff --git a/src/net/protocol/protocol_jobs_manager.rs b/src/net/protocol/protocol_jobs_manager.rs index 50c30d18f..727e148e0 100644 --- a/src/net/protocol/protocol_jobs_manager.rs +++ b/src/net/protocol/protocol_jobs_manager.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Mutex; use std::sync::Arc; diff --git a/src/net/protocol/protocol_ping.rs b/src/net/protocol/protocol_ping.rs index 70237cbda..8cd26f654 100644 --- a/src/net/protocol/protocol_ping.rs +++ b/src/net/protocol/protocol_ping.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{sync::Arc, time::Instant}; use async_trait::async_trait; diff --git a/src/net/protocol/protocol_registry.rs b/src/net/protocol/protocol_registry.rs index 263e4da00..63f57b11e 100644 --- a/src/net/protocol/protocol_registry.rs +++ b/src/net/protocol/protocol_registry.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Mutex; use std::future::Future; diff --git a/src/net/protocol/protocol_seed.rs b/src/net/protocol/protocol_seed.rs index dd5219be4..da306926a 100644 --- a/src/net/protocol/protocol_seed.rs +++ b/src/net/protocol/protocol_seed.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use async_trait::async_trait; diff --git a/src/net/protocol/protocol_version.rs b/src/net/protocol/protocol_version.rs index 96515564e..3410485ee 100644 --- a/src/net/protocol/protocol_version.rs +++ b/src/net/protocol/protocol_version.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::future::timeout; use std::{sync::Arc, time::Duration}; diff --git a/src/net/session/inbound_session.rs b/src/net/session/inbound_session.rs index 07298e78d..0dd654872 100644 --- a/src/net/session/inbound_session.rs +++ b/src/net/session/inbound_session.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex, Weak}; use async_trait::async_trait; diff --git a/src/net/session/manual_session.rs b/src/net/session/manual_session.rs index ed20ce642..6c7c16ac9 100644 --- a/src/net/session/manual_session.rs +++ b/src/net/session/manual_session.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex, Weak}; use async_trait::async_trait; diff --git a/src/net/session/mod.rs b/src/net/session/mod.rs index 240dad718..f8d8574b5 100644 --- a/src/net/session/mod.rs +++ b/src/net/session/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::{Arc, Weak}; use async_trait::async_trait; diff --git a/src/net/session/outbound_session.rs b/src/net/session/outbound_session.rs index 93adcf4ab..7659161f0 100644 --- a/src/net/session/outbound_session.rs +++ b/src/net/session/outbound_session.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::fmt; use async_std::sync::{Arc, Mutex, Weak}; diff --git a/src/net/session/seedsync_session.rs b/src/net/session/seedsync_session.rs index 56aa09ddc..53250fec4 100644 --- a/src/net/session/seedsync_session.rs +++ b/src/net/session/seedsync_session.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::Duration; use async_std::{ diff --git a/src/net/settings.rs b/src/net/settings.rs index a84156c8b..b51c8d141 100644 --- a/src/net/settings.rs +++ b/src/net/settings.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::Arc; use serde::Deserialize; diff --git a/src/net/transport.rs b/src/net/transport.rs index 49a179b99..3d0390aa2 100644 --- a/src/net/transport.rs +++ b/src/net/transport.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{net::SocketAddr, time::Duration}; use async_trait::async_trait; diff --git a/src/net/transport/tcp.rs b/src/net/transport/tcp.rs index ef9c24269..cbac85819 100644 --- a/src/net/transport/tcp.rs +++ b/src/net/transport/tcp.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::net::{TcpListener, TcpStream}; use std::{io, net::SocketAddr, pin::Pin, time::Duration}; diff --git a/src/net/transport/tor.rs b/src/net/transport/tor.rs index 9777dd206..564e3177f 100644 --- a/src/net/transport/tor.rs +++ b/src/net/transport/tor.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ io, io::{BufRead, BufReader, Write}, diff --git a/src/net/transport/unix.rs b/src/net/transport/unix.rs index 5fa1750c8..d5900717c 100644 --- a/src/net/transport/unix.rs +++ b/src/net/transport/unix.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::os::unix::net::{UnixListener, UnixStream}; use async_trait::async_trait; diff --git a/src/net/transport/upgrade_tls.rs b/src/net/transport/upgrade_tls.rs index c2e9f4f1f..632c9f71b 100644 --- a/src/net/transport/upgrade_tls.rs +++ b/src/net/transport/upgrade_tls.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::SystemTime; use async_std::{net::TcpListener, sync::Arc}; diff --git a/src/node/client.rs b/src/node/client.rs index 2255dbcde..7ccef6a3a 100644 --- a/src/node/client.rs +++ b/src/node/client.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; diff --git a/src/node/memorystate.rs b/src/node/memorystate.rs index 7e4b0301e..bdaa2c86c 100644 --- a/src/node/memorystate.rs +++ b/src/node/memorystate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; use log::debug; diff --git a/src/node/mod.rs b/src/node/mod.rs index d7333925a..a625db01f 100644 --- a/src/node/mod.rs +++ b/src/node/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod client; pub use client::Client; diff --git a/src/node/state.rs b/src/node/state.rs index 235572d72..bddca893d 100644 --- a/src/node/state.rs +++ b/src/node/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{constants::MERKLE_DEPTH, MerkleNode, Nullifier}; use incrementalmerkletree::{bridgetree::BridgeTree, Tree}; use lazy_init::Lazy; diff --git a/src/raft/consensus.rs b/src/raft/consensus.rs index 99cf7402e..81176f356 100644 --- a/src/raft/consensus.rs +++ b/src/raft/consensus.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::Duration; use async_std::{ diff --git a/src/raft/consensus_candidate.rs b/src/raft/consensus_candidate.rs index f65abf268..cc02f0af2 100644 --- a/src/raft/consensus_candidate.rs +++ b/src/raft/consensus_candidate.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use chrono::Utc; use darkfi_serial::{serialize, Decodable, Encodable}; use log::info; diff --git a/src/raft/consensus_follower.rs b/src/raft/consensus_follower.rs index ad5cee904..441796322 100644 --- a/src/raft/consensus_follower.rs +++ b/src/raft/consensus_follower.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::cmp::min; use darkfi_serial::{serialize, Decodable, Encodable}; diff --git a/src/raft/consensus_leader.rs b/src/raft/consensus_leader.rs index 19b482f49..34212fe85 100644 --- a/src/raft/consensus_leader.rs +++ b/src/raft/consensus_leader.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{serialize, Decodable, Encodable}; use fxhash::FxHashMap; diff --git a/src/raft/datastore.rs b/src/raft/datastore.rs index 72a3e98ef..40e6acbc3 100644 --- a/src/raft/datastore.rs +++ b/src/raft/datastore.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::marker::PhantomData; use darkfi_serial::{deserialize, serialize, Decodable, Encodable}; diff --git a/src/raft/mod.rs b/src/raft/mod.rs index 12b5ff6cf..105be7d0f 100644 --- a/src/raft/mod.rs +++ b/src/raft/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use chrono::Utc; diff --git a/src/raft/primitives.rs b/src/raft/primitives.rs index 73777aed7..872b5084b 100644 --- a/src/raft/primitives.rs +++ b/src/raft/primitives.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io; use darkfi_serial::{Decodable, Encodable, SerialDecodable, SerialEncodable}; diff --git a/src/raft/protocol_raft.rs b/src/raft/protocol_raft.rs index 19c8d2206..f0ed9e210 100644 --- a/src/raft/protocol_raft.rs +++ b/src/raft/protocol_raft.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use async_trait::async_trait; use chrono::Utc; diff --git a/src/raft/settings.rs b/src/raft/settings.rs index 54fb023c0..7641af577 100644 --- a/src/raft/settings.rs +++ b/src/raft/settings.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::path::PathBuf; #[derive(Clone, Debug)] diff --git a/src/rpc/client.rs b/src/rpc/client.rs index 01a68c818..b5e0ab211 100644 --- a/src/rpc/client.rs +++ b/src/rpc/client.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! JSON-RPC client-side implementation. use std::time::Duration; diff --git a/src/rpc/clock_sync.rs b/src/rpc/clock_sync.rs index 739512556..62be2216e 100644 --- a/src/rpc/clock_sync.rs +++ b/src/rpc/clock_sync.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Clock sync module use std::{net::UdpSocket, time::Duration}; diff --git a/src/rpc/jsonrpc.rs b/src/rpc/jsonrpc.rs index a947bceaa..9d448ce5c 100644 --- a/src/rpc/jsonrpc.rs +++ b/src/rpc/jsonrpc.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! JSON-RPC 2.0 primitives use rand::Rng; use serde::{Deserialize, Serialize}; diff --git a/src/rpc/mod.rs b/src/rpc/mod.rs index b137626f5..256ab6873 100644 --- a/src/rpc/mod.rs +++ b/src/rpc/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// JSON-RPC primitives pub mod jsonrpc; diff --git a/src/rpc/server.rs b/src/rpc/server.rs index 2094cc9d7..ed8b61752 100644 --- a/src/rpc/server.rs +++ b/src/rpc/server.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! JSON-RPC server-side implementation. use async_std::sync::Arc; use async_trait::async_trait; diff --git a/src/rpc/websockets.rs b/src/rpc/websockets.rs index af13ba79a..b743d3a0b 100644 --- a/src/rpc/websockets.rs +++ b/src/rpc/websockets.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ net::{TcpStream, ToSocketAddrs}, pin::Pin, diff --git a/src/runtime/chain_state.rs b/src/runtime/chain_state.rs index 875c9fff6..a730e4d46 100644 --- a/src/runtime/chain_state.rs +++ b/src/runtime/chain_state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{MerkleNode, Nullifier}; use log::{debug, error}; diff --git a/src/runtime/memory.rs b/src/runtime/memory.rs index a72fbdefe..4ead392e8 100644 --- a/src/runtime/memory.rs +++ b/src/runtime/memory.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use wasmer::{Array, Memory, WasmPtr}; use crate::{Error, Result}; diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs index 9785a455d..5f0ed9e10 100644 --- a/src/runtime/mod.rs +++ b/src/runtime/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Main wasm vm runtime implementation pub mod vm_runtime; diff --git a/src/runtime/util.rs b/src/runtime/util.rs index f59a0c22e..e230b29e2 100644 --- a/src/runtime/util.rs +++ b/src/runtime/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use log::{error, warn}; use super::{memory::MemoryManipulation, vm_runtime::Env}; diff --git a/src/runtime/vm_runtime.rs b/src/runtime/vm_runtime.rs index e41901456..b7ba7d793 100644 --- a/src/runtime/vm_runtime.rs +++ b/src/runtime/vm_runtime.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::sync::{Arc, Mutex}; use darkfi_sdk::entrypoint; diff --git a/src/sdk/Cargo.toml b/src/sdk/Cargo.toml index 337114986..b315cb554 100644 --- a/src/sdk/Cargo.toml +++ b/src/sdk/Cargo.toml @@ -3,7 +3,7 @@ name = "darkfi-sdk" version = "0.3.0" homepage = "https://dark.fi" description = "SDK used for developing smart contracts on DarkFi" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/src/sdk/src/crypto/constants.rs b/src/sdk/src/crypto/constants.rs index 07829253c..406511c15 100644 --- a/src/sdk/src/crypto/constants.rs +++ b/src/sdk/src/crypto/constants.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod fixed_bases; pub mod sinsemilla; pub mod util; diff --git a/src/sdk/src/crypto/constants/fixed_bases.rs b/src/sdk/src/crypto/constants/fixed_bases.rs index af11e335f..d518d91d8 100644 --- a/src/sdk/src/crypto/constants/fixed_bases.rs +++ b/src/sdk/src/crypto/constants/fixed_bases.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Orchard fixed bases. use super::{L_ORCHARD_SCALAR, L_VALUE}; use halo2_gadgets::ecc::{ diff --git a/src/sdk/src/crypto/constants/fixed_bases/commit_ivk_r.rs b/src/sdk/src/crypto/constants/fixed_bases/commit_ivk_r.rs index e99ebb34a..1064fd1d3 100644 --- a/src/sdk/src/crypto/constants/fixed_bases/commit_ivk_r.rs +++ b/src/sdk/src/crypto/constants/fixed_bases/commit_ivk_r.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::{arithmetic::CurveAffine, group::ff::PrimeField, pallas}; /// Generator used in SinsemillaCommit randomness for IVK commitment diff --git a/src/sdk/src/crypto/constants/fixed_bases/note_commit_r.rs b/src/sdk/src/crypto/constants/fixed_bases/note_commit_r.rs index 9de0b5471..b5a831bf8 100644 --- a/src/sdk/src/crypto/constants/fixed_bases/note_commit_r.rs +++ b/src/sdk/src/crypto/constants/fixed_bases/note_commit_r.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::{arithmetic::CurveAffine, group::ff::PrimeField, pallas}; /// Generator used in SinsemillaCommit randomness for note commitment diff --git a/src/sdk/src/crypto/constants/fixed_bases/nullifier_k.rs b/src/sdk/src/crypto/constants/fixed_bases/nullifier_k.rs index 81322f9cd..22b1eabab 100644 --- a/src/sdk/src/crypto/constants/fixed_bases/nullifier_k.rs +++ b/src/sdk/src/crypto/constants/fixed_bases/nullifier_k.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::{arithmetic::CurveAffine, group::ff::PrimeField, pallas}; pub const GENERATOR: ([u8; 32], [u8; 32]) = ( diff --git a/src/sdk/src/crypto/constants/fixed_bases/spend_auth_g.rs b/src/sdk/src/crypto/constants/fixed_bases/spend_auth_g.rs index a4d89343e..8db74dbc0 100644 --- a/src/sdk/src/crypto/constants/fixed_bases/spend_auth_g.rs +++ b/src/sdk/src/crypto/constants/fixed_bases/spend_auth_g.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::{arithmetic::CurveAffine, group::ff::PrimeField, pallas}; /// The value commitment is used to check balance between inputs and outputs. The value is diff --git a/src/sdk/src/crypto/constants/fixed_bases/value_commit_r.rs b/src/sdk/src/crypto/constants/fixed_bases/value_commit_r.rs index 3891d78ac..061126a1c 100644 --- a/src/sdk/src/crypto/constants/fixed_bases/value_commit_r.rs +++ b/src/sdk/src/crypto/constants/fixed_bases/value_commit_r.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::{arithmetic::CurveAffine, group::ff::PrimeField, pallas}; /// The value commitment is used to check balance between inputs and outputs. The value is diff --git a/src/sdk/src/crypto/constants/fixed_bases/value_commit_v.rs b/src/sdk/src/crypto/constants/fixed_bases/value_commit_v.rs index 629d8c9f8..db24ded27 100644 --- a/src/sdk/src/crypto/constants/fixed_bases/value_commit_v.rs +++ b/src/sdk/src/crypto/constants/fixed_bases/value_commit_v.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use pasta_curves::{arithmetic::CurveAffine, group::ff::PrimeField, pallas}; /// The value commitment is used to check balance between inputs and outputs. The value is diff --git a/src/sdk/src/crypto/constants/load.rs b/src/sdk/src/crypto/constants/load.rs index e4edb3592..d9f15b237 100644 --- a/src/sdk/src/crypto/constants/load.rs +++ b/src/sdk/src/crypto/constants/load.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use crate::constants::{self, compute_lagrange_coeffs, H, NUM_WINDOWS, NUM_WINDOWS_SHORT}; use group::ff::PrimeField; use pasta_curves::pallas; diff --git a/src/sdk/src/crypto/constants/sinsemilla.rs b/src/sdk/src/crypto/constants/sinsemilla.rs index ea55fdb5a..819b0a2cb 100644 --- a/src/sdk/src/crypto/constants/sinsemilla.rs +++ b/src/sdk/src/crypto/constants/sinsemilla.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Sinsemilla generators use super::{util::i2lebsp, OrchardFixedBases, OrchardFixedBasesFull}; use halo2_gadgets::sinsemilla::{CommitDomains, HashDomains}; diff --git a/src/sdk/src/crypto/constants/util.rs b/src/sdk/src/crypto/constants/util.rs index b90a77cc1..6c9280d9b 100644 --- a/src/sdk/src/crypto/constants/util.rs +++ b/src/sdk/src/crypto/constants/util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Takes in an FnMut closure and returns a constant-length array with elements of /// type `Output`. pub fn gen_const_array( diff --git a/src/sdk/src/crypto/merkle_node.rs b/src/sdk/src/crypto/merkle_node.rs index 4326f0764..7ab87603b 100644 --- a/src/sdk/src/crypto/merkle_node.rs +++ b/src/sdk/src/crypto/merkle_node.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use core::{fmt, str::FromStr}; use std::{io, iter}; diff --git a/src/sdk/src/crypto/mod.rs b/src/sdk/src/crypto/mod.rs index c9c53435f..07278e38b 100644 --- a/src/sdk/src/crypto/mod.rs +++ b/src/sdk/src/crypto/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! This module contains a bit more minimal implementations of the //! objects and types that can be found in `darkfi::crypto`. //! This is done so we can have a lot less dependencies in this SDK, diff --git a/src/sdk/src/crypto/nullifier.rs b/src/sdk/src/crypto/nullifier.rs index eeb0d96da..c31634cbc 100644 --- a/src/sdk/src/crypto/nullifier.rs +++ b/src/sdk/src/crypto/nullifier.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use core::{fmt, str::FromStr}; use std::io; diff --git a/src/sdk/src/crypto/pedersen.rs b/src/sdk/src/crypto/pedersen.rs index bf09958a2..4d916472f 100644 --- a/src/sdk/src/crypto/pedersen.rs +++ b/src/sdk/src/crypto/pedersen.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use super::constants::{ fixed_bases::{ VALUE_COMMITMENT_PERSONALIZATION, VALUE_COMMITMENT_R_BYTES, VALUE_COMMITMENT_V_BYTES, diff --git a/src/sdk/src/entrypoint.rs b/src/sdk/src/entrypoint.rs index 397631d1b..1dcfc52f4 100644 --- a/src/sdk/src/entrypoint.rs +++ b/src/sdk/src/entrypoint.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{mem::size_of, slice::from_raw_parts}; /// Success exit code for a contract diff --git a/src/sdk/src/error.rs b/src/sdk/src/error.rs index a36596f6d..c69a4bef7 100644 --- a/src/sdk/src/error.rs +++ b/src/sdk/src/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::result::Result as ResultGeneric; pub type ContractResult = ResultGeneric<(), ContractError>; diff --git a/src/sdk/src/lib.rs b/src/sdk/src/lib.rs index a80436a8d..701fc7858 100644 --- a/src/sdk/src/lib.rs +++ b/src/sdk/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub use incrementalmerkletree; pub use pasta_curves as pasta; diff --git a/src/sdk/src/log.rs b/src/sdk/src/log.rs index 023d89a65..4e72bbc0a 100644 --- a/src/sdk/src/log.rs +++ b/src/sdk/src/log.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Print a message to the log #[macro_export] macro_rules! msg { diff --git a/src/sdk/src/state.rs b/src/sdk/src/state.rs index 084edcb33..8ed5ac324 100644 --- a/src/sdk/src/state.rs +++ b/src/sdk/src/state.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use super::{ crypto::{MerkleNode, Nullifier}, error::{ContractError, ContractResult}, diff --git a/src/serial/Cargo.toml b/src/serial/Cargo.toml index fbecac28b..8daaf85b9 100644 --- a/src/serial/Cargo.toml +++ b/src/serial/Cargo.toml @@ -3,7 +3,7 @@ name = "darkfi-serial" version = "0.3.0" homepage = "https://dark.fi" description = "DarkFi serialization library" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/src/serial/derive-internal/Cargo.toml b/src/serial/derive-internal/Cargo.toml index 94d399242..eb46da51f 100644 --- a/src/serial/derive-internal/Cargo.toml +++ b/src/serial/derive-internal/Cargo.toml @@ -3,7 +3,7 @@ name = "darkfi-derive-internal" version = "0.3.0" homepage = "https://dark.fi" description = "Internal crate for serialization derive macros" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/src/serial/derive-internal/src/helpers.rs b/src/serial/derive-internal/src/helpers.rs index 38fb50aac..2cadb8c63 100644 --- a/src/serial/derive-internal/src/helpers.rs +++ b/src/serial/derive-internal/src/helpers.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use quote::ToTokens; use syn::{Attribute, Meta}; //use syn::{spanned::Spanned, Attribute, Error, Meta, NestedMeta, Path}; diff --git a/src/serial/derive-internal/src/lib.rs b/src/serial/derive-internal/src/lib.rs index a897eb2f2..87728aef0 100644 --- a/src/serial/derive-internal/src/lib.rs +++ b/src/serial/derive-internal/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Derive (de)serialization for structs, see src/serial/derive use proc_macro2::{Span, TokenStream as TokenStream2}; use quote::quote; diff --git a/src/serial/derive/Cargo.toml b/src/serial/derive/Cargo.toml index b8cd99bf6..dcb9c400a 100644 --- a/src/serial/derive/Cargo.toml +++ b/src/serial/derive/Cargo.toml @@ -3,7 +3,7 @@ name = "darkfi-derive" version = "0.3.0" homepage = "https://dark.fi" description = "Crate for serialization derive macros" -authors = ["darkfi "] +authors = ["Dyne.org foundation "] repository = "https://github.com/darkrenaissance/darkfi" license = "AGPL-3.0-only" edition = "2021" diff --git a/src/serial/derive/src/lib.rs b/src/serial/derive/src/lib.rs index 33cdd6070..9245cde96 100644 --- a/src/serial/derive/src/lib.rs +++ b/src/serial/derive/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + extern crate proc_macro; use proc_macro::TokenStream; use proc_macro2::Span; diff --git a/src/serial/src/async_serial.rs b/src/serial/src/async_serial.rs index 3f1940363..565a7829c 100644 --- a/src/serial/src/async_serial.rs +++ b/src/serial/src/async_serial.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io::{Error, ErrorKind}; use futures_lite::{ diff --git a/src/serial/src/endian.rs b/src/serial/src/endian.rs index 30b58865d..71dec2392 100644 --- a/src/serial/src/endian.rs +++ b/src/serial/src/endian.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + macro_rules! define_slice_to_be { ($name: ident, $type: ty) => { #[inline] diff --git a/src/serial/src/lib.rs b/src/serial/src/lib.rs index 980c2e57a..bf7af03c7 100644 --- a/src/serial/src/lib.rs +++ b/src/serial/src/lib.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io::{Cursor, Error, ErrorKind, Read, Write}; #[cfg(feature = "derive")] diff --git a/src/serial/src/types.rs b/src/serial/src/types.rs index d4a6904eb..369e4bab1 100644 --- a/src/serial/src/types.rs +++ b/src/serial/src/types.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Encodings for external crates #[cfg(feature = "collections")] diff --git a/src/serial/src/types/collections.rs b/src/serial/src/types/collections.rs index 27d24e860..9b518c65f 100644 --- a/src/serial/src/types/collections.rs +++ b/src/serial/src/types/collections.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Serialization of collections use std::{ collections::{BTreeMap, BTreeSet, HashMap, HashSet}, diff --git a/src/serial/src/types/hash.rs b/src/serial/src/types/hash.rs index fd01a4d52..11812d243 100644 --- a/src/serial/src/types/hash.rs +++ b/src/serial/src/types/hash.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io::{Error, Read, Write}; use crate::{Decodable, Encodable, ReadExt, WriteExt}; diff --git a/src/serial/src/types/incrementalmerkletree.rs b/src/serial/src/types/incrementalmerkletree.rs index d072d1515..3fe65993e 100644 --- a/src/serial/src/types/incrementalmerkletree.rs +++ b/src/serial/src/types/incrementalmerkletree.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io::{Error, ErrorKind, Read, Write}; use incrementalmerkletree::Hashable; diff --git a/src/serial/src/types/pasta.rs b/src/serial/src/types/pasta.rs index 80f9486e6..c991b69fa 100644 --- a/src/serial/src/types/pasta.rs +++ b/src/serial/src/types/pasta.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Implementations for pasta curves use std::io::{Error, ErrorKind, Read, Write}; diff --git a/src/serial/src/types/url.rs b/src/serial/src/types/url.rs index 46bc1775c..f26dae1b4 100644 --- a/src/serial/src/types/url.rs +++ b/src/serial/src/types/url.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io::{Error, ErrorKind, Read, Write}; use url::Url; diff --git a/src/serial/src/types/x25519.rs b/src/serial/src/types/x25519.rs index 3cdda63df..347aecd15 100644 --- a/src/serial/src/types/x25519.rs +++ b/src/serial/src/types/x25519.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io::{Error, Read, Write}; use x25519_dalek::PublicKey as X25519PublicKey; diff --git a/src/system/mod.rs b/src/system/mod.rs index 8cdb2d07d..6cf38d82f 100644 --- a/src/system/mod.rs +++ b/src/system/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod stoppable_task; pub mod subscriber; pub mod types; diff --git a/src/system/stoppable_task.rs b/src/system/stoppable_task.rs index 32c127503..67a681b2a 100644 --- a/src/system/stoppable_task.rs +++ b/src/system/stoppable_task.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::Arc; use futures::{Future, FutureExt}; diff --git a/src/system/subscriber.rs b/src/system/subscriber.rs index 9eea9aef7..5c5682f11 100644 --- a/src/system/subscriber.rs +++ b/src/system/subscriber.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use async_std::sync::{Arc, Mutex}; use fxhash::FxHashMap; use log::warn; diff --git a/src/system/types.rs b/src/system/types.rs index f94d39bb5..1605a0203 100644 --- a/src/system/types.rs +++ b/src/system/types.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use smol::Executor; use std::sync::Arc; diff --git a/src/tx/builder.rs b/src/tx/builder.rs index b4fe89f6a..b78064f91 100644 --- a/src/tx/builder.rs +++ b/src/tx/builder.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use darkfi_serial::serialize; use pasta_curves::group::ff::Field; diff --git a/src/tx/contract.rs b/src/tx/contract.rs index 53f18e881..c03782b16 100644 --- a/src/tx/contract.rs +++ b/src/tx/contract.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub struct ContractDeploy { /// Public address of the contract, derived from the deploy key. pub address: pallas::Base, diff --git a/src/tx/mod.rs b/src/tx/mod.rs index 5c69ad575..aa0e630e4 100644 --- a/src/tx/mod.rs +++ b/src/tx/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::io; use darkfi_serial::{Encodable, SerialDecodable, SerialEncodable, VarInt}; diff --git a/src/tx/partial.rs b/src/tx/partial.rs index 74970ede8..36bfcbf03 100644 --- a/src/tx/partial.rs +++ b/src/tx/partial.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{SerialDecodable, SerialEncodable}; use super::TransactionOutput; diff --git a/src/util/async_util.rs b/src/util/async_util.rs index dce105ebc..459623f53 100644 --- a/src/util/async_util.rs +++ b/src/util/async_util.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use smol::Timer; use std::time::Duration; diff --git a/src/util/cli.rs b/src/util/cli.rs index 989f5211f..bcc4513bd 100644 --- a/src/util/cli.rs +++ b/src/util/cli.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ env, fs, io::Write, diff --git a/src/util/encoding/base32.rs b/src/util/encoding/base32.rs index 01d6214dd..596051b46 100644 --- a/src/util/encoding/base32.rs +++ b/src/util/encoding/base32.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! Base32 encoding as specified by RFC4648 //! Optional padding is the `=` character. // Taken from https://github.com/andreasots/base32 diff --git a/src/util/encoding/mod.rs b/src/util/encoding/mod.rs index 9375b8a3e..9189d3fa7 100644 --- a/src/util/encoding/mod.rs +++ b/src/util/encoding/mod.rs @@ -1,2 +1,20 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Base32 encoding and decoding pub mod base32; diff --git a/src/util/file.rs b/src/util/file.rs index d89c2dc9a..fc0863a24 100644 --- a/src/util/file.rs +++ b/src/util/file.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ fs::File, io::{BufReader, Read, Write}, diff --git a/src/util/mod.rs b/src/util/mod.rs index f9d0cc323..61df9ac3e 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + #[cfg(feature = "async-runtime")] /// async utility functions pub mod async_util; diff --git a/src/util/net_name.rs b/src/util/net_name.rs index dff7b7100..3c3a2463d 100644 --- a/src/util/net_name.rs +++ b/src/util/net_name.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{io, str::FromStr}; use darkfi_serial::{Decodable, Encodable}; diff --git a/src/util/parse.rs b/src/util/parse.rs index 0e0741a93..408dfc8f8 100644 --- a/src/util/parse.rs +++ b/src/util/parse.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{iter::FromIterator, str::FromStr}; use crate::{Error, Result}; diff --git a/src/util/path.rs b/src/util/path.rs index ae4afcfe7..a8e6378b7 100644 --- a/src/util/path.rs +++ b/src/util/path.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ env, ffi::{CStr, OsString}, diff --git a/src/util/time.rs b/src/util/time.rs index 81f2cb614..45b7c8ca8 100644 --- a/src/util/time.rs +++ b/src/util/time.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::time::UNIX_EPOCH; use chrono::{NaiveDateTime, Utc}; diff --git a/src/wallet/cashierdb.rs b/src/wallet/cashierdb.rs index bd1ded4f5..2e7870a32 100644 --- a/src/wallet/cashierdb.rs +++ b/src/wallet/cashierdb.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{fs::create_dir_all, path::Path, str::FromStr, time::Duration}; use async_std::sync::Arc; diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index 2c7395c52..a41b19412 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -1,2 +1,20 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //pub mod cashierdb; pub mod walletdb; diff --git a/src/wallet/walletdb.rs b/src/wallet/walletdb.rs index 5338c616a..dd178e136 100644 --- a/src/wallet/walletdb.rs +++ b/src/wallet/walletdb.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{fs::create_dir_all, path::Path, str::FromStr, time::Duration}; use async_std::sync::Arc; diff --git a/src/zk/circuit/burn_contract.rs b/src/zk/circuit/burn_contract.rs index a539e32d0..ef53a0b8a 100644 --- a/src/zk/circuit/burn_contract.rs +++ b/src/zk/circuit/burn_contract.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{ constants::{ sinsemilla::{OrchardCommitDomains, OrchardHashDomains}, diff --git a/src/zk/circuit/lead_contract.rs b/src/zk/circuit/lead_contract.rs index 11b6e5bd9..bd48d3f91 100644 --- a/src/zk/circuit/lead_contract.rs +++ b/src/zk/circuit/lead_contract.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{ constants::{ sinsemilla::{OrchardCommitDomains, OrchardHashDomains}, diff --git a/src/zk/circuit/mint_contract.rs b/src/zk/circuit/mint_contract.rs index d1322fcbe..819f39b96 100644 --- a/src/zk/circuit/mint_contract.rs +++ b/src/zk/circuit/mint_contract.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::constants::{ sinsemilla::{OrchardCommitDomains, OrchardHashDomains}, NullifierK, OrchardFixedBases, OrchardFixedBasesFull, ValueCommitV, diff --git a/src/zk/circuit/mod.rs b/src/zk/circuit/mod.rs index c31697f7e..9ba41b41c 100644 --- a/src/zk/circuit/mod.rs +++ b/src/zk/circuit/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + pub mod burn_contract; pub use burn_contract::BurnContract; diff --git a/src/zk/circuit/tx_contract.rs b/src/zk/circuit/tx_contract.rs index 040207ad9..f1cab4283 100644 --- a/src/zk/circuit/tx_contract.rs +++ b/src/zk/circuit/tx_contract.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::{ constants::{ sinsemilla::{OrchardCommitDomains, OrchardHashDomains}, diff --git a/src/zk/gadget/arithmetic.rs b/src/zk/gadget/arithmetic.rs index edd02b9c9..b05662c0b 100644 --- a/src/zk/gadget/arithmetic.rs +++ b/src/zk/gadget/arithmetic.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::{ arithmetic::FieldExt, circuit::{AssignedCell, Chip, Layouter}, diff --git a/src/zk/gadget/is_zero.rs b/src/zk/gadget/is_zero.rs index 51eefeac0..1cf5fb7eb 100644 --- a/src/zk/gadget/is_zero.rs +++ b/src/zk/gadget/is_zero.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::{ arithmetic::FieldExt, circuit::{Region, Value}, diff --git a/src/zk/gadget/less_than.rs b/src/zk/gadget/less_than.rs index b18731b72..8f9fcf4fd 100644 --- a/src/zk/gadget/less_than.rs +++ b/src/zk/gadget/less_than.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::{ arithmetic::FieldExt, circuit::{AssignedCell, Chip, Layouter, Region, Value}, diff --git a/src/zk/gadget/mod.rs b/src/zk/gadget/mod.rs index 696e1eeb1..95e099c30 100644 --- a/src/zk/gadget/mod.rs +++ b/src/zk/gadget/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Base field arithmetic gadget pub mod arithmetic; diff --git a/src/zk/gadget/native_range_check.rs b/src/zk/gadget/native_range_check.rs index e88a6797d..2622bc6b3 100644 --- a/src/zk/gadget/native_range_check.rs +++ b/src/zk/gadget/native_range_check.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::{ circuit::{AssignedCell, Chip, Layouter, Region, Value}, pasta::{ diff --git a/src/zk/gadget/small_range_check.rs b/src/zk/gadget/small_range_check.rs index e2913c201..95514c0e7 100644 --- a/src/zk/gadget/small_range_check.rs +++ b/src/zk/gadget/small_range_check.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use halo2_proofs::{ arithmetic::FieldExt, circuit::{AssignedCell, Chip, Layouter}, diff --git a/src/zk/mod.rs b/src/zk/mod.rs index aa546d4a4..daa2af025 100644 --- a/src/zk/mod.rs +++ b/src/zk/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Halo2 zkas virtual machine pub mod vm; pub mod vm_stack; diff --git a/src/zk/vm.rs b/src/zk/vm.rs index 2179e6b54..0666909a3 100644 --- a/src/zk/vm.rs +++ b/src/zk/vm.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::constants::{ sinsemilla::{OrchardCommitDomains, OrchardHashDomains}, util::gen_const_array, diff --git a/src/zk/vm_stack.rs b/src/zk/vm_stack.rs index 418c6dd2b..ec7c0c597 100644 --- a/src/zk/vm_stack.rs +++ b/src/zk/vm_stack.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! VM stack type abstractions use darkfi_sdk::crypto::{constants::OrchardFixedBases, MerkleNode}; use halo2_gadgets::ecc::{chip::EccChip, FixedPoint, FixedPointBaseField, FixedPointShort, Point}; diff --git a/src/zkas/analyzer.rs b/src/zkas/analyzer.rs index c45e12ed6..f05755ba0 100644 --- a/src/zkas/analyzer.rs +++ b/src/zkas/analyzer.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{ io::{stdin, stdout, Read, Write}, str::Chars, diff --git a/src/zkas/ast.rs b/src/zkas/ast.rs index 7d6c4ee30..6969da871 100644 --- a/src/zkas/ast.rs +++ b/src/zkas/ast.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use super::{LitType, Opcode, VarType}; #[derive(Clone, Debug)] diff --git a/src/zkas/compiler.rs b/src/zkas/compiler.rs index 2d4bd0564..337d5a142 100644 --- a/src/zkas/compiler.rs +++ b/src/zkas/compiler.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::Chars; use darkfi_serial::{serialize, VarInt}; diff --git a/src/zkas/decoder.rs b/src/zkas/decoder.rs index d0a4dffea..5aa775c18 100644 --- a/src/zkas/decoder.rs +++ b/src/zkas/decoder.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_serial::{deserialize_partial, VarInt}; use super::{compiler::MAGIC_BYTES, types::StackType, LitType, Opcode, VarType}; diff --git a/src/zkas/error.rs b/src/zkas/error.rs index 0ce747f24..0e4021ff1 100644 --- a/src/zkas/error.rs +++ b/src/zkas/error.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{io, io::Write, process}; use termion::{color, style}; diff --git a/src/zkas/lexer.rs b/src/zkas/lexer.rs index 3b11c283a..45abfede3 100644 --- a/src/zkas/lexer.rs +++ b/src/zkas/lexer.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::str::Chars; use super::error::ErrorEmitter; diff --git a/src/zkas/mod.rs b/src/zkas/mod.rs index b6c44d1f4..b6246f36a 100644 --- a/src/zkas/mod.rs +++ b/src/zkas/mod.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + //! `src/zkas` is the library holding the zkas toolchain, consisting of a //! lexer, parser, static/semantic analyzers, a binary compiler, and a //! binary decoder. diff --git a/src/zkas/opcode.rs b/src/zkas/opcode.rs index c72436f12..f78e18647 100644 --- a/src/zkas/opcode.rs +++ b/src/zkas/opcode.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use super::VarType; /// Opcodes supported by the zkas VM diff --git a/src/zkas/parser.rs b/src/zkas/parser.rs index 1175f5f81..fad167b5b 100644 --- a/src/zkas/parser.rs +++ b/src/zkas/parser.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{iter::Peekable, str::Chars}; use indexmap::IndexMap; diff --git a/src/zkas/types.rs b/src/zkas/types.rs index 10db219af..67b4aa813 100644 --- a/src/zkas/types.rs +++ b/src/zkas/types.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + /// Stack types in bincode & vm #[derive(Clone, Debug)] #[repr(u8)] diff --git a/tests/arithmetic_proof.rs b/tests/arithmetic_proof.rs index f1941c93b..9c840e7f5 100644 --- a/tests/arithmetic_proof.rs +++ b/tests/arithmetic_proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi::{ crypto::{ proof::{ProvingKey, VerifyingKey}, diff --git a/tests/burn_proof.rs b/tests/burn_proof.rs index a3bc3f8a2..e5549b942 100644 --- a/tests/burn_proof.rs +++ b/tests/burn_proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi::{ crypto::{ keypair::{PublicKey, SecretKey}, diff --git a/tests/mint_proof.rs b/tests/mint_proof.rs index bebb9f96b..6eefcda80 100644 --- a/tests/mint_proof.rs +++ b/tests/mint_proof.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi::{ crypto::{ keypair::PublicKey, diff --git a/tests/network_transports.rs b/tests/network_transports.rs index e5431bfb1..5cd7941bf 100644 --- a/tests/network_transports.rs +++ b/tests/network_transports.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use std::{env::var, fs}; use async_std::{ diff --git a/tests/zkvm_opcodes.rs b/tests/zkvm_opcodes.rs index 371f19e79..1dc3ae7e2 100644 --- a/tests/zkvm_opcodes.rs +++ b/tests/zkvm_opcodes.rs @@ -1,3 +1,21 @@ +/* This file is part of DarkFi (https://dark.fi) + * + * Copyright (C) 2020-2022 Dyne.org foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + use darkfi_sdk::crypto::MerkleNode; use halo2_gadgets::poseidon::{ primitives as poseidon,