├── .buildkite ├── nightly.yml └── pipeline.yml ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .hindent.yaml ├── .hlint.yaml ├── .stylish-haskell.yaml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── acid-state-exts ├── README.md ├── Setup.hs ├── acid-state-exts.cabal └── src │ └── Serokell │ └── AcidState │ ├── ExtendedState.hs │ ├── Instances.hs │ └── Util.hs ├── appveyor.yml ├── auxx ├── LICENSE ├── Main.hs ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-auxx.cabal ├── src │ ├── AuxxOptions.hs │ ├── Command.hs │ ├── Command │ │ ├── BlockGen.hs │ │ ├── Help.hs │ │ ├── Proc.hs │ │ ├── Rollback.hs │ │ ├── Tx.hs │ │ ├── TyProjection.hs │ │ └── Update.hs │ ├── Lang.hs │ ├── Lang │ │ ├── Argument.hs │ │ ├── Command.hs │ │ ├── DisplayError.hs │ │ ├── Interpreter.hs │ │ ├── Lexer.hs │ │ ├── Name.hs │ │ ├── Parser.hs │ │ ├── Syntax.hs │ │ └── Value.hs │ ├── Mode.hs │ ├── Plugin.hs │ └── Repl.hs └── test │ ├── Spec.hs │ ├── Test.hs │ └── Test │ └── Auxx │ └── Lang │ ├── ArgumentSpec.hs │ ├── LexerSpec.hs │ └── ParserSpec.hs ├── binary ├── LICENSE ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-binary.cabal ├── src │ └── Pos │ │ └── Binary │ │ ├── Class.hs │ │ ├── Class │ │ ├── Core.hs │ │ ├── Primitive.hs │ │ └── TH.hs │ │ ├── Limit.hs │ │ └── SafeCopy.hs └── test │ ├── LICENSE │ ├── NOTICE │ ├── Spec.hs │ ├── Test │ └── Pos │ │ ├── Binary │ │ ├── BiSerialize.hs │ │ ├── BiSizeBounds.hs │ │ ├── Cbor │ │ │ └── CborSpec.hs │ │ ├── Helpers.hs │ │ └── Helpers │ │ │ └── GoldenRoundTrip.hs │ │ └── Cbor │ │ ├── Canonicity.hs │ │ └── RefImpl.hs │ ├── cardano-sl-binary-test.cabal │ ├── golden │ ├── TestSimpleIndexed1 │ ├── TestSimpleIndexed2 │ ├── TestSimpleIndexed3 │ ├── TestSimpleIndexed4 │ └── TestSimpleIndexed5 │ └── test.hs ├── bors.toml ├── cabal.project ├── cabal.project.freeze ├── chain ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── bench │ └── block-bench.hs ├── cardano-sl-chain.cabal ├── shell.nix ├── src │ └── Pos │ │ └── Chain │ │ ├── Block.hs │ │ ├── Block │ │ ├── Block.hs │ │ ├── ComponentBlock.hs │ │ ├── Configuration.hs │ │ ├── Error.hs │ │ ├── Genesis.hs │ │ ├── HasPrevBlock.hs │ │ ├── Header.hs │ │ ├── IsHeader.hs │ │ ├── JsonLog.hs │ │ ├── Logic.hs │ │ ├── Logic │ │ │ └── Integrity.hs │ │ ├── Main.hs │ │ ├── Slog.hs │ │ ├── Slog │ │ │ ├── LastBlkSlots.hs │ │ │ └── Types.hs │ │ ├── Types.hs │ │ └── Util.hs │ │ ├── Delegation.hs │ │ ├── Delegation │ │ ├── Cede.hs │ │ ├── Cede │ │ │ ├── Class.hs │ │ │ └── Types.hs │ │ ├── Class.hs │ │ ├── Configuration.hs │ │ ├── HeavyDlgIndex.hs │ │ ├── LightDlgIndices.hs │ │ ├── Payload.hs │ │ ├── Proof.hs │ │ └── Types.hs │ │ ├── Genesis.hs │ │ ├── Genesis │ │ ├── AvvmBalances.hs │ │ ├── Config.hs │ │ ├── Data.hs │ │ ├── Delegation.hs │ │ ├── Generate.hs │ │ ├── Hash.hs │ │ ├── Initializer.hs │ │ ├── NonAvvmBalances.hs │ │ ├── ProtocolConstants.hs │ │ ├── Spec.hs │ │ └── WStakeholders.hs │ │ ├── Lrc.hs │ │ ├── Lrc │ │ ├── Core.hs │ │ ├── Error.hs │ │ ├── Fts.hs │ │ ├── Genesis.hs │ │ ├── OBFT.hs │ │ ├── RichmenComponent.hs │ │ └── Types.hs │ │ ├── Script.hs │ │ ├── Security.hs │ │ ├── Security │ │ ├── Params.hs │ │ └── Util.hs │ │ ├── Ssc.hs │ │ ├── Ssc │ │ ├── Base.hs │ │ ├── Behavior.hs │ │ ├── Commitment.hs │ │ ├── CommitmentAndOpening.hs │ │ ├── CommitmentsMap.hs │ │ ├── Configuration.hs │ │ ├── Error.hs │ │ ├── Error │ │ │ ├── Seed.hs │ │ │ └── Verify.hs │ │ ├── Functions.hs │ │ ├── Mem.hs │ │ ├── Message.hs │ │ ├── Opening.hs │ │ ├── OpeningsMap.hs │ │ ├── Payload.hs │ │ ├── Proof.hs │ │ ├── Seed.hs │ │ ├── Shares.hs │ │ ├── SharesDistribution.hs │ │ ├── SharesMap.hs │ │ ├── Toss.hs │ │ ├── Toss │ │ │ ├── Base.hs │ │ │ ├── Class.hs │ │ │ ├── Logic.hs │ │ │ ├── Pure.hs │ │ │ └── Types.hs │ │ ├── Types.hs │ │ ├── VssCertData.hs │ │ ├── VssCertificate.hs │ │ └── VssCertificatesMap.hs │ │ ├── Txp.hs │ │ ├── Txp │ │ ├── Base.hs │ │ ├── Configuration.hs │ │ ├── Error.hs │ │ ├── GenesisUtxo.hs │ │ ├── Toil.hs │ │ ├── Toil │ │ │ ├── Failure.hs │ │ │ ├── Logic.hs │ │ │ ├── Monad.hs │ │ │ ├── Stakes.hs │ │ │ ├── Types.hs │ │ │ ├── Utxo.hs │ │ │ └── Utxo │ │ │ │ ├── Functions.hs │ │ │ │ └── Util.hs │ │ ├── Topsort.hs │ │ ├── Tx.hs │ │ ├── TxAux.hs │ │ ├── TxMsg.hs │ │ ├── TxOutAux.hs │ │ ├── TxPayload.hs │ │ ├── TxProof.hs │ │ ├── TxWitness.hs │ │ └── Undo.hs │ │ ├── Update.hs │ │ └── Update │ │ ├── ApplicationName.hs │ │ ├── BlockVersion.hs │ │ ├── BlockVersionData.hs │ │ ├── BlockVersionModifier.hs │ │ ├── Configuration.hs │ │ ├── Constants.hs │ │ ├── Data.hs │ │ ├── Params.hs │ │ ├── Payload.hs │ │ ├── Poll.hs │ │ ├── Poll │ │ ├── Class.hs │ │ ├── Failure.hs │ │ ├── Modifier.hs │ │ └── Types.hs │ │ ├── Proof.hs │ │ ├── SoftforkRule.hs │ │ ├── SoftwareVersion.hs │ │ ├── SystemTag.hs │ │ ├── Util.hs │ │ └── Vote.hs └── test │ ├── LICENSE │ ├── NOTICE │ ├── Setup.hs │ ├── Spec.hs │ ├── Test │ └── Pos │ │ └── Chain │ │ ├── Block │ │ ├── Arbitrary.hs │ │ ├── Arbitrary │ │ │ └── Generate.hs │ │ ├── Bi.hs │ │ ├── BlockSpec.hs │ │ ├── CborSpec.hs │ │ ├── Gen.hs │ │ ├── SafeCopySpec.hs │ │ └── Slog │ │ │ └── LastBlkSlots.hs │ │ ├── Delegation │ │ ├── Arbitrary.hs │ │ ├── Bi.hs │ │ ├── Example.hs │ │ └── Gen.hs │ │ ├── Genesis │ │ ├── Arbitrary.hs │ │ ├── Dummy.hs │ │ ├── Example.hs │ │ ├── Gen.hs │ │ └── Json.hs │ │ ├── Lrc │ │ ├── Arbitrary.hs │ │ ├── FtsSpec.hs │ │ ├── ObftRoundRobinSpec.hs │ │ └── StakeAndHolder.hs │ │ ├── Ssc │ │ ├── Arbitrary.hs │ │ ├── Bi.hs │ │ ├── CborSpec.hs │ │ ├── Example.hs │ │ ├── Gen.hs │ │ └── Json.hs │ │ ├── Txp │ │ ├── Arbitrary.hs │ │ ├── Arbitrary │ │ │ └── Unsafe.hs │ │ ├── Bi.hs │ │ ├── CoreSpec.hs │ │ ├── Example.hs │ │ ├── Gen.hs │ │ ├── Json.hs │ │ └── Toil │ │ │ └── UtxoSpec.hs │ │ └── Update │ │ ├── Arbitrary.hs │ │ ├── Bi.hs │ │ ├── CborSpec.hs │ │ ├── Example.hs │ │ ├── Gen.hs │ │ └── Json.hs │ ├── cardano-sl-chain-test.cabal │ ├── golden │ ├── bi │ │ ├── block │ │ │ ├── BlockBodyAttributes │ │ │ ├── BlockHeaderAttributes │ │ │ ├── BlockHeaderMain │ │ │ ├── BlockHeader_Genesis │ │ │ ├── BlockSignature │ │ │ ├── BlockSignature_Heavy │ │ │ ├── BlockSignature_Light │ │ │ ├── GenesisBlockHeader │ │ │ ├── GenesisBody │ │ │ ├── GenesisConsensusData │ │ │ ├── GenesisProof │ │ │ ├── HeaderHash │ │ │ ├── MainBlockHeader │ │ │ ├── MainBody │ │ │ ├── MainConsensusData │ │ │ ├── MainExtraBodyData │ │ │ ├── MainExtraHeaderData │ │ │ ├── MainProof │ │ │ ├── MainToSign │ │ │ └── Undo │ │ ├── delegation │ │ │ ├── DlgPayload │ │ │ ├── HeavyDlgIndex │ │ │ ├── LightDlgIndices │ │ │ ├── ProxySKBlockInfo_Just │ │ │ ├── ProxySKBlockInfo_Nothing │ │ │ └── ProxySKHeavy │ │ ├── ssc │ │ │ ├── Commitment │ │ │ ├── CommitmentSignature │ │ │ ├── CommitmentsMap │ │ │ ├── InnerSharesMap │ │ │ ├── Opening │ │ │ ├── OpeningsMap │ │ │ ├── SharesDistribution │ │ │ ├── SharesMap │ │ │ ├── SignedCommitment │ │ │ ├── SscPayload_CertificatesPayload │ │ │ ├── SscPayload_CommitmentsPayload │ │ │ ├── SscPayload_OpeningsPayload │ │ │ ├── SscPayload_SharesPayload │ │ │ ├── SscProof_CertificatesProof │ │ │ ├── SscProof_CommitmentsProof │ │ │ ├── SscProof_OpeningsProof │ │ │ ├── SscProof_SharesProof │ │ │ ├── VssCertificate │ │ │ ├── VssCertificatesHash │ │ │ └── VssCertificatesMap │ │ ├── txp │ │ │ ├── HashTx │ │ │ ├── Tx │ │ │ ├── TxAttributes │ │ │ ├── TxId │ │ │ ├── TxInList │ │ │ ├── TxInWitness_PkWitness │ │ │ ├── TxInWitness_RedeemWitness │ │ │ ├── TxInWitness_ScriptWitness │ │ │ ├── TxInWitness_UnknownWitnessType │ │ │ ├── TxIn_Unknown │ │ │ ├── TxIn_Utxo │ │ │ ├── TxOut │ │ │ ├── TxOutAux │ │ │ ├── TxOutList │ │ │ ├── TxProof │ │ │ ├── TxSig │ │ │ ├── TxSigData │ │ │ └── TxWitness │ │ └── update │ │ │ ├── ApplicationName │ │ │ ├── BlockVersion │ │ │ ├── BlockVersionData │ │ │ ├── BlockVersionModifier │ │ │ ├── HashRaw │ │ │ ├── SoftforkRule │ │ │ ├── SoftwareVersion │ │ │ ├── SystemTag │ │ │ ├── UpAttributes │ │ │ ├── UpId │ │ │ ├── UpdateData │ │ │ ├── UpdatePayload │ │ │ ├── UpdateProof │ │ │ ├── UpdateProposal │ │ │ ├── UpdateProposalToSign │ │ │ ├── UpdateProposals │ │ │ ├── UpdateVote │ │ │ └── VoteId │ ├── canonical-json │ │ ├── GenesisData0_Legacy_HasNetworkMagic │ │ ├── GenesisData1_Legacy_HasNetworkMagic │ │ └── GenesisData2_Legacy_HasNetworkMagic │ ├── json │ │ ├── AttackTarget_NetworkAddressTarget │ │ ├── AttackTarget_PubKeyAddressTarget │ │ ├── GenesisProtocolConstants0_Legacy_HasNetworkMagic │ │ ├── GenesisProtocolConstants1_Legacy_HasNetworkMagic │ │ ├── GenesisProtocolConstants2_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSpec0_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSpec1_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSpec2_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSrc │ │ ├── TxValidationRulesConfig │ │ ├── TxpConfiguration0 │ │ ├── TxpConfiguration1 │ │ └── TxpConfiguration2 │ ├── oldCanonical-json │ │ ├── GenesisData0_Legacy_HasNetworkMagic │ │ ├── GenesisData1_Legacy_HasNetworkMagic │ │ └── GenesisData2_Legacy_HasNetworkMagic │ ├── oldJson │ │ ├── AttackTarget_NetworkAddressTarget │ │ ├── AttackTarget_PubKeyAddressTarget │ │ ├── GenesisProtocolConstants0_Legacy_HasNetworkMagic │ │ ├── GenesisProtocolConstants1_Legacy_HasNetworkMagic │ │ ├── GenesisProtocolConstants2_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSpec0_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSpec1_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSpec2_Legacy_HasNetworkMagic │ │ ├── StaticConfig_GCSrc │ │ ├── TxpConfiguration0 │ │ ├── TxpConfiguration1 │ │ └── TxpConfiguration2 │ └── yaml │ │ └── TxValidationRulesConfig │ └── test.hs ├── client ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-client.cabal ├── src │ └── Pos │ │ └── Client │ │ ├── KeyStorage.hs │ │ ├── Txp.hs │ │ ├── Txp │ │ ├── Addresses.hs │ │ ├── Balances.hs │ │ ├── History.hs │ │ ├── Network.hs │ │ └── Util.hs │ │ ├── Update.hs │ │ └── Update │ │ └── Network.hs └── test │ ├── Spec.hs │ ├── Test.hs │ └── Test │ └── Pos │ └── Client │ └── Txp │ ├── Mode.hs │ └── UtilSpec.hs ├── cluster ├── LICENSE ├── NOTICE ├── README.md ├── app │ ├── demo │ │ └── Main.hs │ └── prepare-environment │ │ └── Main.hs ├── cardano-sl-cluster.cabal ├── src │ └── Cardano │ │ ├── Cluster.hs │ │ └── Cluster │ │ ├── Environment.hs │ │ └── Util.hs └── test │ ├── Cardano │ └── Cluster │ │ ├── Environment │ │ ├── Arbitrary.hs │ │ └── Spec.hs │ │ └── Util │ │ ├── Arbitrary.hs │ │ └── Spec.hs │ └── Main.hs ├── core ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-core.cabal ├── src │ └── Pos │ │ ├── Core.hs │ │ └── Core │ │ ├── Aeson.hs │ │ ├── Aeson │ │ └── Orphans.hs │ │ ├── Attributes.hs │ │ ├── Binary.hs │ │ ├── Binary │ │ └── Orphans.hs │ │ ├── Chrono.hs │ │ ├── Common.hs │ │ ├── Common │ │ ├── AddrAttributes.hs │ │ ├── AddrSpendingData.hs │ │ ├── AddrStakeDistribution.hs │ │ ├── Address.hs │ │ ├── AddressHash.hs │ │ ├── BlockCount.hs │ │ ├── ChainDifficulty.hs │ │ ├── Coeff.hs │ │ ├── Coin.hs │ │ ├── CoinPortion.hs │ │ ├── Script.hs │ │ ├── SharedSeed.hs │ │ ├── SlotLeaders.hs │ │ ├── StakeholderId.hs │ │ ├── Stakes.hs │ │ ├── TxFeePolicy.hs │ │ └── TxSizeLinear.hs │ │ ├── Conc.hs │ │ ├── Constants.hs │ │ ├── Context.hs │ │ ├── Context │ │ └── PrimaryKey.hs │ │ ├── Exception.hs │ │ ├── JsonLog.hs │ │ ├── JsonLog │ │ ├── CanJsonLog.hs │ │ ├── Event.hs │ │ ├── JsonLogT.hs │ │ └── LogEvents.hs │ │ ├── Limits.hs │ │ ├── Merkle.hs │ │ ├── Metrics │ │ └── Constants.hs │ │ ├── NetworkAddress.hs │ │ ├── NetworkMagic.hs │ │ ├── ProtocolConstants.hs │ │ ├── Reporting.hs │ │ ├── Reporting │ │ ├── MemState.hs │ │ ├── Methods.hs │ │ └── Metrics.hs │ │ ├── Slotting.hs │ │ ├── Slotting │ │ ├── Class.hs │ │ ├── EpochIndex.hs │ │ ├── EpochOrSlot.hs │ │ ├── LocalSlotIndex.hs │ │ ├── MemState.hs │ │ ├── SlotCount.hs │ │ ├── SlotId.hs │ │ ├── TimeDiff.hs │ │ ├── Timestamp.hs │ │ ├── Types.hs │ │ └── Util.hs │ │ └── Util │ │ ├── LogSafe.hs │ │ └── TimeLimit.hs └── test │ ├── LICENSE │ ├── NOTICE │ ├── Setup.hs │ ├── Spec.hs │ ├── Test │ └── Pos │ │ └── Core │ │ ├── AddressSpec.hs │ │ ├── Arbitrary.hs │ │ ├── Arbitrary │ │ ├── Slotting.hs │ │ ├── Txp.hs │ │ └── Unsafe.hs │ │ ├── Bi.hs │ │ ├── CborSpec.hs │ │ ├── Chrono.hs │ │ ├── ChronoSpec.hs │ │ ├── CoinSpec.hs │ │ ├── Dummy.hs │ │ ├── ExampleHelpers.hs │ │ ├── Gen.hs │ │ ├── Json.hs │ │ ├── LimitsSpec.hs │ │ ├── SafeCopy.hs │ │ ├── SeedSpec.hs │ │ └── SlottingSpec.hs │ ├── cardano-sl-core-test.cabal │ ├── golden │ ├── AddrSpendingData_PubKey │ ├── AddrSpendingData_Redeem │ ├── AddrSpendingData_Script │ ├── AddrSpendingData_Unknown │ ├── AddrStakeDistribution_Bootstrap │ ├── AddrStakeDistribution_SingleKey │ ├── AddrStakeDistribution_UnsafeMultiKey │ ├── AddrType_PK │ ├── AddrType_R │ ├── AddrType_S │ ├── AddrType_U │ ├── Attributes │ ├── BlockCount │ ├── ChainDifficulty │ ├── Coeff │ ├── Coin │ ├── CoinPortion │ ├── EpochIndex │ ├── EpochOrSlotEI │ ├── EpochOrSlotSI │ ├── FlatSlotId │ ├── InvReqDataFlowLog_InvReqAccepted │ ├── InvReqDataFlowLog_InvReqException │ ├── InvReqDataFlowLog_InvReqRejected │ ├── LocalSlotIndex │ ├── MerkleRoot │ ├── MerkleTree │ ├── Script │ ├── ScriptVersion │ ├── SharedSeed │ ├── SlotCount │ ├── SlotId │ ├── SlotLeaders │ ├── StakeholderId │ ├── StakesList │ ├── StakesMap │ ├── TimeDiff │ ├── TimeStamp │ ├── TxFeePolicy_Linear │ ├── TxFeePolicy_Unknown │ ├── TxSizeLinear │ ├── bi │ │ ├── Address0 │ │ ├── Address1 │ │ ├── Address2 │ │ ├── Address3 │ │ └── Address4 │ ├── json │ │ ├── Address0 │ │ ├── Address1 │ │ ├── Address2 │ │ ├── Address3 │ │ └── Address4 │ └── safecopy │ │ ├── Address'0_Legacy_NoNetworkMagic │ │ ├── Address'1_Legacy_NoNetworkMagic │ │ ├── Address'2_Legacy_NoNetworkMagic │ │ ├── Address'3_Legacy_NoNetworkMagic │ │ ├── Address'4_Legacy_NoNetworkMagic │ │ ├── Address'5_HasNetworkMagic │ │ ├── Address'6_HasNetworkMagic │ │ ├── Address'7_HasNetworkMagic │ │ ├── Address0_Legacy_NoNetworkMagic │ │ ├── Address1_Legacy_NoNetworkMagic │ │ ├── Address2_Legacy_NoNetworkMagic │ │ ├── Address3_Legacy_NoNetworkMagic │ │ ├── Address4_Legacy_NoNetworkMagic │ │ ├── Address5_HasNetworkMagic │ │ ├── Address6_HasNetworkMagic │ │ └── Address7_HasNetworkMagic │ └── test.hs ├── crypto ├── LICENSE ├── NOTICE ├── Pos │ ├── Crypto.hs │ └── Crypto │ │ ├── Configuration.hs │ │ ├── Encryption.hs │ │ ├── HD.hs │ │ ├── Hashing.hs │ │ ├── Limits.hs │ │ ├── Orphans.hs │ │ ├── Random.hs │ │ ├── SafeCopy.hs │ │ ├── Scrypt.hs │ │ ├── SecretSharing.hs │ │ ├── Signing.hs │ │ └── Signing │ │ ├── Check.hs │ │ ├── Redeem.hs │ │ ├── Safe.hs │ │ ├── Signing.hs │ │ ├── Tag.hs │ │ ├── Types.hs │ │ └── Types │ │ ├── Redeem.hs │ │ ├── Safe.hs │ │ ├── Signing.hs │ │ └── Tag.hs ├── README.md ├── Setup.hs ├── cardano-sl-crypto.cabal ├── shell.nix └── test │ ├── LICENSE │ ├── NOTICE │ ├── Setup.hs │ ├── Spec.hs │ ├── Test │ └── Pos │ │ └── Crypto │ │ ├── Arbitrary.hs │ │ ├── Arbitrary │ │ └── Unsafe.hs │ │ ├── Bi.hs │ │ ├── CborSpec.hs │ │ ├── CryptoSpec.hs │ │ ├── CryptoSpec2.hs │ │ ├── Dummy.hs │ │ ├── Example.hs │ │ ├── Gen.hs │ │ └── Json.hs │ ├── cardano-sl-crypto-test.cabal │ ├── golden │ ├── AbstractHash │ ├── DecShare │ ├── EncShare │ ├── EncryptedSecretKey │ ├── HDAddressPayload │ ├── PassPhrase │ ├── ProxyCert │ ├── ProxySecretKey │ ├── ProxySignature │ ├── PublicKey │ ├── RedeemPublicKey │ ├── RedeemSecretKey │ ├── RedeemSignature │ ├── Secret │ ├── SecretKey │ ├── SecretProof │ ├── Signature │ ├── Signed │ ├── VssPublicKey │ ├── WithHash │ └── json │ │ ├── ProtocolMagic0_Legacy_HasNetworkMagic │ │ ├── ProtocolMagic1_Legacy_HasNetworkMagic │ │ ├── ProtocolMagic2_Legacy_HasNetworkMagic │ │ ├── ProtocolMagic_Legacy_NMMustBeJust │ │ └── ProtocolMagic_Legacy_NMMustBeNothing │ └── test.hs ├── db ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-db.cabal ├── shell.nix ├── src │ └── Pos │ │ ├── DB.hs │ │ └── DB │ │ ├── BatchOp.hs │ │ ├── Block.hs │ │ ├── Block │ │ ├── BListener.hs │ │ ├── Epoch.hs │ │ ├── GState │ │ │ ├── BlockExtra.hs │ │ │ └── SanityCheck.hs │ │ ├── Internal.hs │ │ ├── Load.hs │ │ ├── Logic │ │ │ ├── Creation.hs │ │ │ ├── Header.hs │ │ │ ├── Internal.hs │ │ │ ├── SplitByEpoch.hs │ │ │ ├── Types.hs │ │ │ ├── Util.hs │ │ │ └── VAR.hs │ │ ├── Lrc.hs │ │ └── Slog │ │ │ ├── Context.hs │ │ │ └── Logic.hs │ │ ├── BlockIndex.hs │ │ ├── Class.hs │ │ ├── Delegation.hs │ │ ├── Delegation │ │ ├── Cede │ │ │ ├── Holders.hs │ │ │ └── Logic.hs │ │ ├── Core.hs │ │ ├── Logic │ │ │ ├── Common.hs │ │ │ ├── Mempool.hs │ │ │ └── VAR.hs │ │ └── Var.hs │ │ ├── Epoch │ │ └── Index.hs │ │ ├── Error.hs │ │ ├── Functions.hs │ │ ├── GState │ │ ├── Common.hs │ │ ├── Lock.hs │ │ └── Stakes.hs │ │ ├── Lrc.hs │ │ ├── Lrc │ │ ├── Common.hs │ │ ├── Consumer.hs │ │ ├── Consumer │ │ │ ├── Delegation.hs │ │ │ ├── Ssc.hs │ │ │ └── Update.hs │ │ ├── Consumers.hs │ │ ├── Context.hs │ │ ├── Issuers.hs │ │ ├── Leaders.hs │ │ ├── Lrc.hs │ │ ├── Mode.hs │ │ ├── OBFT.hs │ │ ├── Richmen.hs │ │ ├── RichmenBase.hs │ │ └── Seed.hs │ │ ├── Misc │ │ └── Common.hs │ │ ├── Pure.hs │ │ ├── Rocks.hs │ │ ├── Rocks │ │ ├── Functions.hs │ │ └── Types.hs │ │ ├── Ssc.hs │ │ ├── Ssc │ │ ├── GState.hs │ │ ├── Logic.hs │ │ ├── Logic │ │ │ ├── Global.hs │ │ │ ├── Local.hs │ │ │ └── VAR.hs │ │ ├── SecretStorage.hs │ │ ├── State.hs │ │ └── State │ │ │ ├── Global.hs │ │ │ └── Local.hs │ │ ├── Sum.hs │ │ ├── Txp.hs │ │ ├── Txp │ │ ├── Logic.hs │ │ ├── Logic │ │ │ ├── Common.hs │ │ │ ├── Global.hs │ │ │ └── Local.hs │ │ ├── MemState.hs │ │ ├── MemState │ │ │ ├── Class.hs │ │ │ ├── Holder.hs │ │ │ ├── Metrics.hs │ │ │ └── Types.hs │ │ ├── Settings.hs │ │ ├── Stakes.hs │ │ └── Utxo.hs │ │ ├── Update.hs │ │ └── Update │ │ ├── Context.hs │ │ ├── GState.hs │ │ ├── GState │ │ └── Misc.hs │ │ ├── Logic.hs │ │ ├── Logic │ │ ├── Global.hs │ │ └── Local.hs │ │ ├── MemState.hs │ │ ├── MemState │ │ ├── Functions.hs │ │ └── Types.hs │ │ └── Poll │ │ ├── DBPoll.hs │ │ ├── Logic.hs │ │ ├── Logic │ │ ├── Apply.hs │ │ ├── Base.hs │ │ ├── Normalize.hs │ │ ├── Rollback.hs │ │ ├── Softfork.hs │ │ └── Version.hs │ │ ├── PollState.hs │ │ └── Pure.hs └── test │ ├── LICENSE │ ├── NOTICE │ ├── Setup.hs │ ├── Test │ └── Pos │ │ └── DB │ │ ├── Block │ │ ├── Arbitrary.hs │ │ └── Logic │ │ │ └── SplitByEpoch.hs │ │ ├── Epoch │ │ └── Index.hs │ │ ├── Functions.hs │ │ ├── Mode.hs │ │ └── Update │ │ ├── Arbitrary.hs │ │ ├── Arbitrary │ │ ├── MemState.hs │ │ └── Poll.hs │ │ └── Poll │ │ └── Logic │ │ └── Version.hs │ ├── cardano-sl-db-test.cabal │ └── test.hs ├── default.nix ├── docs ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── auxx.md ├── block-processing │ ├── overall.md │ ├── slog.md │ ├── txp.md │ ├── types.md │ ├── us-bv-states.png │ ├── us-proposal-states.png │ └── us.md ├── code-organisation-guidelines.md ├── configuration.md ├── databases.md ├── exceptions.md ├── exchange-onboarding.md ├── git │ ├── cheat-sheet.md │ └── getting-started.md ├── hd.md ├── how-to │ ├── README.md │ ├── bors.md │ ├── build-cardano-sl-and-daedalus-from-source-code.md │ ├── connect-to-cluster.md │ ├── demo-cluster.md │ ├── deploy-cluster.md │ ├── generate-blockchain.md │ ├── generate-genesis.md │ ├── launch-testnet.md │ ├── push-update-on-mainnet.md │ ├── rollback-blocks.md │ ├── run-explorer-web-ui.md │ ├── send-requests-to-explorer-api.md │ ├── send-requests-to-wallet-api.md │ ├── test-update-system-locally.md │ └── test-update-system.md ├── launcher.md ├── network │ ├── example-topologies │ │ ├── behind-nat-no-dns.yaml │ │ ├── behind-nat-with-dns.yaml │ │ ├── mainnet-staging.yaml │ │ ├── p2p.yaml │ │ ├── static-no-dns.yaml │ │ ├── static-with-dns.yaml │ │ └── traditional.yaml │ ├── policy.md │ ├── shelley │ │ ├── BlockRetrievalRecovery.md │ │ ├── CommunicationPatterns.md │ │ ├── CoreDIF.md │ │ ├── CoreDIF_Questions.md │ │ ├── DeltaQ.md │ │ ├── Discovery.md │ │ ├── Interface.hs │ │ ├── Interface.md │ │ ├── Serialization.md │ │ └── UI.md │ └── topology-configuration.md ├── new-dependency-policy.md ├── nix.md ├── on-the-wire │ ├── Makefile │ ├── README.md │ ├── binary.tex │ ├── current-spec.cddl │ ├── latexmkrc │ └── shell.nix ├── profiling.md ├── proposals │ ├── block-storage.md │ ├── csl-2104-crypto-scheme-changes-in-address.md │ ├── fast-sync │ │ └── README.md │ ├── serialization.md │ └── update-downloader.md ├── rollback-reaction.md ├── rules │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── latexmkrc │ ├── property-testing.org │ ├── rules.tex │ └── shell.nix ├── style-guide.md ├── tls-authentication.md └── tx │ ├── binary-format.md │ ├── processing.md │ └── signing.md ├── explorer ├── CHANGELOG.md ├── CODEOWNERS ├── LICENSE ├── Makefile ├── NOTICE ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── Setup.hs ├── bench │ ├── Bench │ │ └── Pos │ │ │ └── Explorer │ │ │ └── ServerBench.hs │ ├── Main.hs │ └── results │ │ └── ServerBackend.html ├── cardano-sl-explorer.cabal ├── frontend │ ├── .gitignore │ ├── .gitmodules │ ├── ARCHITECTURE.md │ ├── README.md │ ├── bower.json │ ├── default.nix │ ├── nix │ │ ├── bower-generated.nix │ │ ├── generate-frontend-deps.hs │ │ ├── purescript-derive-lenses.nix │ │ └── shell.nix │ ├── package.json │ ├── postcss.config.js │ ├── scripts │ │ ├── build-explorer-frontend.sh │ │ ├── build.sh │ │ └── generate-explorer-lenses.sh │ ├── shell.nix │ ├── src │ │ ├── Control │ │ │ └── SocketIO │ │ │ │ ├── Client.js │ │ │ │ └── Client.purs │ │ ├── Data │ │ │ └── Time │ │ │ │ ├── NominalDiffTime.Test.purs │ │ │ │ └── NominalDiffTime.purs │ │ ├── Explorer │ │ │ ├── Api │ │ │ │ ├── Helper.purs │ │ │ │ ├── Http.purs │ │ │ │ ├── Socket.Test.purs │ │ │ │ ├── Socket.purs │ │ │ │ └── Types.purs │ │ │ ├── I18n │ │ │ │ ├── DE.purs │ │ │ │ ├── EN.purs │ │ │ │ ├── JP.purs │ │ │ │ ├── Lang.js │ │ │ │ ├── Lang.purs │ │ │ │ └── Types.purs │ │ │ ├── Images.purs │ │ │ ├── Routes.Test.purs │ │ │ ├── Routes.purs │ │ │ ├── State.Test.purs │ │ │ ├── State.purs │ │ │ ├── Types │ │ │ │ ├── Actions.purs │ │ │ │ ├── App.purs │ │ │ │ └── State.purs │ │ │ ├── Update.Test.purs │ │ │ ├── Update.purs │ │ │ ├── Util │ │ │ │ ├── Config.Test.purs │ │ │ │ ├── Config.js │ │ │ │ ├── Config.purs │ │ │ │ ├── DOM.js │ │ │ │ ├── DOM.purs │ │ │ │ ├── Data.Test.purs │ │ │ │ ├── Data.purs │ │ │ │ ├── Factory.purs │ │ │ │ ├── QRCode.js │ │ │ │ ├── QRCode.purs │ │ │ │ ├── String.Test.purs │ │ │ │ ├── String.js │ │ │ │ ├── String.purs │ │ │ │ ├── Time.Test.purs │ │ │ │ └── Time.purs │ │ │ └── View │ │ │ │ ├── Address.purs │ │ │ │ ├── Block.purs │ │ │ │ ├── Blocks.purs │ │ │ │ ├── CSS.Test.purs │ │ │ │ ├── CSS.purs │ │ │ │ ├── Calculator.purs │ │ │ │ ├── Common.Test.purs │ │ │ │ ├── Common.purs │ │ │ │ ├── Dashboard │ │ │ │ ├── Api.purs │ │ │ │ ├── Blocks.purs │ │ │ │ ├── Dashboard.purs │ │ │ │ ├── Hero.purs │ │ │ │ ├── Lenses.purs │ │ │ │ ├── Network.purs │ │ │ │ ├── Offer.purs │ │ │ │ ├── Shared.purs │ │ │ │ ├── Transactions.purs │ │ │ │ ├── Types.purs │ │ │ │ ├── api.css │ │ │ │ ├── dashboard.css │ │ │ │ ├── hero.css │ │ │ │ └── transactions.css │ │ │ │ ├── Footer.purs │ │ │ │ ├── GenesisBlock.purs │ │ │ │ ├── Header.purs │ │ │ │ ├── Layout.purs │ │ │ │ ├── NotFound.purs │ │ │ │ ├── Playground.purs │ │ │ │ ├── Search.purs │ │ │ │ ├── Transaction.purs │ │ │ │ ├── Types.purs │ │ │ │ ├── address.css │ │ │ │ ├── block.css │ │ │ │ ├── blocks.css │ │ │ │ ├── calculator.css │ │ │ │ ├── common.css │ │ │ │ ├── footer.css │ │ │ │ ├── genesis.css │ │ │ │ ├── header.css │ │ │ │ ├── layout.css │ │ │ │ ├── notfound.css │ │ │ │ ├── search.css │ │ │ │ └── transaction.css │ │ ├── Lib │ │ │ ├── BigNumber │ │ │ │ ├── BigNumber.Test.purs │ │ │ │ ├── BigNumber.js │ │ │ │ └── BigNumber.purs │ │ │ └── Waypoints │ │ │ │ ├── Waypoints.js │ │ │ │ └── Waypoints.purs │ │ ├── Main.Test.purs │ │ ├── Main.purs │ │ ├── Test │ │ │ └── MockFactory.purs │ │ ├── global.css │ │ ├── index.css │ │ ├── index.js │ │ └── index.tpl.html │ ├── static │ │ ├── favicon.ico │ │ ├── favicon.svg │ │ ├── fonts │ │ │ ├── Montserrat-ExtraBold.otf │ │ │ ├── Montserrat-ExtraLight.otf │ │ │ ├── Montserrat-Medium.otf │ │ │ ├── Montserrat-SemiBold.otf │ │ │ ├── Montserrat-Thin.otf │ │ │ ├── MontserratAlternates-Black.otf │ │ │ ├── MontserratAlternates-Bold.otf │ │ │ ├── MontserratAlternates-ExtraBold.otf │ │ │ ├── MontserratAlternates-ExtraLight.otf │ │ │ ├── MontserratAlternates-Light.otf │ │ │ ├── MontserratAlternates-Medium.otf │ │ │ ├── MontserratAlternates-Regular.otf │ │ │ ├── MontserratAlternates-SemiBold.otf │ │ │ ├── MontserratAlternates-Thin.otf │ │ │ ├── montserrat-black_[allfont.ru].ttf │ │ │ ├── montserrat-bold_[allfont.ru].ttf │ │ │ ├── montserrat-hairline_[allfont.ru].ttf │ │ │ ├── montserrat-light_[allfont.ru].ttf │ │ │ └── montserrat_[allfont.ru].ttf │ │ └── images │ │ │ ├── ada-currency-symbol-dark.svg │ │ │ ├── ada-currency-symbol.svg │ │ │ ├── arrow-bottom.svg │ │ │ ├── arrow-right.svg │ │ │ ├── arrow-up.svg │ │ │ ├── cardano-logo-name.svg │ │ │ ├── cardano-logo.svg │ │ │ ├── header_300517.jpg │ │ │ ├── icon-cross.svg │ │ │ ├── icon-email.svg │ │ │ ├── icon-github.svg │ │ │ ├── icon-lang-de.svg │ │ │ ├── icon-lang-en.svg │ │ │ ├── icon-lang-ja.svg │ │ │ ├── icon-menu.svg │ │ │ ├── icon-search.svg │ │ │ ├── icon-twitter.svg │ │ │ ├── image-404.svg │ │ │ ├── iohk-logo.svg │ │ │ ├── transaction-arrow-blue.svg │ │ │ ├── triangle-right.svg │ │ │ └── usd-currency-symbol-dark.svg │ ├── test │ │ ├── rename-placeholders.js │ │ └── setup.js │ ├── webpack.config.babel.js │ └── yarn.lock ├── log-config.yaml ├── python-api │ ├── README.md │ ├── app.py │ ├── default.nix │ ├── explorer_python_api │ │ ├── ExplorerDumper.py │ │ ├── __init__.py │ │ ├── app.py │ │ ├── db-tables.sql │ │ ├── db.py │ │ ├── dump.py │ │ ├── explorer.py │ │ ├── logger.py │ │ └── pgtune.txt │ └── setup.py ├── scripts │ ├── build.sh │ ├── fetch_dependencies.sh │ ├── generate_cabal2nix.sh │ └── launch │ │ ├── qa.sh │ │ └── staging.sh ├── src │ ├── Pos │ │ └── Explorer │ │ │ ├── Aeson │ │ │ └── ClientTypes.hs │ │ │ ├── BListener.hs │ │ │ ├── Core.hs │ │ │ ├── Core │ │ │ └── Types.hs │ │ │ ├── DB.hs │ │ │ ├── ExplorerMode.hs │ │ │ ├── ExtraContext.hs │ │ │ ├── Socket.hs │ │ │ ├── Socket │ │ │ ├── App.hs │ │ │ ├── Holder.hs │ │ │ ├── Methods.hs │ │ │ └── Util.hs │ │ │ ├── TestUtil.hs │ │ │ ├── Txp.hs │ │ │ ├── Txp │ │ │ ├── Common.hs │ │ │ ├── Global.hs │ │ │ ├── Local.hs │ │ │ ├── Toil.hs │ │ │ └── Toil │ │ │ │ ├── Logic.hs │ │ │ │ ├── Monad.hs │ │ │ │ └── Types.hs │ │ │ ├── Web.hs │ │ │ └── Web │ │ │ ├── Api.hs │ │ │ ├── ClientTypes.hs │ │ │ ├── Error.hs │ │ │ ├── Server.hs │ │ │ ├── TestServer.hs │ │ │ └── Transform.hs │ ├── documentation │ │ └── Main.hs │ ├── explorer │ │ ├── ExplorerNodeOptions.hs │ │ └── Main.hs │ ├── mock │ │ └── Main.hs │ └── purescript │ │ ├── Main.hs │ │ ├── PSOptions.hs │ │ └── PSTypes.hs ├── start-dev.sh └── test │ ├── Spec.hs │ ├── Test.hs │ └── Test │ └── Pos │ └── Explorer │ ├── Arbitrary.hs │ ├── BListenerSpec.hs.unused │ ├── Identity │ └── BinarySpec.hs │ ├── MockFactory.hs │ ├── Socket │ ├── AppSpec.hs │ ├── MethodsSpec.hs │ └── UtilSpec.hs │ └── Web │ ├── ClientTypesSpec.hs │ └── ServerSpec.hs ├── faucet ├── LICENSE ├── NOTICE ├── Setup.hs ├── cardano-sl-faucet.cabal ├── frontend │ ├── default.nix │ └── index.html ├── logging.cfg ├── server │ └── Main.hs ├── src │ └── Cardano │ │ ├── Faucet.hs │ │ ├── Faucet │ │ ├── Endpoints.hs │ │ ├── Init.hs │ │ ├── Metrics.hs │ │ ├── Swagger.hs │ │ ├── Types.hs │ │ └── Types │ │ │ ├── API.hs │ │ │ ├── Config.hs │ │ │ └── Recaptcha.hs │ │ └── WalletClient.hs ├── test-config.json.template ├── test │ ├── Spec.hs │ ├── captcha-resp-err.json │ ├── captcha-resp-ok.json │ ├── multi-line-secret.txt │ └── valid-secret.txt └── wallet-source.json.template ├── generator ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── app │ └── VerificationBench.hs ├── bench │ ├── Bench │ │ └── Pos │ │ │ └── Criterion │ │ │ └── Block │ │ │ └── Logic.hs │ └── Main.hs ├── cardano-sl-generator.cabal ├── src │ ├── Pos │ │ ├── Generator.hs │ │ └── Generator │ │ │ ├── Block.hs │ │ │ ├── Block │ │ │ ├── Error.hs │ │ │ ├── Logic.hs │ │ │ ├── Mode.hs │ │ │ ├── Orphans.hs │ │ │ ├── Param.hs │ │ │ └── Payload.hs │ │ │ ├── BlockEvent.hs │ │ │ └── BlockEvent │ │ │ └── DSL.hs │ └── Test │ │ └── Pos │ │ └── Block │ │ └── Logic │ │ ├── Emulation.hs │ │ ├── Event.hs │ │ ├── Mode.hs │ │ └── Util.hs └── test │ ├── Spec.hs │ ├── Test.hs │ └── Test │ └── Pos │ ├── Binary │ └── CommunicationSpec.hs │ ├── Block │ ├── Logic │ │ ├── CreationSpec.hs │ │ └── VarSpec.hs │ └── Property.hs │ └── Generator │ └── Block │ └── LrcSpec.hs ├── infra ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-infra.cabal ├── default.nix ├── shell.nix ├── src │ └── Pos │ │ └── Infra │ │ ├── Communication │ │ ├── BiP.hs │ │ ├── Constants.hs │ │ ├── Limits │ │ │ └── Instances.hs │ │ ├── Listener.hs │ │ ├── Protocol.hs │ │ ├── Relay.hs │ │ ├── Relay │ │ │ ├── Class.hs │ │ │ ├── Logic.hs │ │ │ ├── Types.hs │ │ │ └── Util.hs │ │ ├── Specs.hs │ │ └── Types │ │ │ ├── Protocol.hs │ │ │ └── Relay.hs │ │ ├── Diffusion │ │ ├── Subscription │ │ │ ├── Common.hs │ │ │ ├── Dns.hs │ │ │ ├── Status.hs │ │ │ └── Subscriber.hs │ │ ├── Transport │ │ │ └── TCP.hs │ │ └── Types.hs │ │ ├── Discovery.hs │ │ ├── Discovery │ │ └── Model │ │ │ └── Class.hs │ │ ├── HealthCheck │ │ └── Route53.hs │ │ ├── InjectFail.hs │ │ ├── Network │ │ ├── CLI.hs │ │ ├── DnsDomains.hs │ │ ├── Policy.hs │ │ ├── Types.hs │ │ ├── Windows │ │ │ └── DnsDomains.hs │ │ └── Yaml.hs │ │ ├── Recovery │ │ ├── Info.hs │ │ └── Types.hs │ │ ├── Reporting.hs │ │ ├── Reporting │ │ ├── Ekg.hs │ │ ├── Exceptions.hs │ │ ├── Health │ │ │ └── Types.hs │ │ ├── Http.hs │ │ ├── Methods.hs │ │ ├── NodeInfo.hs │ │ ├── Statsd.hs │ │ └── Wlog.hs │ │ ├── Shutdown.hs │ │ ├── Shutdown │ │ ├── Class.hs │ │ ├── Logic.hs │ │ └── Types.hs │ │ ├── Slotting.hs │ │ ├── Slotting │ │ ├── Class.hs │ │ ├── Error.hs │ │ ├── Impl.hs │ │ ├── Impl │ │ │ ├── Simple.hs │ │ │ └── Util.hs │ │ ├── Types.hs │ │ └── Util.hs │ │ ├── StateLock.hs │ │ ├── Statistics.hs │ │ ├── Statistics │ │ ├── Ekg.hs │ │ └── Statsd.hs │ │ └── Util │ │ ├── JsonLog │ │ └── Events.hs │ │ ├── LogSafe.hs │ │ ├── Monitor.hs │ │ ├── SigHandler.hs │ │ ├── TimeLimit.hs │ │ └── TimeWarp.hs └── test │ ├── LICENSE │ ├── NOTICE │ ├── Setup.hs │ ├── Spec.hs │ ├── Test │ └── Pos │ │ └── Infra │ │ ├── Arbitrary.hs │ │ ├── Arbitrary │ │ ├── Communication.hs │ │ ├── Slotting.hs │ │ ├── Ssc.hs │ │ ├── Txp.hs │ │ └── Update.hs │ │ ├── Bi.hs │ │ ├── Diffusion │ │ └── Subscription │ │ │ ├── StatusSpec.hs │ │ │ └── SubscriptionSpec.hs │ │ ├── Gen.hs │ │ └── Json.hs │ ├── cardano-sl-infra-test.cabal │ ├── golden │ ├── HandlerSpec_ConvHandler │ ├── HandlerSpec_UnknownHandler │ ├── NodeMetadata │ ├── TopologyBehindNAT │ ├── TopologyP2P │ ├── TopologyStatic │ └── TopologyTraditional │ └── test.hs ├── lib.nix ├── lib ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── bench │ ├── Bench │ │ ├── Configuration.hs │ │ └── Pos │ │ │ ├── Criterion │ │ │ ├── FollowTheSatoshiBench.hs │ │ │ └── TxSigningBench.hs │ │ │ └── Diffusion │ │ │ └── BlockDownload.hs │ └── Local │ │ └── Criterion.hs ├── cardano-sl.cabal ├── configuration.yaml ├── default.nix ├── mainnet-ci-genesis.json ├── mainnet-genesis-dryrun-with-stakeholders.json ├── mainnet-genesis.json ├── mainnet-staging-short-epoch-genesis.json ├── shell.nix ├── shelley-staging-genesis.json ├── shelley-staging-short-genesis.json ├── src │ ├── Pos │ │ ├── AllSecrets.hs │ │ ├── Behavior.hs │ │ ├── Binary.hs │ │ ├── Binary │ │ │ └── Communication.hs │ │ ├── Client │ │ │ ├── CLI.hs │ │ │ └── CLI │ │ │ │ ├── NodeOptions.hs │ │ │ │ ├── Options.hs │ │ │ │ ├── Params.hs │ │ │ │ ├── Secrets.hs │ │ │ │ └── Util.hs │ │ ├── Communication.hs │ │ ├── Communication │ │ │ ├── Limits.hs │ │ │ ├── Server.hs │ │ │ └── Types.hs │ │ ├── Configuration.hs │ │ ├── Constants.hs │ │ ├── Context.hs │ │ ├── Context │ │ │ └── Context.hs │ │ ├── DB │ │ │ └── DB.hs │ │ ├── Diffusion │ │ │ ├── Full.hs │ │ │ └── Full │ │ │ │ ├── Block.hs │ │ │ │ ├── Delegation.hs │ │ │ │ ├── Ssc.hs │ │ │ │ ├── Txp.hs │ │ │ │ └── Update.hs │ │ ├── GState.hs │ │ ├── GState │ │ │ ├── Context.hs │ │ │ └── GState.hs │ │ ├── Launcher.hs │ │ ├── Launcher │ │ │ ├── Configuration.hs │ │ │ ├── Launcher.hs │ │ │ ├── Mode.hs │ │ │ ├── Param.hs │ │ │ ├── Resource.hs │ │ │ ├── Runner.hs │ │ │ └── Scenario.hs │ │ ├── Listener │ │ │ ├── Delegation.hs │ │ │ ├── Txp.hs │ │ │ └── Update.hs │ │ ├── Logic │ │ │ ├── Full.hs │ │ │ ├── Pure.hs │ │ │ └── Types.hs │ │ ├── Network │ │ │ ├── Block │ │ │ │ ├── Logic.hs │ │ │ │ ├── Retrieval.hs │ │ │ │ ├── RetrievalQueue.hs │ │ │ │ ├── Types.hs │ │ │ │ └── WorkMode.hs │ │ │ └── Update │ │ │ │ └── Download.hs │ │ ├── Node │ │ │ └── API.hs │ │ ├── Recovery.hs │ │ ├── Recovery │ │ │ └── Types.hs │ │ ├── Reporting │ │ │ └── Production.hs │ │ ├── Util │ │ │ ├── Config.hs │ │ │ ├── Example.hs │ │ │ ├── Jsend.hs │ │ │ ├── KnownSymbols.hs │ │ │ ├── OutboundQueue.hs │ │ │ ├── Pagination.hs │ │ │ ├── Servant.hs │ │ │ ├── Swagger.hs │ │ │ ├── UnitsOfMeasure.hs │ │ │ ├── UserKeyError.hs │ │ │ └── UserSecret.hs │ │ ├── Web.hs │ │ ├── Web │ │ │ ├── Api.hs │ │ │ ├── Mode.hs │ │ │ ├── Server.hs │ │ │ └── Types.hs │ │ ├── WorkMode.hs │ │ ├── WorkMode │ │ │ └── Class.hs │ │ ├── Worker.hs │ │ └── Worker │ │ │ ├── Block.hs │ │ │ ├── Delegation.hs │ │ │ ├── Ssc.hs │ │ │ └── Update.hs │ └── Test │ │ └── Pos │ │ ├── Configuration.hs │ │ └── Helpers.hs ├── test │ ├── Spec.hs │ ├── Test.hs │ ├── Test │ │ └── Pos │ │ │ ├── Block │ │ │ ├── Arbitrary │ │ │ │ └── Message.hs │ │ │ └── CborSpec.hs │ │ │ ├── Cbor │ │ │ ├── Arbitrary │ │ │ │ └── UserSecret.hs │ │ │ └── CborSpec.hs │ │ │ ├── ConstantsSpec.hs │ │ │ ├── Diffusion │ │ │ └── BlockSpec.hs │ │ │ ├── Genesis │ │ │ └── CanonicalSpec.hs │ │ │ ├── Infra │ │ │ └── Slotting │ │ │ │ └── TypesSpec.hs │ │ │ ├── Launcher │ │ │ ├── Configuration.hs │ │ │ ├── ConfigurationSpec.hs │ │ │ ├── Gen.hs │ │ │ └── Json.hs │ │ │ ├── MerkleSpec.hs │ │ │ ├── Slotting │ │ │ └── TypesSpec.hs │ │ │ ├── Ssc │ │ │ ├── ComputeSharesSpec.hs │ │ │ ├── Identity │ │ │ │ └── SafeCopySpec.hs │ │ │ ├── SeedSpec.hs │ │ │ ├── Toss │ │ │ │ ├── BaseSpec.hs │ │ │ │ └── PureSpec.hs │ │ │ └── VssCertDataSpec.hs │ │ │ ├── Types │ │ │ └── Identity │ │ │ │ ├── SafeCopySpec.hs │ │ │ │ └── ShowReadSpec.hs │ │ │ └── Update │ │ │ ├── Identity │ │ │ └── SafeCopySpec.hs │ │ │ ├── MemStateSpec.hs │ │ │ └── PollSpec.hs │ └── golden │ │ └── json │ │ └── Configuration_Legacy_NoNetworkMagicField └── testnet-genesis.json ├── log-configs ├── cluster.yaml ├── connect-to-cluster.yaml ├── daedalus.yaml ├── greppable.yaml └── template-demo.yaml ├── mnemonic ├── LICENSE ├── NOTICE ├── README.md ├── cardano-sl-mnemonic.cabal ├── generate-mnemonic │ └── Main.hs ├── src │ └── Cardano │ │ └── Mnemonic.hs └── test │ ├── Cardano │ └── MnemonicSpec.hs │ └── Main.hs ├── networking ├── LICENSE ├── NOTICE ├── QUEUE_METRICS.md ├── README.md ├── bench │ ├── LogReader │ │ ├── LogReaderOptions.hs │ │ └── Main.hs │ ├── Receiver │ │ ├── Main.hs │ │ └── ReceiverOptions.hs │ ├── Sender │ │ ├── Main.hs │ │ └── SenderOptions.hs │ ├── calc-template.ods │ ├── launch.sh │ └── logging.yaml ├── cardano-sl-networking.cabal ├── examples │ └── PingPong.hs ├── src │ ├── Bench │ │ └── Network │ │ │ └── Commons.hs │ ├── Data │ │ └── NonEmptySet.hs │ ├── Network │ │ ├── Broadcast │ │ │ ├── OutboundQueue.hs │ │ │ └── OutboundQueue │ │ │ │ ├── ConcurrentMultiQueue.hs │ │ │ │ ├── Demo.hs │ │ │ │ └── Types.hs │ │ └── QDisc │ │ │ ├── Fair.hs │ │ │ └── Simulation.hs │ ├── Node.hs │ ├── Node │ │ ├── Conversation.hs │ │ ├── Internal.hs │ │ ├── Message │ │ │ ├── Binary.hs │ │ │ ├── Class.hs │ │ │ └── Decoder.hs │ │ └── Util │ │ │ └── Monitor.hs │ └── Ntp │ │ ├── Client.hs │ │ ├── Packet.hs │ │ └── Util.hs └── test │ ├── Spec.hs │ ├── Test.hs │ └── Test │ ├── Network │ └── Broadcast │ │ └── OutboundQueueSpec.hs │ ├── NodeSpec.hs │ ├── NtpSpec.hs │ └── Util.hs ├── nix ├── .stack.nix │ ├── acid-state-exts.nix │ ├── acid-state.nix │ ├── canonical-json.nix │ ├── cardano-crypto.nix │ ├── cardano-report-server.nix │ ├── cardano-sl-auxx.nix │ ├── cardano-sl-binary-test.nix │ ├── cardano-sl-binary.nix │ ├── cardano-sl-chain-test.nix │ ├── cardano-sl-chain.nix │ ├── cardano-sl-client.nix │ ├── cardano-sl-cluster.nix │ ├── cardano-sl-core-test.nix │ ├── cardano-sl-core.nix │ ├── cardano-sl-crypto-test.nix │ ├── cardano-sl-crypto.nix │ ├── cardano-sl-db-test.nix │ ├── cardano-sl-db.nix │ ├── cardano-sl-explorer.nix │ ├── cardano-sl-faucet.nix │ ├── cardano-sl-generator.nix │ ├── cardano-sl-infra-test.nix │ ├── cardano-sl-infra.nix │ ├── cardano-sl-mnemonic.nix │ ├── cardano-sl-networking.nix │ ├── cardano-sl-node-ipc.nix │ ├── cardano-sl-node.nix │ ├── cardano-sl-script-runner.nix │ ├── cardano-sl-tools-post-mortem.nix │ ├── cardano-sl-tools.nix │ ├── cardano-sl-util-test.nix │ ├── cardano-sl-util.nix │ ├── cardano-sl-utxo.nix │ ├── cardano-sl-x509.nix │ ├── cardano-sl.nix │ ├── cardano-wallet.nix │ ├── clock.nix │ ├── default.nix │ ├── engine-io-wai.nix │ ├── engine-io.nix │ ├── hedgehog.nix │ ├── inspector.nix │ ├── ip.nix │ ├── kademlia.nix │ ├── log-warper.nix │ ├── network-transport-tcp.nix │ ├── network-transport.nix │ ├── rocksdb-haskell-ng.nix │ ├── serokell-util.nix │ ├── socket-io.nix │ ├── time-units.nix │ ├── universum.nix │ └── yaml-validation.nix ├── acceptance │ └── default.nix ├── cardano-sl-config.nix ├── commit-id.nix ├── config.nix ├── daedalus-bridge.nix ├── docker.nix ├── iohk-binary-cache.nix ├── iohk-common.nix ├── iohk-nix-src.json ├── launch │ ├── connect-to-cluster │ │ └── default.nix │ ├── demo-cluster │ │ ├── default.nix │ │ └── make-topology.nix │ └── proposal-ui │ │ └── default.nix ├── nix-tools.nix ├── patches │ ├── cardano-sl.patch │ └── libiserv-network-3.patch ├── pkgs.nix ├── regenerate.sh ├── scripts.nix ├── sources.json ├── sources.nix ├── tests.nix ├── tests │ ├── swaggerSchemaValidation.nix │ └── yamlValidation.nix └── update-iohk-nix.sh ├── nixos-tests ├── default.nix └── wallet-api.nix ├── node-ipc ├── LICENSE ├── NOTICE ├── Setup.hs ├── cardano-sl-node-ipc.cabal ├── server.js ├── shell.nix ├── src │ └── Cardano │ │ └── NodeIPC.hs └── wallet-topology.yaml ├── node ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── app │ └── Main.hs ├── cardano-sl-node.cabal ├── src │ └── Cardano │ │ └── Node │ │ ├── API.hs │ │ ├── API │ │ └── Swagger.hs │ │ ├── Client.hs │ │ ├── Manager.hs │ │ └── NodeStateAdaptor.hs └── test │ ├── Chain │ ├── Abstract.hs │ ├── Abstract │ │ ├── FinitelySupportedFunction.hs │ │ ├── Repartition.hs │ │ └── Translate │ │ │ ├── FromUTxO.hs │ │ │ ├── Policies.hs │ │ │ └── ToCardano.hs │ └── Policy.hs │ ├── ChainExtension.hs │ ├── Infrastructure │ └── Generator.hs │ ├── Spec.hs │ └── Translation.hs ├── pkgs ├── cryptonite-segfault-blake.patch ├── default.nix ├── generate.sh ├── hfsevents.nix └── regen.nix ├── release.nix ├── sample-wallet-config.nix ├── script-runner ├── BlockParser.hs ├── LICENSE ├── NOTICE ├── README.md ├── Setup.hs ├── TestCases.hs ├── cardano-sl-script-runner.cabal ├── common │ ├── AutomatedTestRunner.hs │ ├── BrickUI.hs │ ├── BrickUITypes.hs │ ├── NodeControl.hs │ ├── OrphanedLenses.hs │ ├── PocMode.hs │ └── Types.hs ├── log-config.yaml ├── runtest.nix ├── shell.nix ├── stack-gui ├── stack-test ├── topology-local.yaml ├── topology-mainnet.yaml ├── topology-staging.yaml ├── topology-testnet.yaml └── topology.yaml ├── scripts ├── README.md ├── analyze │ ├── block-events.sh │ └── logs.hs ├── avvm-files │ ├── avvm-utxo.json │ └── utxo-dump-last-new.json ├── bench │ ├── buildbench.sh │ ├── count_tps_sent.sh │ ├── count_tps_written.sh │ ├── runbench.sh │ └── topology │ │ ├── kademlia4.yaml │ │ ├── kademlia5.yaml │ │ ├── topology.yaml │ │ ├── topology0.yaml │ │ ├── topology1.yaml │ │ ├── topology2.yaml │ │ ├── topology3.yaml │ │ ├── topology4.yaml │ │ └── topology5.yaml ├── build │ └── cardano-sl.sh ├── check-stack2nix.sh ├── check_deps.sh ├── ci │ ├── appveyor-retry.cmd │ ├── check-hydra.sh │ ├── update-cli-docs.sh │ ├── update-explorer-web-api-docs.sh │ ├── update-haddock.sh │ └── update-wallet-web-api-docs.sh ├── clean │ ├── all.sh │ ├── db.sh │ └── explorer-bridge.sh ├── common-functions.sh ├── generate │ └── certificates.sh ├── grep.sh ├── hash-installer.sh ├── haskell │ ├── dependencies.hs │ ├── git-pre-commit-hook │ ├── lint.sh │ ├── recover-from-stack-clean.sh │ ├── stylish.sh │ └── update-cabal-versions.sh ├── js │ ├── avvm-utxo-to-yaml.js │ ├── genesis-hash.js │ └── package.json ├── launch │ ├── Test.hs │ ├── auxx.sh │ ├── connect-to-cluster │ │ ├── README.md │ │ └── mainnet-staging.sh │ ├── daedalus-example.sh │ ├── demo-nix.sh │ ├── explorer-with-nodes.sh │ ├── explorer.sh │ ├── ui-simulator.sh │ └── us-test.sh ├── package-dep-graph.sh ├── policies │ ├── policy_core.yaml │ ├── policy_edge_exchange.yaml │ ├── policy_edge_nat.yaml │ ├── policy_edge_p2p.yaml │ ├── policy_relay.yaml │ └── policy_script-runner.yaml ├── prepare-genesis │ ├── README.md │ ├── build-cardano.sh │ ├── default.nix │ ├── gen-avvm-seeds.sh │ ├── gen-delegate-keys.sh │ ├── genesis-prep-test.sh │ └── keys-and-certs.sh ├── set-git-rev │ ├── default.nix │ └── set-git-rev.hs ├── set_nixpath.sh ├── test │ ├── hlint.nix │ ├── shellcheck.nix │ ├── stylish.nix │ └── wallet │ │ ├── many-addrs-test.sh │ │ ├── many-tx-test.sh │ │ └── swaggerSchemaValidation.nix ├── tls-files │ ├── ca.crt │ ├── ca.pem │ ├── client.crt │ ├── client.pem │ ├── server.crt │ ├── server.key │ └── server.pem └── workflow │ └── merge_master.sh ├── secrets └── mainnet-staging-short-epoch │ ├── generated-keys │ ├── dlg-issuers │ │ ├── key0.sk │ │ ├── key1.sk │ │ └── key2.sk │ └── rich │ │ ├── key0.sk │ │ ├── key1.sk │ │ └── key2.sk │ └── keys-fakeavvm │ ├── fake-0.seed │ ├── fake-1.seed │ ├── fake-2.seed │ ├── fake-3.seed │ └── fake-4.seed ├── shell.nix ├── stack.yaml ├── tools ├── LICENSE ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-tools.cabal ├── post-mortem │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── cardano-sl-tools-post-mortem.cabal │ └── src │ │ ├── JSONLog.hs │ │ ├── Main.hs │ │ ├── Options.hs │ │ ├── Statistics.hs │ │ ├── Statistics │ │ ├── Block.hs │ │ ├── CSV.hs │ │ ├── Chart.hs │ │ ├── Focus.hs │ │ ├── Graph.hs │ │ ├── MemPool.hs │ │ ├── Report.hs │ │ ├── Throughput.hs │ │ └── Tx.hs │ │ ├── Types.hs │ │ └── Util │ │ ├── Aeson.hs │ │ ├── Pipes.hs │ │ └── Safe.hs ├── src │ ├── Pos │ │ └── Tools │ │ │ └── Launcher │ │ │ ├── Environment.hs │ │ │ └── Logging.hs │ ├── addr-convert │ │ └── Main.hs │ ├── blockchain-analyser │ │ ├── Main.hs │ │ ├── Options.hs │ │ ├── Rendering.hs │ │ └── Types.hs │ ├── cli-docs │ │ └── Main.hs │ ├── gencerts │ │ ├── Main.hs │ │ ├── README.md │ │ └── configuration.yaml.example │ ├── genesis-hash │ │ └── Main.hs │ ├── genupdate │ │ └── Main.hs │ ├── keygen │ │ ├── Dump.hs │ │ ├── KeygenOptions.hs │ │ └── Main.hs │ ├── launcher │ │ ├── Main.hs │ │ └── launcher-config.yaml │ ├── topology-gen │ │ └── Main.hs │ ├── validate-json │ │ ├── README.md │ │ ├── __init__.py │ │ ├── default.nix │ │ ├── setup.py │ │ ├── swagger-meta-2.0.json │ │ └── validate_json.py │ └── wallet-extractor │ │ └── Main.hs └── test │ ├── Spec.hs │ ├── Test.hs │ ├── Test │ └── Pos │ │ └── Tools │ │ └── Launcher │ │ └── Environment.hs │ └── golden │ ├── AccountSpec │ ├── AddressRange │ ├── DistributionAmount │ ├── FakeTxsHistory │ ├── FakeUtxoCoinDistribution │ ├── GenSpec │ └── WalletSpec ├── util ├── LICENSE ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl-util.cabal ├── default.nix ├── src │ └── Pos │ │ ├── Util.hs │ │ └── Util │ │ ├── AssertMode.hs │ │ ├── CompileInfo.hs │ │ ├── CompileInfoGit.hs │ │ ├── Concurrent.hs │ │ ├── Concurrent │ │ ├── PriorityLock.hs │ │ └── RWLock.hs │ │ ├── Filesystem.hs │ │ ├── Future.hs │ │ ├── Json │ │ ├── Canonical.hs │ │ └── Parse.hs │ │ ├── Justify.hs │ │ ├── LRU.hs │ │ ├── Lens.hs │ │ ├── Log.hs │ │ ├── Log │ │ ├── Internal.hs │ │ ├── LogSafe.hs │ │ ├── LoggerConfig.hs │ │ ├── LoggerName.hs │ │ ├── Rotator.hs │ │ ├── Scribes.hs │ │ ├── Severity.hs │ │ └── Structured.hs │ │ ├── LoggerName.hs │ │ ├── Modifier.hs │ │ ├── OptParse.hs │ │ ├── Orphans.hs │ │ ├── Queue.hs │ │ ├── Some.hs │ │ ├── Timer.hs │ │ ├── Trace.hs │ │ ├── Trace │ │ ├── Named.hs │ │ └── Unstructured.hs │ │ ├── Util.hs │ │ ├── Wlog.hs │ │ └── Wlog │ │ └── Compatibility.hs └── test │ ├── LICENSE │ ├── NOTICE │ ├── Setup.hs │ ├── Spec.hs │ ├── Test │ ├── Pos.hs │ └── Pos │ │ └── Util │ │ ├── Base16.hs │ │ ├── Gen.hs │ │ ├── Golden.hs │ │ ├── LogSpec.hs │ │ ├── LogStructuredSpec.hs │ │ ├── Modifier.hs │ │ ├── ModifierSpec.hs │ │ ├── Orphans.hs │ │ ├── Parallel │ │ └── Parallelize.hs │ │ ├── QuickCheck.hs │ │ ├── QuickCheck │ │ ├── Arbitrary.hs │ │ └── Property.hs │ │ ├── TimerSpec.hs │ │ ├── TraceSpec.hs │ │ ├── Tripping.hs │ │ └── WlogSpec.hs │ ├── cardano-sl-util-test.cabal │ └── test.hs ├── utxo ├── ChangeLog.md ├── LICENSE ├── NOTICE ├── Setup.hs ├── cardano-sl-utxo.cabal └── src │ ├── Data │ └── Validated.hs │ └── UTxO │ ├── Bootstrap.hs │ ├── Context.hs │ ├── Crypto.hs │ ├── DSL.hs │ ├── Generator.hs │ ├── IntTrans.hs │ ├── Translate.hs │ ├── Util.hs │ └── Verify.hs ├── wallet ├── .editorconfig ├── .github │ ├── ISSUE_TEMPLATE │ │ ├── adr.md │ │ └── bug_report.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── images │ │ └── cardano-logo.png │ └── iohk-signature.gif ├── .gitignore ├── .hlint.yaml ├── .stylish-haskell.yaml ├── .travis.yml ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── Setup.hs ├── cardano-sl.yaml ├── cardano-wallet.cabal ├── generate-swagger-file │ ├── Main.hs │ └── README.md ├── integration.tix ├── server │ └── Main.hs ├── shell.nix ├── src │ └── Cardano │ │ └── Wallet │ │ ├── API.hs │ │ ├── API │ │ ├── Indices.hs │ │ ├── Internal.hs │ │ ├── Internal │ │ │ └── Handlers.hs │ │ ├── Request.hs │ │ ├── Request │ │ │ ├── Filter.hs │ │ │ ├── Pagination.hs │ │ │ ├── Parameters.hs │ │ │ └── Sort.hs │ │ ├── Response.hs │ │ ├── Response │ │ │ ├── Filter │ │ │ │ └── IxSet.hs │ │ │ ├── JSend.hs │ │ │ └── Sort │ │ │ │ └── IxSet.hs │ │ ├── Types.hs │ │ ├── Types │ │ │ └── UnitOfMeasure.hs │ │ ├── V1.hs │ │ └── V1 │ │ │ ├── Accounts.hs │ │ │ ├── Addresses.hs │ │ │ ├── Errors.hs │ │ │ ├── Generic.hs │ │ │ ├── Handlers.hs │ │ │ ├── Handlers │ │ │ ├── Accounts.hs │ │ │ ├── Addresses.hs │ │ │ ├── Info.hs │ │ │ ├── Settings.hs │ │ │ ├── Transactions.hs │ │ │ └── Wallets.hs │ │ │ ├── Headers.hs │ │ │ ├── Info.hs │ │ │ ├── Internal │ │ │ └── Update.hs │ │ │ ├── LegacyHandlers │ │ │ └── Settings.hs │ │ │ ├── Parameters.hs │ │ │ ├── ReifyWalletError.hs │ │ │ ├── Settings.hs │ │ │ ├── Swagger.hs │ │ │ ├── Swagger │ │ │ └── Example.hs │ │ │ ├── Transactions.hs │ │ │ ├── Types.hs │ │ │ └── Wallets.hs │ │ ├── Action.hs │ │ ├── Client.hs │ │ ├── Client │ │ └── Http.hs │ │ ├── Kernel.hs │ │ ├── Kernel │ │ ├── Accounts.hs │ │ ├── Actions.hs │ │ ├── Addresses.hs │ │ ├── BListener.hs │ │ ├── CoinSelection.hs │ │ ├── CoinSelection │ │ │ ├── FromGeneric.hs │ │ │ ├── Generic.hs │ │ │ └── Generic │ │ │ │ ├── Fees.hs │ │ │ │ ├── Grouped.hs │ │ │ │ ├── LargestFirst.hs │ │ │ │ └── Random.hs │ │ ├── DB │ │ │ ├── AcidState.hs │ │ │ ├── BlockContext.hs │ │ │ ├── BlockMeta.hs │ │ │ ├── Compression.hs │ │ │ ├── HdWallet.hs │ │ │ ├── HdWallet │ │ │ │ ├── Create.hs │ │ │ │ ├── Delete.hs │ │ │ │ ├── Derivation.hs │ │ │ │ ├── Read.hs │ │ │ │ └── Update.hs │ │ │ ├── InDb.hs │ │ │ ├── Read.hs │ │ │ ├── Resolved.hs │ │ │ ├── Spec.hs │ │ │ ├── Spec │ │ │ │ ├── Pending.hs │ │ │ │ ├── Read.hs │ │ │ │ └── Update.hs │ │ │ ├── Sqlite.hs │ │ │ ├── TxMeta.hs │ │ │ ├── TxMeta │ │ │ │ └── Types.hs │ │ │ ├── Updates.hs │ │ │ └── Util │ │ │ │ ├── AcidState.hs │ │ │ │ ├── IxSet.hs │ │ │ │ └── Zoomable.hs │ │ ├── Decrypt.hs │ │ ├── Diffusion.hs │ │ ├── Internal.hs │ │ ├── Invariants.hs │ │ ├── Keystore.hs │ │ ├── Migration.hs │ │ ├── Mode.hs │ │ ├── NodeStateAdaptor.hs │ │ ├── Pending.hs │ │ ├── PrefilterTx.hs │ │ ├── Read.hs │ │ ├── Restore.hs │ │ ├── Submission.hs │ │ ├── Submission │ │ │ └── Worker.hs │ │ ├── Transactions.hs │ │ ├── Types.hs │ │ ├── Util │ │ │ ├── Core.hs │ │ │ ├── NonEmptyMap.hs │ │ │ ├── Strict.hs │ │ │ ├── StrictList.hs │ │ │ ├── StrictNonEmpty.hs │ │ │ └── StrictStateT.hs │ │ └── Wallets.hs │ │ ├── Server.hs │ │ ├── Server │ │ ├── CLI.hs │ │ ├── Middlewares.hs │ │ ├── Plugins.hs │ │ └── Plugins │ │ │ └── AcidState.hs │ │ ├── TypeLits.hs │ │ ├── Types │ │ └── UtxoStatistics.hs │ │ ├── Util.hs │ │ ├── WalletLayer.hs │ │ └── WalletLayer │ │ ├── ExecutionTimeLimit.hs │ │ ├── Kernel.hs │ │ ├── Kernel │ │ ├── Accounts.hs │ │ ├── Active.hs │ │ ├── Addresses.hs │ │ ├── Conv.hs │ │ ├── Info.hs │ │ ├── Internal.hs │ │ ├── Settings.hs │ │ ├── Transactions.hs │ │ └── Wallets.hs │ │ └── README.md ├── stack.yaml ├── test │ ├── integration │ │ ├── .gitkeep │ │ ├── Main.hs │ │ ├── README.md │ │ ├── Test │ │ │ └── Integration │ │ │ │ ├── Documentation.hs │ │ │ │ ├── Framework │ │ │ │ ├── Cluster.hs │ │ │ │ ├── DSL.hs │ │ │ │ ├── Request.hs │ │ │ │ └── Scenario.hs │ │ │ │ └── Scenario │ │ │ │ ├── Accounts.hs │ │ │ │ ├── Addresses.hs │ │ │ │ ├── Node.hs │ │ │ │ ├── Transactions.hs │ │ │ │ └── Wallets.hs │ │ └── configuration.yaml │ ├── manual │ │ └── .gitkeep │ ├── nightly │ │ ├── Main.hs │ │ └── TxMetaStorage.hs │ └── unit │ │ ├── API │ │ ├── MarshallingSpec.hs │ │ ├── RequestSpec.hs │ │ └── SwaggerSpec.hs │ │ ├── Arbitrary.hs │ │ ├── Golden │ │ ├── APILayout.hs │ │ ├── WalletError.hs │ │ └── golden │ │ │ ├── JSONValidationError_JSONValidationFailed │ │ │ ├── MigrationError_MigrationFailed │ │ │ ├── UnsupportedMimeTypeError_UnsupportedMimeTypePresent │ │ │ ├── WalletError_AddressNotFound │ │ │ ├── WalletError_CannotCreateAddress │ │ │ ├── WalletError_InvalidAddressFormat │ │ │ ├── WalletError_InvalidPublicKey │ │ │ ├── WalletError_MissingRequiredParams │ │ │ ├── WalletError_NodeIsStillSyncing │ │ │ ├── WalletError_NotEnoughMoneyAvailableBalanceIsInsufficient │ │ │ ├── WalletError_NotEnoughMoneyCannotCoverFee │ │ │ ├── WalletError_OutputIsRedeem │ │ │ ├── WalletError_SignedTxSubmitError │ │ │ ├── WalletError_TooBigTransaction │ │ │ ├── WalletError_TxFailedToStabilize │ │ │ ├── WalletError_TxRedemptionDepleted │ │ │ ├── WalletError_TxSafeSignerNotFound │ │ │ ├── WalletError_UnknownError │ │ │ ├── WalletError_UnsignedTxCreationError │ │ │ ├── WalletError_WalletAlreadyExists │ │ │ ├── WalletError_WalletIsNotReadyToProcessPayments │ │ │ ├── WalletError_WalletNotFound │ │ │ └── api-layout.txt │ │ ├── InputSelection │ │ ├── Evaluation.hs │ │ ├── Evaluation │ │ │ ├── Events.hs │ │ │ ├── Generic.hs │ │ │ ├── Options.hs │ │ │ ├── Replot.hs │ │ │ └── TimeSeries.hs │ │ ├── FromGeneric.hs │ │ ├── SortedUtxo.hs │ │ └── TxStats.hs │ │ ├── Main.hs │ │ ├── Test │ │ ├── Infrastructure │ │ │ ├── Generator.hs │ │ │ └── Genesis.hs │ │ └── Spec │ │ │ ├── Accounts.hs │ │ │ ├── AddressPool.hs │ │ │ ├── AddressPoolGap.hs │ │ │ ├── Addresses.hs │ │ │ ├── BlockMetaScenarios.hs │ │ │ ├── CoinSelection.hs │ │ │ ├── CoinSelection │ │ │ └── Generators.hs │ │ │ ├── DeltaCompression.hs │ │ │ ├── Fixture.hs │ │ │ ├── GetTransactions.hs │ │ │ ├── Kernel.hs │ │ │ ├── Keystore.hs │ │ │ ├── Models.hs │ │ │ ├── NewPayment.hs │ │ │ ├── Submission.hs │ │ │ ├── Translation.hs │ │ │ ├── TxMetaScenarios.hs │ │ │ ├── TxMetaStorage.hs │ │ │ ├── WalletWorker.hs │ │ │ └── Wallets.hs │ │ ├── UTxO │ │ └── ToCardano │ │ │ └── Interpreter.hs │ │ ├── Util │ │ ├── Buildable.hs │ │ ├── Buildable │ │ │ ├── Hspec.hs │ │ │ └── QuickCheck.hs │ │ ├── Distr.hs │ │ ├── GenHash.hs │ │ ├── Histogram.hs │ │ ├── MultiSet.hs │ │ ├── QuickCheck.hs │ │ └── Range.hs │ │ └── Wallet │ │ ├── Abstract.hs │ │ ├── Basic.hs │ │ ├── Incremental.hs │ │ ├── Inductive.hs │ │ ├── Inductive │ │ ├── Cardano.hs │ │ ├── ExtWalletEvent.hs │ │ ├── Generator.hs │ │ ├── History.hs │ │ ├── Interpreter.hs │ │ ├── Invariants.hs │ │ └── Validation.hs │ │ ├── Prefiltered.hs │ │ └── Rollback │ │ ├── Basic.hs │ │ └── Full.hs └── topology-examples │ └── testnet.yaml ├── x509 ├── LICENSE ├── NOTICE ├── README.md ├── cardano-sl-x509.cabal ├── configuration.yaml.example ├── src │ ├── Cardano │ │ └── X509 │ │ │ └── Configuration.hs │ └── Data │ │ └── X509 │ │ └── Extra.hs └── test │ ├── Main.hs │ └── Test │ └── Cardano │ └── X509 │ ├── Configuration.hs │ └── Configuration │ └── Arbitrary.hs └── yaml-validation ├── Main.hs └── yaml-validation.cabal /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [Makefile] 12 | indent_style = tab 13 | indent_size = 8 14 | 15 | [*.hs] 16 | indent_size = 4 17 | max_line_length = 80 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # GitHub Linguist annotations. 2 | # Hide nix/.stack.nix/*.nix 3 | # That is stuff that is generated by nix-tools stack-to-nix 4 | 5 | nix/.stack.nix/*.nix linguist-generated=true 6 | .stack-to-nix.cache linguist-generated=true 7 | nix/.stack-pkgs.nix linguist-generated=true 8 | -------------------------------------------------------------------------------- /.hindent.yaml: -------------------------------------------------------------------------------- 1 | indent-size: 4 2 | line-length: 80 3 | force-trailing-newline: true 4 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Input Output (Hong Kong) Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /acid-state-exts/README.md: -------------------------------------------------------------------------------- 1 | # `acid-state-exts` 2 | 3 | Some extensions to `acid-state` initially written by Serokell. 4 | They have been factored out into this package for use in `cardano-sl`. 5 | -------------------------------------------------------------------------------- /acid-state-exts/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | image: Visual Studio 2015 3 | 4 | build: off 5 | 6 | test_script: 7 | - ps: echo "No Longer Used, windows binaries cross compiled in hydra" 8 | -------------------------------------------------------------------------------- /auxx/Makefile: -------------------------------------------------------------------------------- 1 | help: ## Print documentation 2 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 3 | 4 | ghcid: ## Run ghcid with the cardano-sl-auxx package 5 | ghcid \ 6 | --command "stack ghci cardano-sl-auxx --ghci-options=-fno-code" 7 | 8 | ghcid-test: ## Have ghcid run the test suite on successful recompile 9 | ghcid \ 10 | --command "stack ghci cardano-sl-auxx:lib cardano-sl-auxx:test:cardano-auxx-test --ghci-options=-fobject-code" \ 11 | --test "Main.main" 12 | 13 | .PHONY: ghcid ghcid-test help 14 | -------------------------------------------------------------------------------- /auxx/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Input Output (Hong Kong) Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /auxx/README.md: -------------------------------------------------------------------------------- 1 | # cardano-sl-auxx 2 | 3 | This package implements a tool and language for connecting to Cardano SL node 4 | running locally and performing operations like inspecting the node's state and 5 | sending commands to the node. 6 | 7 | It is documented more fully in the file [docs/auxx.md] of the git repository. 8 | -------------------------------------------------------------------------------- /auxx/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /auxx/src/Command.hs: -------------------------------------------------------------------------------- 1 | -- | Command. 2 | 3 | module Command 4 | ( module Command.BlockGen 5 | , module Command.Help 6 | , module Command.Proc 7 | , module Command.Rollback 8 | , module Command.Tx 9 | , module Command.TyProjection 10 | , module Command.Update 11 | ) where 12 | 13 | import Command.BlockGen 14 | import Command.Help 15 | import Command.Proc 16 | import Command.Rollback 17 | import Command.Tx 18 | import Command.TyProjection 19 | import Command.Update 20 | -------------------------------------------------------------------------------- /auxx/test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} 2 | -------------------------------------------------------------------------------- /auxx/test/Test.hs: -------------------------------------------------------------------------------- 1 | import Universum 2 | 3 | import Test.Hspec (hspec) 4 | 5 | import Spec (spec) 6 | 7 | main :: IO () 8 | main = hspec spec 9 | -------------------------------------------------------------------------------- /auxx/test/Test/Auxx/Lang/ParserSpec.hs: -------------------------------------------------------------------------------- 1 | module Test.Auxx.Lang.ParserSpec 2 | ( spec 3 | ) where 4 | 5 | import Universum 6 | 7 | import Test.Hspec (Expectation, Spec, describe, it, shouldSatisfy) 8 | 9 | import Lang.Parser (parse) 10 | 11 | spec :: Spec 12 | spec = describe "Auxx.Lang.Parser" $ do 13 | it "handles sample-1" unitParserSample1 14 | 15 | unitParserSample1 :: Expectation 16 | unitParserSample1 = parse input `shouldSatisfy` isRight 17 | where 18 | input = "wait (epoch 6);; propose-patak kek:15 \"lel\" mem:(epoch 7) zaz:(get (rekt mem: to-next ses: \"zaz\" ))" 19 | -------------------------------------------------------------------------------- /binary/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Input Output (Hong Kong) Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /binary/README.md: -------------------------------------------------------------------------------- 1 | # cardano-sl-binary 2 | 3 | Binary serialisation and deserialisation for Cardano SL. 4 | 5 | This library is built on top of the [binary] and [cborg] packages and implement 6 | space efficient serialising and deserialising of Haskell data types to and from 7 | binary representations via a `Bi` type class and associated machinery. 8 | 9 | The library includes ability the derive `Bi` instances (requires a `Typeable` 10 | constraint). 11 | 12 | [binary]: https://hackage.haskell.org/package/binary 13 | [cborg]: https://hackage.haskell.org/package/cborg 14 | -------------------------------------------------------------------------------- /binary/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /binary/src/Pos/Binary/Class.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -Wno-unused-imports #-} 2 | {-# OPTIONS_GHC -Wno-dodgy-exports #-} 3 | 4 | module Pos.Binary.Class 5 | ( module Pos.Binary.Class.Core 6 | , module Pos.Binary.Class.Primitive 7 | , module Pos.Binary.Class.TH 8 | ) where 9 | 10 | import Pos.Binary.Class.Core 11 | import Pos.Binary.Class.Primitive 12 | import Pos.Binary.Class.TH 13 | -------------------------------------------------------------------------------- /binary/test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} 2 | -------------------------------------------------------------------------------- /binary/test/golden/TestSimpleIndexed1: -------------------------------------------------------------------------------- 1 | 00: 83068306830264f0a5b2b264f181a48b 2 | 10: 8204811b2b2a532ff2876ba1830264f2 3 | 20: 97bc8c64f2aa83ba 4 | -------------------------------------------------------------------------------- /binary/test/golden/TestSimpleIndexed2: -------------------------------------------------------------------------------- 1 | 00: 83068306830264f387a09064f489bba0 2 | 10: 8306830264f0b88fb164f4848f888201 3 | 20: 9f1b07311d2d7939272f1b2b0c8c405c 4 | 30: 0e8e3c1b2a07099ad0952d273b18df61 5 | 40: bcb490a7dc3b38236a76175bb823ff83 6 | 50: 0564f099a59a64f1a891b0 7 | -------------------------------------------------------------------------------- /binary/test/golden/TestSimpleIndexed3: -------------------------------------------------------------------------------- 1 | 00: 83068203c34a6d1914fff090beabc44b 2 | 10: 82001b000f0ede417a505f 3 | -------------------------------------------------------------------------------- /binary/test/golden/TestSimpleIndexed4: -------------------------------------------------------------------------------- 1 | 00: 8306830264f09cbcb464f486baa98306 2 | 10: 8204811b1d436b0eb5e90fb583068203 3 | 20: c34a9be0913b92f5a2edd8a283068200 4 | 30: 1b53245398189d8af982003b69041e5e 5 | 40: d4785f55 6 | -------------------------------------------------------------------------------- /binary/test/test.hs: -------------------------------------------------------------------------------- 1 | import Universum 2 | 3 | import Test.Hspec (hspec) 4 | 5 | import Spec (spec) 6 | 7 | import qualified Test.Pos.Binary.BiSerialize 8 | import qualified Test.Pos.Binary.BiSizeBounds 9 | import Test.Pos.Util.Tripping (runTests) 10 | 11 | main :: IO () 12 | main = do 13 | hspec spec 14 | runTests 15 | [ Test.Pos.Binary.BiSerialize.tests 16 | , Test.Pos.Binary.BiSizeBounds.tests 17 | ] 18 | -------------------------------------------------------------------------------- /bors.toml: -------------------------------------------------------------------------------- 1 | status = [ 2 | # Hydra: Aggregate job from release.nix 3 | "ci/hydra:Cardano:cardano-sl:required", 4 | 5 | # Buildkite: stack2nix checks, etc. 6 | "buildkite/cardano-sl", 7 | 8 | # Windows: builds are too unreliable to use at present 9 | # "continuous-integration/appveyor/branch", 10 | ] 11 | timeout_sec = 7200 12 | required_approvals = 1 13 | cut_body_after = "## Type of change" 14 | delete_merged_branches = true 15 | block_labels = [ "DO NOT MERGE", "wip" ] 16 | -------------------------------------------------------------------------------- /cabal.project: -------------------------------------------------------------------------------- 1 | packages: 2 | */*.cabal 3 | */test/*.cabal 4 | -------------------------------------------------------------------------------- /chain/Makefile: -------------------------------------------------------------------------------- 1 | help: ## Print documentation 2 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 3 | 4 | ghcid: ## Run ghcid with the cardano-sl-chain package 5 | ghcid \ 6 | --command "stack ghci cardano-sl-chain --ghci-options=-fno-code" 7 | 8 | ghcid-test: ## Have ghcid run the chain-test test suite on successful recompile 9 | ghcid \ 10 | --command "stack ghci cardano-sl-chain:lib cardano-sl-chain:test:chain-test --ghci-options=-fobject-code" \ 11 | --test "Main.main" 12 | 13 | .PHONY: ghcid ghcid-test help 14 | -------------------------------------------------------------------------------- /chain/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /chain/shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | self = import ../. {}; 3 | in (self.nix-tools.shellFor { 4 | name = "cardano-chain"; 5 | packages = ps: [ ps.cardano-sl-chain ]; 6 | }) 7 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Block/Logic.hs: -------------------------------------------------------------------------------- 1 | -- | This module re-exports everything from 'Pos.Chain.Block.Logic.*'. 2 | module Pos.Chain.Block.Logic 3 | ( module Pos.Chain.Block.Logic.Integrity 4 | ) where 5 | 6 | import Pos.Chain.Block.Logic.Integrity 7 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Block/Slog.hs: -------------------------------------------------------------------------------- 1 | -- | You can treat this part as another block component which deals 2 | -- with all data not related directly to any other component, while 3 | -- another part of 'Pos.Chain.Block' is dedicated to whole blocks. 4 | 5 | module Pos.Chain.Block.Slog 6 | ( module Pos.Chain.Block.Slog.Types 7 | ) where 8 | 9 | import Pos.Chain.Block.Slog.Types 10 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Delegation.hs: -------------------------------------------------------------------------------- 1 | -- | Reexport module 2 | 3 | module Pos.Chain.Delegation 4 | ( module X 5 | ) where 6 | 7 | import Pos.Chain.Delegation.Cede as X 8 | import Pos.Chain.Delegation.Class as X 9 | import Pos.Chain.Delegation.Configuration as X 10 | import Pos.Chain.Delegation.HeavyDlgIndex as X 11 | import Pos.Chain.Delegation.LightDlgIndices as X 12 | import Pos.Chain.Delegation.Payload as X 13 | import Pos.Chain.Delegation.Proof as X 14 | import Pos.Chain.Delegation.Types as X 15 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Delegation/Cede.hs: -------------------------------------------------------------------------------- 1 | -- | Re-exports of everything from 'Pos.Chain.Delegation.Cede*'. 2 | 3 | module Pos.Chain.Delegation.Cede 4 | ( module Pos.Chain.Delegation.Cede.Class 5 | , module Pos.Chain.Delegation.Cede.Types 6 | ) where 7 | 8 | import Pos.Chain.Delegation.Cede.Class 9 | import Pos.Chain.Delegation.Cede.Types 10 | 11 | 12 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Delegation/Proof.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Delegation.Proof 2 | ( DlgProof 3 | , mkDlgProof 4 | ) where 5 | 6 | import Pos.Crypto (Hash, hash) 7 | 8 | import Pos.Chain.Delegation.Payload 9 | 10 | -- | Proof of delegation payload. 11 | type DlgProof = Hash DlgPayload 12 | 13 | -- | Creates 'DlgProof' out of delegation payload. 14 | mkDlgProof :: DlgPayload -> DlgProof 15 | mkDlgProof = hash 16 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Genesis/Hash.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Rank2Types #-} 2 | 3 | module Pos.Chain.Genesis.Hash 4 | ( GenesisHash (..) 5 | ) where 6 | 7 | import Pos.Crypto.Hashing (Hash) 8 | 9 | newtype GenesisHash = GenesisHash { getGenesisHash :: forall a . Hash a } 10 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Lrc.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Lrc 2 | ( module X 3 | ) where 4 | 5 | import Pos.Chain.Lrc.Core as X 6 | import Pos.Chain.Lrc.Error as X 7 | import Pos.Chain.Lrc.Fts as X 8 | import Pos.Chain.Lrc.Genesis as X 9 | import Pos.Chain.Lrc.OBFT as X 10 | import Pos.Chain.Lrc.RichmenComponent as X 11 | import Pos.Chain.Lrc.Types as X 12 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Security.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Security 2 | ( module X 3 | ) where 4 | 5 | import Pos.Chain.Security.Params as X 6 | import Pos.Chain.Security.Util as X 7 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Ssc/Error.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Ssc.Error 2 | ( module Pos.Chain.Ssc.Error.Seed 3 | , module Pos.Chain.Ssc.Error.Verify 4 | ) where 5 | 6 | import Pos.Chain.Ssc.Error.Seed 7 | import Pos.Chain.Ssc.Error.Verify 8 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Ssc/Opening.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Ssc.Opening 2 | ( Opening (..) 3 | ) where 4 | 5 | import Universum 6 | 7 | import Data.SafeCopy (base, deriveSafeCopySimple) 8 | 9 | import Pos.Binary.Class (AsBinary, Bi (..)) 10 | import Pos.Crypto (Secret) 11 | 12 | -- | Opening reveals secret. 13 | newtype Opening = Opening 14 | { getOpening :: AsBinary Secret 15 | } deriving (Show, Eq, Generic, Buildable, NFData) 16 | 17 | instance Bi Opening where 18 | encode = encode . getOpening 19 | decode = Opening <$> decode 20 | 21 | deriveSafeCopySimple 0 'base ''Opening 22 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Ssc/OpeningsMap.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Ssc.OpeningsMap 2 | ( OpeningsMap 3 | ) where 4 | 5 | import Universum 6 | 7 | import Pos.Core.Common (StakeholderId) 8 | 9 | import Pos.Chain.Ssc.Opening 10 | 11 | type OpeningsMap = HashMap StakeholderId Opening 12 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Ssc/Toss.hs: -------------------------------------------------------------------------------- 1 | -- | Toss abstraction and logic. 2 | module Pos.Chain.Ssc.Toss 3 | ( module Pos.Chain.Ssc.Toss.Base 4 | , module Pos.Chain.Ssc.Toss.Class 5 | , module Pos.Chain.Ssc.Toss.Logic 6 | , module Pos.Chain.Ssc.Toss.Pure 7 | , module Pos.Chain.Ssc.Toss.Types 8 | ) where 9 | 10 | import Pos.Chain.Ssc.Toss.Base 11 | import Pos.Chain.Ssc.Toss.Class 12 | import Pos.Chain.Ssc.Toss.Logic 13 | import Pos.Chain.Ssc.Toss.Pure 14 | import Pos.Chain.Ssc.Toss.Types 15 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Txp/Toil.hs: -------------------------------------------------------------------------------- 1 | -- | Toil is a pure part of transaction processing. 2 | 3 | module Pos.Chain.Txp.Toil 4 | ( module Pos.Chain.Txp.Toil.Failure 5 | , module Pos.Chain.Txp.Toil.Logic 6 | , module Pos.Chain.Txp.Toil.Monad 7 | , module Pos.Chain.Txp.Toil.Types 8 | , module Pos.Chain.Txp.Toil.Utxo 9 | ) where 10 | 11 | import Pos.Chain.Txp.Toil.Failure 12 | import Pos.Chain.Txp.Toil.Logic 13 | import Pos.Chain.Txp.Toil.Monad 14 | import Pos.Chain.Txp.Toil.Types 15 | import Pos.Chain.Txp.Toil.Utxo 16 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Txp/Toil/Utxo.hs: -------------------------------------------------------------------------------- 1 | -- | Utxo functionality re-exports. 2 | 3 | module Pos.Chain.Txp.Toil.Utxo 4 | ( module Pos.Chain.Txp.Toil.Utxo.Functions 5 | , module Pos.Chain.Txp.Toil.Utxo.Util 6 | ) where 7 | 8 | import Pos.Chain.Txp.Toil.Utxo.Functions 9 | import Pos.Chain.Txp.Toil.Utxo.Util 10 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Txp/Undo.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Txp.Undo 2 | ( TxpUndo 3 | , TxUndo 4 | ) where 5 | 6 | import Universum 7 | 8 | import Pos.Chain.Txp.TxOutAux 9 | 10 | type TxpUndo = [TxUndo] 11 | 12 | -- | Particular undo needed for transactions 13 | -- Just means we know transaction input, hence know TxOutAux corresponding to it, 14 | -- Nothing otherwise. 15 | type TxUndo = NonEmpty (Maybe TxOutAux) 16 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Update/Params.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Update.Params 2 | ( UpdateParams(..) 3 | ) where 4 | 5 | import Universum 6 | 7 | data UpdateParams = UpdateParams 8 | { -- | Path to update installer executable, downloaded by update system 9 | upUpdatePath :: !FilePath 10 | , -- | If `True` then use installer update mechanism 11 | upUpdateWithPkg :: !Bool 12 | , -- | List of update server URLs 13 | upUpdateServers :: ![Text] 14 | } 15 | deriving (Show) 16 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Update/Poll.hs: -------------------------------------------------------------------------------- 1 | -- | Poll is an abstraction used for verifying data used in US. 2 | 3 | module Pos.Chain.Update.Poll 4 | ( module Pos.Chain.Update.Poll.Class 5 | , module Pos.Chain.Update.Poll.Failure 6 | , module Pos.Chain.Update.Poll.Modifier 7 | , module Pos.Chain.Update.Poll.Types 8 | ) where 9 | 10 | import Pos.Chain.Update.Poll.Class 11 | import Pos.Chain.Update.Poll.Failure 12 | import Pos.Chain.Update.Poll.Modifier 13 | import Pos.Chain.Update.Poll.Types 14 | -------------------------------------------------------------------------------- /chain/src/Pos/Chain/Update/Proof.hs: -------------------------------------------------------------------------------- 1 | module Pos.Chain.Update.Proof 2 | ( UpdateProof 3 | , mkUpdateProof 4 | ) where 5 | 6 | import Pos.Crypto (Hash, hash) 7 | 8 | import Pos.Chain.Update.Payload 9 | 10 | -- | Proof that body of update message contains 'UpdatePayload'. 11 | type UpdateProof = Hash UpdatePayload 12 | 13 | mkUpdateProof :: UpdatePayload -> UpdateProof 14 | mkUpdateProof = hash 15 | -------------------------------------------------------------------------------- /chain/test/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /chain/test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} 2 | -------------------------------------------------------------------------------- /chain/test/Test/Pos/Chain/Ssc/CborSpec.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeApplications #-} 2 | 3 | module Test.Pos.Chain.Ssc.CborSpec 4 | ( spec 5 | ) where 6 | 7 | import Universum 8 | 9 | import Test.Hspec (Spec, describe) 10 | 11 | import Pos.Chain.Ssc (VssCertificate) 12 | 13 | import Test.Pos.Binary.Helpers (binaryTest) 14 | import Test.Pos.Chain.Ssc.Arbitrary () 15 | 16 | spec :: Spec 17 | spec = describe "Cbor Bi instances" $ binaryTest @VssCertificate 18 | -------------------------------------------------------------------------------- /chain/test/Test/Pos/Chain/Txp/Arbitrary/Unsafe.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -fno-warn-orphans #-} 2 | 3 | -- | 'Arbitrary' unsafe instances for some types from Txp types 4 | 5 | module Test.Pos.Chain.Txp.Arbitrary.Unsafe () where 6 | 7 | import Universum 8 | 9 | import Pos.Chain.Txp (TxOut (..)) 10 | 11 | import Test.Pos.Core.Arbitrary.Unsafe () 12 | import Test.Pos.Util.QuickCheck.Arbitrary (ArbitraryUnsafe (..)) 13 | 14 | instance ArbitraryUnsafe TxOut where 15 | arbitraryUnsafe = TxOut <$> arbitraryUnsafe <*> arbitraryUnsafe 16 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/BlockBodyAttributes: -------------------------------------------------------------------------------- 1 | a0 -------------------------------------------------------------------------------- /chain/test/golden/bi/block/BlockHeaderAttributes: -------------------------------------------------------------------------------- 1 | a0 -------------------------------------------------------------------------------- /chain/test/golden/bi/block/BlockHeader_Genesis: -------------------------------------------------------------------------------- 1 | 00: 820085005820f7077d40c94a36e7df95 2 | 10: b6f99a86f08bcf06ea3b24e68dd30393 3 | 20: 33fa53141775582074840ea4e9e28b2f 4 | 30: 906a1530270131bc5ab07106024d6f9c 5 | 40: 8f4773e478c343a2820b810081a0 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/BlockSignature: -------------------------------------------------------------------------------- 1 | 00: 8200584067d583469c7bb28c232d5cea 2 | 10: 2d04f4d21c5d36ab25925c7e339c69f2 3 | 20: 29b5c86ccaa76fa4f7641f36d0489c3e 4 | 30: 691db8393b86ce1b13e19d5c12816a68 5 | 40: 7daf0b0c 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/GenesisBlockHeader: -------------------------------------------------------------------------------- 1 | 00: 85005820f7077d40c94a36e7df95b6f9 2 | 10: 9a86f08bcf06ea3b24e68dd3039333fa 3 | 20: 53141775582074840ea4e9e28b2f906a 4 | 30: 1530270131bc5ab07106024d6f9c8f47 5 | 40: 73e478c343a2820b810081a0 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/GenesisBody: -------------------------------------------------------------------------------- 1 | 00: 9f581c5125b558daa14b5338e904cc2a 2 | 10: 75a8b7b3a4738de9cb28a6819576db58 3 | 20: 1cd25597dd7d416ff91e12c8ca78c6bc 4 | 30: 9a1327cc56119969a7d18ea921581c66 5 | 40: 79321696358dac9d16cf8befe4adf181 6 | 50: 8096fd2a329c200fc2ebcfff 7 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/GenesisConsensusData: -------------------------------------------------------------------------------- 1 | 820e8119270f -------------------------------------------------------------------------------- /chain/test/golden/bi/block/GenesisProof: -------------------------------------------------------------------------------- 1 | 00: 582074840ea4e9e28b2f906a15302701 2 | 10: 31bc5ab07106024d6f9c8f4773e478c3 3 | 20: 43a2 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/HeaderHash: -------------------------------------------------------------------------------- 1 | 00: 5820125bbf1daefc2897d8db48999d09 2 | 10: b4eae439f0dfed83bc43246ca039fa4b 3 | 20: 1213 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/MainConsensusData: -------------------------------------------------------------------------------- 1 | 00: 84820b182f58404b6d7977346c445345 2 | 10: 3553346653483665744e6f756958657a 3 | 20: 4379456a4b63337447346a61306b466a 4 | 30: 4f38717a616932365a4d5055454a6645 5 | 40: 7931356f78356b8119270f8200584067 6 | 50: d583469c7bb28c232d5cea2d04f4d21c 7 | 60: 5d36ab25925c7e339c69f229b5c86cca 8 | 70: a76fa4f7641f36d0489c3e691db8393b 9 | 80: 86ce1b13e19d5c12816a687daf0b0c 10 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/MainExtraBodyData: -------------------------------------------------------------------------------- 1 | 81a0 -------------------------------------------------------------------------------- /chain/test/golden/bi/block/MainExtraHeaderData: -------------------------------------------------------------------------------- 1 | 00: 84830101018266476f6c64656e1863a0 2 | 10: 58204ba92aa320c60acc9ad7b9a64f2e 3 | 20: da55c4d2ec28e604faf186708b4f0c4e 4 | 30: 8edf 5 | -------------------------------------------------------------------------------- /chain/test/golden/bi/block/MainProof: -------------------------------------------------------------------------------- 1 | 00: 8483182058205e46ceb20538afeeb45c 2 | 10: b8f7030512af34b4ff363a8c7e94d441 3 | 20: a257500ffab75820e32c9549bc3acbe0 4 | 30: e848b2d7ad26331b7d8497580364cb2b 5 | 40: c6c8bda9aa0975b883005820006a4a2b 6 | 50: 269afe61e894701640d1ca59639d92af 7 | 60: 3095814f9836143bd5d40b9658209fbb 8 | 70: b2f0eff7472fe19e462fd88c495ac90f 9 | 80: 9ad58c4dd6cb204515710b0fe1325820 10 | 90: b5f2d3cb5a94d3e7dc9d812ebf56003e 11 | a0: 4f9fb02296034f5d5bcd073811ebe6b3 12 | b0: 5820a9d2e0af73f175d0eab5d96c8b48 13 | c0: 0edfa8226f4c2a9037d637f6aa3cd9f3 14 | d0: b575 15 | -------------------------------------------------------------------------------- /chain/test/golden/bi/delegation/HeavyDlgIndex: -------------------------------------------------------------------------------- 1 | 05 -------------------------------------------------------------------------------- /chain/test/golden/bi/delegation/LightDlgIndices: -------------------------------------------------------------------------------- 1 | 82071858 -------------------------------------------------------------------------------- /chain/test/golden/bi/delegation/ProxySKBlockInfo_Nothing: -------------------------------------------------------------------------------- 1 | 80 -------------------------------------------------------------------------------- /chain/test/golden/bi/delegation/ProxySKHeavy: -------------------------------------------------------------------------------- 1 | 00: 840558404a30754b446269376936644c 2 | 10: 586b756573565a394a6648676a726374 3 | 20: 734c4674324e766f76586e6368734f76 4 | 30: 58303559364c6f686c544e74356d6b50 5 | 40: 4668556f58404b6d7977346c44534535 6 | 50: 53346653483665744e6f756958657a43 7 | 60: 79456a4b63337447346a61306b466a4f 8 | 70: 38717a616932365a4d5055454a664579 9 | 80: 31356f78356b5840feccc189c702707f 10 | 90: 3a71d772559cebaee1a60c0eb99a9c28 11 | a0: f3ad22b6a69db65cdc913016f20133f4 12 | b0: f52f8074b75f7f678cf165f411a53609 13 | c0: 2404c536762f470a 14 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/CommitmentSignature: -------------------------------------------------------------------------------- 1 | 00: 58407803232dd492dacd3c0f7c5401a5 2 | 10: 77a4bfa2891cf5c9da07134ac2414522 3 | 20: c51b397e183602768910747ca3f2e065 4 | 30: f14a625b278cc2d8b3bca5bae84bbab6 5 | 40: bb03 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/Opening: -------------------------------------------------------------------------------- 1 | 00: 58235821026a8923b61ed176f49b726f 2 | 10: d5c1c06d0ce7433e3be82030a5c85e54 3 | 20: 8d0b0a3082 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/OpeningsMap: -------------------------------------------------------------------------------- 1 | 00: a1581c5125b558daa14b5338e904cc2a 2 | 10: 75a8b7b3a4738de9cb28a6819576db58 3 | 20: 235821026a8923b61ed176f49b726fd5 4 | 30: c1c06d0ce7433e3be82030a5c85e548d 5 | 40: 0b0a3082 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/SharesDistribution: -------------------------------------------------------------------------------- 1 | 00: a1581c5125b558daa14b5338e904cc2a 2 | 10: 75a8b7b3a4738de9cb28a6819576db19 3 | 20: 0539 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/SscProof_CertificatesProof: -------------------------------------------------------------------------------- 1 | 00: 820358209fbbb2f0eff7472fe19e462f 2 | 10: d88c495ac90f9ad58c4dd6cb20451571 3 | 20: 0b0fe132 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/SscProof_CommitmentsProof: -------------------------------------------------------------------------------- 1 | 00: 83005820006a4a2b269afe61e8947016 2 | 10: 40d1ca59639d92af3095814f9836143b 3 | 20: d5d40b9658209fbbb2f0eff7472fe19e 4 | 30: 462fd88c495ac90f9ad58c4dd6cb2045 5 | 40: 15710b0fe132 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/SscProof_OpeningsProof: -------------------------------------------------------------------------------- 1 | 00: 830158205d5c70f2397c29b3f064b84f 2 | 10: b53dcef6813e4033dd9cc6f313a482e2 3 | 20: 4ec102d658209fbbb2f0eff7472fe19e 4 | 30: 462fd88c495ac90f9ad58c4dd6cb2045 5 | 40: 15710b0fe132 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/SscProof_SharesProof: -------------------------------------------------------------------------------- 1 | 00: 8302582036e799e376b8a5bc0127b933 2 | 10: dcef926c56d30f00b1d717c498b6f23d 3 | 20: 4f2c4e5558209fbbb2f0eff7472fe19e 4 | 30: 462fd88c495ac90f9ad58c4dd6cb2045 5 | 40: 15710b0fe132 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/VssCertificate: -------------------------------------------------------------------------------- 1 | 00: 845823582103e5bb5c7fcea0440ba972 2 | 10: f98efffc38927db6c79d5b92d9ea41ec 3 | 20: f8ca10c32a310b58408a71f0f263c8c3 4 | 30: d8cc25a013b47d1a9535e8521fcdee95 5 | 40: 4ef552c894f482f7f9ad0ea977259ca4 6 | 50: 9a4dde3cd74421ccf2902fb4d02b3507 7 | 60: b040447f0bd724300e5840644c586b75 8 | 70: 6573565a394a6648676a726374734c46 9 | 80: 74324e766f76586e6368734f76583035 10 | 90: 59364c6f686c544e74356d6b50466855 11 | a0: 6f587531455a534a544979 12 | -------------------------------------------------------------------------------- /chain/test/golden/bi/ssc/VssCertificatesHash: -------------------------------------------------------------------------------- 1 | 00: 58209fbbb2f0eff7472fe19e462fd88c 2 | 10: 495ac90f9ad58c4dd6cb204515710b0f 3 | 20: e132 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/HashTx: -------------------------------------------------------------------------------- 1 | 00: 58204ba839c420b3d2bd439530f891ca 2 | 10: e9a5d4c4d812044630dac72e8e0962fe 3 | 20: eecc 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/Tx: -------------------------------------------------------------------------------- 1 | 00: 839f8200d81858258258204ba839c420 2 | 10: b3d2bd439530f891cae9a5d4c4d81204 3 | 20: 4630dac72e8e0962feeecc182fff9f82 4 | 30: 82d818582183581caa5372095aaa680d 5 | 40: 19d4ca496983a145709c3be18b0d4c83 6 | 50: cb7bdc5ea0001a32dc988e182fffa0 7 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxAttributes: -------------------------------------------------------------------------------- 1 | a0 -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxId: -------------------------------------------------------------------------------- 1 | 00: 58204ba839c420b3d2bd439530f891ca 2 | 10: e9a5d4c4d812044630dac72e8e0962fe 3 | 20: eecc 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxInList: -------------------------------------------------------------------------------- 1 | 00: 9f8200d81858258258204ba839c420b3 2 | 10: d2bd439530f891cae9a5d4c4d8120446 3 | 20: 30dac72e8e0962feeecc182fff 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxInWitness_PkWitness: -------------------------------------------------------------------------------- 1 | 00: 8200d81858858258404b6d7977346c44 2 | 10: 53453553346653483665744e6f756958 3 | 20: 657a4379456a4b63337447346a61306b 4 | 30: 466a4f38717a616932365a4d5055454a 5 | 40: 66457931356f78356b5840688aad857b 6 | 50: c7ff30fc6862da1be281f420c65271b7 7 | 60: 6ab19782ff40e2955af88819c38e5c79 8 | 70: 138f28073abae152c882258b4420a0c1 9 | 80: c9fdd26c98812697fc3e00 10 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxInWitness_RedeemWitness: -------------------------------------------------------------------------------- 1 | 00: 8202d8185865825820538960a916726b 2 | 10: 09f05c9d4d4a922b85b4e11acfcc1434 3 | 20: 673d95019b7a9a52d258407d1479e7fd 4 | 30: d86a35eed51654fe5b3a76d12184eb5d 5 | 40: 9be8a455981479369537393b99b1cdaf 6 | 50: 2ec70c8fa60bd25dfd71fa206ef686a2 7 | 60: 8b195fe78583648e8fb10b 8 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxInWitness_ScriptWitness: -------------------------------------------------------------------------------- 1 | 00: 8201d818582b8282182f517365726961 2 | 10: 6c697a65642073637269707482182f51 3 | 20: 73657269616c697a6564207363726970 4 | 30: 74 5 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxInWitness_UnknownWitnessType: -------------------------------------------------------------------------------- 1 | 00: 82182fd8184b666f7274792073657665 2 | 10: 6e 3 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxIn_Unknown: -------------------------------------------------------------------------------- 1 | 00: 82182fd8184b666f7274792073657665 2 | 10: 6e 3 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxIn_Utxo: -------------------------------------------------------------------------------- 1 | 00: 8200d81858258258204ba839c420b3d2 2 | 10: bd439530f891cae9a5d4c4d812044630 3 | 20: dac72e8e0962feeecc182f 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxOut: -------------------------------------------------------------------------------- 1 | 00: 8282d818582183581caa5372095aaa68 2 | 10: 0d19d4ca496983a145709c3be18b0d4c 3 | 20: 83cb7bdc5ea0001a32dc988e182f 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxOutAux: -------------------------------------------------------------------------------- 1 | 00: 818282d818582183581caa5372095aaa 2 | 10: 680d19d4ca496983a145709c3be18b0d 3 | 20: 4c83cb7bdc5ea0001a32dc988e182f 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxOutList: -------------------------------------------------------------------------------- 1 | 00: 9f8282d818582183581caa5372095aaa 2 | 10: 680d19d4ca496983a145709c3be18b0d 3 | 20: 4c83cb7bdc5ea0001a32dc988e182fff 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxProof: -------------------------------------------------------------------------------- 1 | 00: 83182058205e46ceb20538afeeb45cb8 2 | 10: f7030512af34b4ff363a8c7e94d441a2 3 | 20: 57500ffab75820e32c9549bc3acbe0e8 4 | 30: 48b2d7ad26331b7d8497580364cb2bc6 5 | 40: c8bda9aa0975b8 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxSig: -------------------------------------------------------------------------------- 1 | 00: 5840688aad857bc7ff30fc6862da1be2 2 | 10: 81f420c65271b76ab19782ff40e2955a 3 | 20: f88819c38e5c79138f28073abae152c8 4 | 30: 82258b4420a0c1c9fdd26c98812697fc 5 | 40: 3e00 6 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxSigData: -------------------------------------------------------------------------------- 1 | 00: 58204ba839c420b3d2bd439530f891ca 2 | 10: e9a5d4c4d812044630dac72e8e0962fe 3 | 20: eecc 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/txp/TxWitness: -------------------------------------------------------------------------------- 1 | 00: 818200d81858858258404b6d7977346c 2 | 10: 4453453553346653483665744e6f7569 3 | 20: 58657a4379456a4b63337447346a6130 4 | 30: 6b466a4f38717a616932365a4d505545 5 | 40: 4a66457931356f78356b5840688aad85 6 | 50: 7bc7ff30fc6862da1be281f420c65271 7 | 60: b76ab19782ff40e2955af88819c38e5c 8 | 70: 79138f28073abae152c882258b4420a0 9 | 80: c1c9fdd26c98812697fc3e00 10 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/ApplicationName: -------------------------------------------------------------------------------- 1 | 66476f6c64656e -------------------------------------------------------------------------------- /chain/test/golden/bi/update/BlockVersion: -------------------------------------------------------------------------------- 1 | 83010101 -------------------------------------------------------------------------------- /chain/test/golden/bi/update/BlockVersionData: -------------------------------------------------------------------------------- 1 | 00: 8e1903e71903e71903e71903e71903e7 2 | 10: 1903e718631863186318631863831863 3 | 20: 186318638200d81846821903e7184d18 4 | 30: 63 5 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/BlockVersionModifier: -------------------------------------------------------------------------------- 1 | 00: 8e811903e7811903e7811903e7811903 2 | 10: e7811903e7811903e781186381186381 3 | 20: 18638118638118638183186318631863 4 | 30: 818200d81846821903e7184d811863 5 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/HashRaw: -------------------------------------------------------------------------------- 1 | 00: 582096b23a356c80ba706dbf08c0c2b2 2 | 10: 05576a6affd6f43b43ba8b7dc53d0355 3 | 20: 5938 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/SoftforkRule: -------------------------------------------------------------------------------- 1 | 83186318631863 -------------------------------------------------------------------------------- /chain/test/golden/bi/update/SoftwareVersion: -------------------------------------------------------------------------------- 1 | 8266476f6c64656e1863 -------------------------------------------------------------------------------- /chain/test/golden/bi/update/SystemTag: -------------------------------------------------------------------------------- 1 | 00: 704b6d7977346c445345355334665348 2 | 10: 36 3 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/UpAttributes: -------------------------------------------------------------------------------- 1 | a0 -------------------------------------------------------------------------------- /chain/test/golden/bi/update/UpId: -------------------------------------------------------------------------------- 1 | 00: 58205329d1c029205f3ca30468d00e1e 2 | 10: da309efcb50ee44fe0f929f988afbbf5 3 | 20: f28e 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/UpdateData: -------------------------------------------------------------------------------- 1 | 00: 845820cec02b41a5c236069cb3fd3fa6 2 | 10: 58a013e230873c2013f783c0504037dc 3 | 20: 8595875820cec02b41a5c236069cb3fd 4 | 30: 3fa658a013e230873c2013f783c05040 5 | 40: 37dc8595875820cec02b41a5c236069c 6 | 50: b3fd3fa658a013e230873c2013f783c0 7 | 60: 504037dc8595875820cec02b41a5c236 8 | 70: 069cb3fd3fa658a013e230873c2013f7 9 | 80: 83c0504037dc859587 10 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/UpdateProof: -------------------------------------------------------------------------------- 1 | 00: 5820a9d2e0af73f175d0eab5d96c8b48 2 | 10: 0edfa8226f4c2a9037d637f6aa3cd9f3 3 | 20: b575 4 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/UpdateVote: -------------------------------------------------------------------------------- 1 | 00: 8458404a30754b446269376936644c58 2 | 10: 6b756573565a394a6648676a72637473 3 | 20: 4c4674324e766f76586e6368734f7658 4 | 30: 303559364c6f686c544e74356d6b5046 5 | 40: 68556f58205329d1c029205f3ca30468 6 | 50: d00e1eda309efcb50ee44fe0f929f988 7 | 60: afbbf5f28ef55840101bc0f91d86c749 8 | 70: b45b22fcafb4a812e8239e72b62f4bae 9 | 80: 46cb9c14edd1dadf4b31cf3a931d3c30 10 | 90: 327592fdee651bd578b63db07c747e36 11 | a0: 9042beb0f5bf6d0c 12 | -------------------------------------------------------------------------------- /chain/test/golden/bi/update/VoteId: -------------------------------------------------------------------------------- 1 | 00: 8358205329d1c029205f3ca30468d00e 2 | 10: 1eda309efcb50ee44fe0f929f988afbb 3 | 20: f5f28e58404b6d7977346c4453453553 4 | 30: 346653483665744e6f756958657a4379 5 | 40: 456a4b63337447346a61306b466a4f38 6 | 50: 717a616932365a4d5055454a66457931 7 | 60: 356f78356bf4 8 | -------------------------------------------------------------------------------- /chain/test/golden/json/AttackTarget_NetworkAddressTarget: -------------------------------------------------------------------------------- 1 | { 2 | "Network": "ggv:32313" 3 | } -------------------------------------------------------------------------------- /chain/test/golden/json/AttackTarget_PubKeyAddressTarget: -------------------------------------------------------------------------------- 1 | { 2 | "PubKey": "cae922c720ea93e5ead49b4652fb24caf4948e31eee378a4c4513f11" 3 | } -------------------------------------------------------------------------------- /chain/test/golden/json/GenesisProtocolConstants0_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | { 2 | "vssMinTTL": 744040476, 3 | "k": 37, 4 | "vssMaxTTL": 1477558317, 5 | "protocolMagic": 1783847074 6 | } -------------------------------------------------------------------------------- /chain/test/golden/json/GenesisProtocolConstants1_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | { 2 | "vssMinTTL": 310228653, 3 | "k": 64, 4 | "vssMaxTTL": 126106167, 5 | "protocolMagic": 135977977 6 | } -------------------------------------------------------------------------------- /chain/test/golden/json/GenesisProtocolConstants2_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | { 2 | "vssMinTTL": 1341799941, 3 | "k": 2, 4 | "vssMaxTTL": 402296078, 5 | "protocolMagic": 1780893186 6 | } -------------------------------------------------------------------------------- /chain/test/golden/json/StaticConfig_GCSrc: -------------------------------------------------------------------------------- 1 | { 2 | "src": { 3 | "file": "dRaMwdYsH3QA3dChe", 4 | "hash": "bc9a1c2d86ddf023a39d8ae0abaf209fe4a95a3741cb99ecc0f011b48a5b69b9" 5 | } 6 | } -------------------------------------------------------------------------------- /chain/test/golden/json/TxValidationRulesConfig: -------------------------------------------------------------------------------- 1 | { 2 | "addrAttribSize": 128, 3 | "txAttribSize": 128, 4 | "attribResrictEpoch": 2 5 | } -------------------------------------------------------------------------------- /chain/test/golden/json/TxpConfiguration0: -------------------------------------------------------------------------------- 1 | { 2 | "memPoolLimitTx": 99, 3 | "assetLockedSrcAddrs": [ 4 | "2RhQhCGqYPDpFgTsnBTbnvPvCwpqAkjwLqQkWpkqXbLRmNxd4xNd262nGsr8JiynyKRUeMLSJ9Ntho9i76uvBTrVXdJJG5yiNLb8frmUe5qX7E" 5 | ] 6 | } -------------------------------------------------------------------------------- /chain/test/golden/json/TxpConfiguration2: -------------------------------------------------------------------------------- 1 | { 2 | "memPoolLimitTx": 700, 3 | "assetLockedSrcAddrs": [ 4 | "2RhQhCGqYPDpFgTsnBTbnvPvCwpqAkjwLqQkWpkqXbLRmNxd4xNd262nGsr8JiynyKRUeMLSJ9Ntho9i76uvBTrVXdJJG5yiNLb8frmUe5qX7E", 5 | "5FCjkr138i9wjRVwawmYMd4Vc9KxU7TuQhMyjMGpnykg9yb2qMpUCerDFzXvfAJMFgJTHyD7Sn4ybLXm2M6zeWAaWe7ctjq5QjVL427vGRx" 6 | ] 7 | } -------------------------------------------------------------------------------- /chain/test/golden/oldJson/AttackTarget_NetworkAddressTarget: -------------------------------------------------------------------------------- 1 | {"Network":"ggv:32313"} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/AttackTarget_PubKeyAddressTarget: -------------------------------------------------------------------------------- 1 | {"PubKey":"cae922c720ea93e5ead49b4652fb24caf4948e31eee378a4c4513f11"} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/GenesisProtocolConstants0_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | {"k":37,"protocolMagic":1783847074,"vssMaxTTL":1477558317,"vssMinTTL":744040476} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/GenesisProtocolConstants1_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | {"k":64,"protocolMagic":135977977,"vssMaxTTL":126106167,"vssMinTTL":310228653} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/GenesisProtocolConstants2_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | {"k":2,"protocolMagic":1780893186,"vssMaxTTL":402296078,"vssMinTTL":1341799941} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/StaticConfig_GCSrc: -------------------------------------------------------------------------------- 1 | {"src":{"file":"dRaMwdYsH3QA3dChe","hash":"bc9a1c2d86ddf023a39d8ae0abaf209fe4a95a3741cb99ecc0f011b48a5b69b9"}} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/TxpConfiguration0: -------------------------------------------------------------------------------- 1 | {"memPoolLimitTx":99,"assetLockedSrcAddrs":["2RhQhCGqYPDpFgTsnBTbnvPvCwpqAkjwLqQkWpkqXbLRmNxd4xNd262nGsr8JiynyKRUeMLSJ9Ntho9i76uvBTrVXdJJG5yiNLb8frmUe5qX7E"]} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/TxpConfiguration1: -------------------------------------------------------------------------------- 1 | {"memPoolLimitTx":9,"assetLockedSrcAddrs":["a2x5MVsL5Pr1SESUZbGb7d64coe2VpRJhEFsYCUHfaimAE3wvmNHd44H7ue1wFx1RqrS9vnAmTVri19FttwaRLWG5L2rLMe1tCSzZ4zJjeUwej8kEX4VmYbL7t7o1rmucebNvz8qGod2s6LKCkAxN6dWVv9jZ3gCkWrNsXq3JeSjaBLPT7RNwSExRmPAwJ6geZmadnKSArbiPjYXkaJa5GQyDUYbni8jCyXmMHB7Qsj1Pgc7qCKA7AebV13kADRv3wSbMgWEAbBrxEmBRnHgXw5Nh6EJ5n7ejVYJAJY3kJ8Q2xisLJxW54Y48BK8a4AW7M3fU","Ae2tdPwUPEZDoUnyXuAgqzhkjNXNJeiZ5nqwprg9sArZmRNjySfJ5uz4FjB","dRNpRgY7sgwXaGbEZQ7KtFprY5PE3sxejht9kFEKLmSowgUegSinCjx3yuKGHQbRHL2EUP89BuAurEScfrgWxahCjD1M9QKYoTj5KrbR5TDnqBE3oSNx7UcXhrGKM9aau48SASu8i88Sq8hPb3z5K662spTXX"]} -------------------------------------------------------------------------------- /chain/test/golden/oldJson/TxpConfiguration2: -------------------------------------------------------------------------------- 1 | {"memPoolLimitTx":700,"assetLockedSrcAddrs":["2RhQhCGqYPDpFgTsnBTbnvPvCwpqAkjwLqQkWpkqXbLRmNxd4xNd262nGsr8JiynyKRUeMLSJ9Ntho9i76uvBTrVXdJJG5yiNLb8frmUe5qX7E","5FCjkr138i9wjRVwawmYMd4Vc9KxU7TuQhMyjMGpnykg9yb2qMpUCerDFzXvfAJMFgJTHyD7Sn4ybLXm2M6zeWAaWe7ctjq5QjVL427vGRx"]} -------------------------------------------------------------------------------- /chain/test/golden/yaml/TxValidationRulesConfig: -------------------------------------------------------------------------------- 1 | addrAttribSize: 128 2 | txAttribSize: 128 3 | attribResrictEpoch: 2 4 | -------------------------------------------------------------------------------- /client/Makefile: -------------------------------------------------------------------------------- 1 | help: ## Print documentation 2 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 3 | 4 | ghcid: ## Run ghcid with the cardano-sl-client package 5 | ghcid \ 6 | --command "stack ghci cardano-sl-client --ghci-options=-fno-code" 7 | 8 | ghcid-test: ## Have ghcid run the test suite on successful recompile 9 | ghcid \ 10 | --command "stack ghci cardano-sl-client:lib cardano-sl-client:test:cardano-client-test --ghci-options=-fobject-code" \ 11 | --test "Main.main" 12 | 13 | .PHONY: ghcid ghcid-test help 14 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # cardano-sl-client 2 | 3 | This package implements some of the functionality required for a client of the 4 | Cardano SL network. This includes: 5 | 6 | * Generation of addresses and change addresses. 7 | * Calculating coin balances. 8 | * Calculating transactions history. 9 | * Preparing and submitting new transactions to the network. 10 | -------------------------------------------------------------------------------- /client/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /client/src/Pos/Client/Txp.hs: -------------------------------------------------------------------------------- 1 | -- | Reexport of Pos.Client.Txp.* modules. 2 | 3 | module Pos.Client.Txp 4 | ( module Pos.Client.Txp.Addresses 5 | , module Pos.Client.Txp.Balances 6 | , module Pos.Client.Txp.History 7 | , module Pos.Client.Txp.Network 8 | , module Pos.Client.Txp.Util 9 | ) where 10 | 11 | import Pos.Client.Txp.Addresses 12 | import Pos.Client.Txp.Balances 13 | import Pos.Client.Txp.History 14 | import Pos.Client.Txp.Network 15 | import Pos.Client.Txp.Util 16 | 17 | -------------------------------------------------------------------------------- /client/src/Pos/Client/Update.hs: -------------------------------------------------------------------------------- 1 | -- | Reexport of Pos.Client.Update.* modules. 2 | 3 | module Pos.Client.Update 4 | ( module Pos.Client.Update.Network 5 | ) where 6 | 7 | import Pos.Client.Update.Network 8 | 9 | -------------------------------------------------------------------------------- /client/test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} 2 | -------------------------------------------------------------------------------- /client/test/Test.hs: -------------------------------------------------------------------------------- 1 | import Universum 2 | 3 | import Test.Hspec (hspec) 4 | 5 | import Spec (spec) 6 | import Test.Pos.Configuration (defaultTestConf) 7 | 8 | main :: IO () 9 | main = do 10 | putText $ "default configuration: " <> show defaultTestConf 11 | hspec spec 12 | -------------------------------------------------------------------------------- /core/Makefile: -------------------------------------------------------------------------------- 1 | help: ## Print documentation 2 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 3 | 4 | ghcid: ## Run ghcid with the cardano-sl-core package 5 | ghcid \ 6 | --command "stack ghci cardano-sl-core --ghci-options=-fno-code" 7 | 8 | ghcid-test: ## Have ghcid run the core-test test suite on successful recompile 9 | ghcid \ 10 | --command "stack ghci cardano-sl-core:lib cardano-sl-core:test:core-test --ghci-options=-fobject-code" \ 11 | --test "Main.main" 12 | 13 | .PHONY: ghcid ghcid-test help 14 | -------------------------------------------------------------------------------- /core/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Aeson.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -Wno-dodgy-exports #-} 2 | 3 | module Pos.Core.Aeson 4 | ( module Pos.Core.Aeson.Orphans 5 | ) where 6 | 7 | import Pos.Core.Aeson.Orphans () 8 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Aeson/Orphans.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -fno-warn-orphans #-} 2 | 3 | -- | Aeson orphan instances for core 4 | 5 | module Pos.Core.Aeson.Orphans 6 | ( 7 | ) where 8 | 9 | import qualified Data.Aeson.Options as S (defaultOptions) 10 | import Data.Aeson.TH (deriveJSON) 11 | import Data.Time.Units (Microsecond, Millisecond, Second) 12 | 13 | deriveJSON S.defaultOptions ''Millisecond 14 | deriveJSON S.defaultOptions ''Microsecond 15 | deriveJSON S.defaultOptions ''Second 16 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Binary.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -Wno-unused-imports #-} 2 | {-# OPTIONS_GHC -Wno-dodgy-exports #-} 3 | 4 | module Pos.Core.Binary 5 | ( module Pos.Core.Binary.Orphans 6 | ) where 7 | 8 | import Pos.Core.Binary.Orphans () 9 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Common/Stakes.hs: -------------------------------------------------------------------------------- 1 | module Pos.Core.Common.Stakes 2 | ( StakesMap 3 | , StakesList 4 | ) where 5 | 6 | import Universum 7 | 8 | import Pos.Core.Common.Coin 9 | import Pos.Core.Common.StakeholderId 10 | 11 | -- | A mapping between stakeholders and they stakes. 12 | type StakesMap = HashMap StakeholderId Coin 13 | 14 | -- | Stakeholders and their stakes. 15 | type StakesList = [(StakeholderId, Coin)] 16 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Context.hs: -------------------------------------------------------------------------------- 1 | module Pos.Core.Context 2 | ( 3 | module Pos.Core.Context.PrimaryKey 4 | ) where 5 | 6 | import Pos.Core.Context.PrimaryKey 7 | -------------------------------------------------------------------------------- /core/src/Pos/Core/JsonLog.hs: -------------------------------------------------------------------------------- 1 | {-| 2 | Module : JsonLog 3 | Description : Logging to JSON files 4 | License: MIT 5 | Maintainer: lars.bruenjes@iohk.io 6 | Stability: experimental 7 | Portability: GHC 8 | 9 | This module provides types and functions to support 10 | logging to JSON files. 11 | -} 12 | 13 | module Pos.Core.JsonLog 14 | ( module Pos.Core.JsonLog.CanJsonLog 15 | , module Pos.Core.JsonLog.Event 16 | , module Pos.Core.JsonLog.JsonLogT 17 | ) where 18 | 19 | import Pos.Core.JsonLog.CanJsonLog 20 | import Pos.Core.JsonLog.Event 21 | import Pos.Core.JsonLog.JsonLogT 22 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Metrics/Constants.hs: -------------------------------------------------------------------------------- 1 | module Pos.Core.Metrics.Constants ( 2 | cardanoNamespace 3 | , withCardanoNamespace 4 | ) where 5 | 6 | import Universum 7 | 8 | cardanoNamespace :: Text 9 | cardanoNamespace = "cardano" 10 | 11 | withCardanoNamespace :: Text -> Text 12 | withCardanoNamespace label = cardanoNamespace <> "." <> label 13 | -------------------------------------------------------------------------------- /core/src/Pos/Core/Reporting.hs: -------------------------------------------------------------------------------- 1 | module Pos.Core.Reporting 2 | ( module X 3 | ) where 4 | 5 | import Pos.Core.Reporting.MemState as X 6 | import Pos.Core.Reporting.Methods as X 7 | import Pos.Core.Reporting.Metrics as X 8 | -------------------------------------------------------------------------------- /core/test/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /core/test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} 2 | -------------------------------------------------------------------------------- /core/test/Test/Pos/Core/Chrono.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveTraversable #-} 2 | {-# LANGUAGE TypeFamilies #-} 3 | 4 | {-# OPTIONS_GHC -fno-warn-orphans #-} 5 | 6 | 7 | -- | Chronological sequences. 8 | 9 | module Test.Pos.Core.Chrono 10 | ( 11 | ) where 12 | 13 | import Pos.Core.Chrono 14 | 15 | import Test.QuickCheck (Arbitrary) 16 | 17 | deriving instance Arbitrary (f a) => Arbitrary (NewestFirst f a) 18 | deriving instance Arbitrary (f a) => Arbitrary (OldestFirst f a) 19 | -------------------------------------------------------------------------------- /core/test/golden/AddrSpendingData_PubKey: -------------------------------------------------------------------------------- 1 | 00: 820058404b6d7977346c445345355334 2 | 10: 6653483665744e6f756958657a437945 3 | 20: 6a4b63337447346a61306b466a4f3871 4 | 30: 7a616932365a4d5055454a6645793135 5 | 40: 6f78356b 6 | -------------------------------------------------------------------------------- /core/test/golden/AddrSpendingData_Redeem: -------------------------------------------------------------------------------- 1 | 00: 82025820538960a916726b09f05c9d4d 2 | 10: 4a922b85b4e11acfcc1434673d95019b 3 | 20: 7a9a52d2 4 | -------------------------------------------------------------------------------- /core/test/golden/AddrSpendingData_Script: -------------------------------------------------------------------------------- 1 | 00: 8201821902595820346c445345355334 2 | 10: 6653483665744e6f756958657a437945 3 | 20: 6a4b63337447346a 4 | -------------------------------------------------------------------------------- /core/test/golden/AddrSpendingData_Unknown: -------------------------------------------------------------------------------- 1 | 00: 8218f7d818582077346c445345355334 2 | 10: 6653483665744e6f756958657a437945 3 | 20: 6a4b6333744734 4 | -------------------------------------------------------------------------------- /core/test/golden/AddrStakeDistribution_Bootstrap: -------------------------------------------------------------------------------- 1 | 80 -------------------------------------------------------------------------------- /core/test/golden/AddrStakeDistribution_SingleKey: -------------------------------------------------------------------------------- 1 | 00: 8200581c5125b558daa14b5338e904cc 2 | 10: 2a75a8b7b3a4738de9cb28a6819576db 3 | -------------------------------------------------------------------------------- /core/test/golden/AddrStakeDistribution_UnsafeMultiKey: -------------------------------------------------------------------------------- 1 | 00: a3581c4577144e4954c6ba257ff8b51d 2 | 10: 5f6d9f3cf44a16084dbeb1413394b51b 3 | 20: 0001c6bf52634000581c5125b558daa1 4 | 30: 4b5338e904cc2a75a8b7b3a4738de9cb 5 | 40: 28a6819576db1b000110d9316ec00058 6 | 50: 1cbd3c9fb63a795fde3a199468e83f5f 7 | 60: 51d20f19d082f2458dbb703aad1b0000 8 | 70: b5e620f48000 9 | -------------------------------------------------------------------------------- /core/test/golden/AddrType_PK: -------------------------------------------------------------------------------- 1 | 00 -------------------------------------------------------------------------------- /core/test/golden/AddrType_R: -------------------------------------------------------------------------------- 1 | 02 -------------------------------------------------------------------------------- /core/test/golden/AddrType_S: -------------------------------------------------------------------------------- 1 | 01 -------------------------------------------------------------------------------- /core/test/golden/AddrType_U: -------------------------------------------------------------------------------- 1 | 1839 -------------------------------------------------------------------------------- /core/test/golden/Attributes: -------------------------------------------------------------------------------- 1 | a0 -------------------------------------------------------------------------------- /core/test/golden/BlockCount: -------------------------------------------------------------------------------- 1 | 1903e7 -------------------------------------------------------------------------------- /core/test/golden/ChainDifficulty: -------------------------------------------------------------------------------- 1 | 8119270f -------------------------------------------------------------------------------- /core/test/golden/Coeff: -------------------------------------------------------------------------------- 1 | 1865 -------------------------------------------------------------------------------- /core/test/golden/Coin: -------------------------------------------------------------------------------- 1 | 192604 -------------------------------------------------------------------------------- /core/test/golden/CoinPortion: -------------------------------------------------------------------------------- 1 | 1925e6 -------------------------------------------------------------------------------- /core/test/golden/EpochIndex: -------------------------------------------------------------------------------- 1 | 0e -------------------------------------------------------------------------------- /core/test/golden/EpochOrSlotEI: -------------------------------------------------------------------------------- 1 | 82000e -------------------------------------------------------------------------------- /core/test/golden/EpochOrSlotSI: -------------------------------------------------------------------------------- 1 | 8201820b182f -------------------------------------------------------------------------------- /core/test/golden/FlatSlotId: -------------------------------------------------------------------------------- 1 | 191389 -------------------------------------------------------------------------------- /core/test/golden/InvReqDataFlowLog_InvReqAccepted: -------------------------------------------------------------------------------- 1 | {"invReqAccepted":{"reqSent":3,"reqStart":1,"reqClosed":4,"reqReceived":2}} -------------------------------------------------------------------------------- /core/test/golden/InvReqDataFlowLog_InvReqException: -------------------------------------------------------------------------------- 1 | {"invReqException":"test"} -------------------------------------------------------------------------------- /core/test/golden/InvReqDataFlowLog_InvReqRejected: -------------------------------------------------------------------------------- 1 | {"invReqRejected":{"reqStart":1,"reqReceived":2}} -------------------------------------------------------------------------------- /core/test/golden/LocalSlotIndex: -------------------------------------------------------------------------------- 1 | 1834 -------------------------------------------------------------------------------- /core/test/golden/MerkleRoot: -------------------------------------------------------------------------------- 1 | 00: 5820c4df3798353de80db323417c513b 2 | 10: 0d647fdac1944f959211b4db35d4bd86 3 | 20: ca28 4 | -------------------------------------------------------------------------------- /core/test/golden/MerkleTree: -------------------------------------------------------------------------------- 1 | 00: 9f582096b23a356c80ba706dbf08c0c2 2 | 10: b205576a6affd6f43b43ba8b7dc53d03 3 | 20: 555938ff 4 | -------------------------------------------------------------------------------- /core/test/golden/Script: -------------------------------------------------------------------------------- 1 | 00: 821902595820346c4453453553346653 2 | 10: 483665744e6f756958657a4379456a4b 3 | 20: 63337447346a 4 | -------------------------------------------------------------------------------- /core/test/golden/ScriptVersion: -------------------------------------------------------------------------------- 1 | 191771 -------------------------------------------------------------------------------- /core/test/golden/SharedSeed: -------------------------------------------------------------------------------- 1 | 00: 815820453553346653483665744e6f75 2 | 10: 6958657a4379456a4b63337447346a61 3 | 20: 306b46 4 | -------------------------------------------------------------------------------- /core/test/golden/SlotCount: -------------------------------------------------------------------------------- 1 | 1a00073e7b -------------------------------------------------------------------------------- /core/test/golden/SlotId: -------------------------------------------------------------------------------- 1 | 820b182f -------------------------------------------------------------------------------- /core/test/golden/SlotLeaders: -------------------------------------------------------------------------------- 1 | 00: 9f581c5125b558daa14b5338e904cc2a 2 | 10: 75a8b7b3a4738de9cb28a6819576db58 3 | 20: 1cd25597dd7d416ff91e12c8ca78c6bc 4 | 30: 9a1327cc56119969a7d18ea921581c66 5 | 40: 79321696358dac9d16cf8befe4adf181 6 | 50: 8096fd2a329c200fc2ebcfff 7 | -------------------------------------------------------------------------------- /core/test/golden/StakeholderId: -------------------------------------------------------------------------------- 1 | 00: 581c5125b558daa14b5338e904cc2a75 2 | 10: a8b7b3a4738de9cb28a6819576db 3 | -------------------------------------------------------------------------------- /core/test/golden/StakesList: -------------------------------------------------------------------------------- 1 | 00: 9f82581c5125b558daa14b5338e904cc 2 | 10: 2a75a8b7b3a4738de9cb28a6819576db 3 | 20: 184f82581cdca13a8d80a2080b3c7848 4 | 30: 557ef4a4db6aa3cf8c55d5d2736f8c8f 5 | 40: b2182c82581c321b790bdbb2a5773a2b 6 | 50: 9493974d3e0fa74fdf9a43ce82e449d3 7 | 60: 26031a0098967fff 8 | -------------------------------------------------------------------------------- /core/test/golden/StakesMap: -------------------------------------------------------------------------------- 1 | 00: a3581c321b790bdbb2a5773a2b949397 2 | 10: 4d3e0fa74fdf9a43ce82e449d326031a 3 | 20: 0098967f581c5125b558daa14b5338e9 4 | 30: 04cc2a75a8b7b3a4738de9cb28a68195 5 | 40: 76db184f581cdca13a8d80a2080b3c78 6 | 50: 48557ef4a4db6aa3cf8c55d5d2736f8c 7 | 60: 8fb2182c 8 | -------------------------------------------------------------------------------- /core/test/golden/TimeDiff: -------------------------------------------------------------------------------- 1 | 19128b -------------------------------------------------------------------------------- /core/test/golden/TimeStamp: -------------------------------------------------------------------------------- 1 | 182f -------------------------------------------------------------------------------- /core/test/golden/TxFeePolicy_Linear: -------------------------------------------------------------------------------- 1 | 8200d81846821863190309 -------------------------------------------------------------------------------- /core/test/golden/TxFeePolicy_Unknown: -------------------------------------------------------------------------------- 1 | 00: 821865d81858206a4f38717a61693236 2 | 10: 5a4d5055454a66457931356f78356b4a 3 | 20: 30754b44626937 4 | -------------------------------------------------------------------------------- /core/test/golden/TxSizeLinear: -------------------------------------------------------------------------------- 1 | 821903e7184d -------------------------------------------------------------------------------- /core/test/golden/bi/Address0: -------------------------------------------------------------------------------- 1 | 00: 82d818584683581cabeaaa8f95c4529b 2 | 10: b494e648c2e8e3522713f466a9dec1f1 3 | 20: decea1b7a101582258207447346a6130 4 | 30: 6b466a4f38717a616932365a4d505545 5 | 40: 4a66457931356f78356b001a03f38741 6 | -------------------------------------------------------------------------------- /core/test/golden/bi/Address1: -------------------------------------------------------------------------------- 1 | 00: 82d818582183581caa5372095aaa680d 2 | 10: 19d4ca496983a145709c3be18b0d4c83 3 | 20: cb7bdc5ea0001a32dc988e 4 | -------------------------------------------------------------------------------- /core/test/golden/bi/Address2: -------------------------------------------------------------------------------- 1 | 00: 82d818586983581ce269a51e06c374cb 2 | 10: 7bf5a4d36e6d673560ebfa8f2d0cfac4 3 | 20: 3ed4672ca20058208200581c5125b558 4 | 30: daa14b5338e904cc2a75a8b7b3a4738d 5 | 40: e9cb28a6819576db0158225820366574 6 | 50: 4e6f756958657a4379456a4b63337447 7 | 60: 346a61306b466a4f38717a6169021a28 8 | 70: 7cce6a 9 | -------------------------------------------------------------------------------- /core/test/golden/bi/Address3: -------------------------------------------------------------------------------- 1 | 00: 82d81858e483581c41574eefbf61b89d 2 | 10: 19ddbc68c760dbf2fe59fc386bae1bd9 3 | 20: 87083453a200589b8201a4581c41cad7 4 | 30: 50a98f3ccd30a8d0b641253151de8fd8 5 | 40: 45ee12e6ff44cf899c1b000000e8d4a5 6 | 50: 1000581c5125b558daa14b5338e904cc 7 | 60: 2a75a8b7b3a4738de9cb28a6819576db 8 | 70: 1b00038c831b679369581c67f62c82d6 9 | 80: 3613496ae4a8b2f7461d7a8a5a31cdb4 10 | 90: 961b26a58db04a1b000000123ede4000 11 | a0: 581ca0f124f5f822d9fa2093ede304b6 12 | b0: 43741a980fc1e5c10e8c932560d31a75 13 | c0: db9c970158225820744e6f756958657a 14 | d0: 4379456a4b63337447346a61306b466a 15 | e0: 4f38717a61693236011a3ac2e65f 16 | -------------------------------------------------------------------------------- /core/test/golden/bi/Address4: -------------------------------------------------------------------------------- 1 | 00: 82d818584483581ceb7f1fc78b406264 2 | 10: c7e41bd42648978aaf5ad7c2c8632af7 3 | 20: f1ed7375a10058208200581c5125b558 4 | 30: daa14b5338e904cc2a75a8b7b3a4738d 5 | 40: e9cb28a6819576db071a9c486f4b 6 | -------------------------------------------------------------------------------- /core/test/golden/json/Address0: -------------------------------------------------------------------------------- 1 | "2RhQhCGqYPDpFgTsnBTbnvPvCwpqAkjwLqQkWpkqXbLRmNxd4xNd262nGsr8JiynyKRUeMLSJ9Ntho9i76uvBTrVXdJJG5yiNLb8frmUe5qX7E" -------------------------------------------------------------------------------- /core/test/golden/json/Address1: -------------------------------------------------------------------------------- 1 | "Ae2tdPwUPEZDoUnyXuAgqzhkjNXNJeiZ5nqwprg9sArZmRNjySfJ5uz4FjB" -------------------------------------------------------------------------------- /core/test/golden/json/Address2: -------------------------------------------------------------------------------- 1 | "dRNpRgY7sgwXaGbEZQ7KtFprY5PE3sxejht9kFEKLmSowgUegSinCjx3yuKGHQbRHL2EUP89BuAurEScfrgWxahCjD1M9QKYoTj5KrbR5TDnqBE3oSNx7UcXhrGKM9aau48SASu8i88Sq8hPb3z5K662spTXX" -------------------------------------------------------------------------------- /core/test/golden/json/Address3: -------------------------------------------------------------------------------- 1 | "a2x5MVsL5Pr1SESUZbGb7d64coe2VpRJhEFsYCUHfaimAE3wvmNHd44H7ue1wFx1RqrS9vnAmTVri19FttwaRLWG5L2rLMe1tCSzZ4zJjeUwej8kEX4VmYbL7t7o1rmucebNvz8qGod2s6LKCkAxN6dWVv9jZ3gCkWrNsXq3JeSjaBLPT7RNwSExRmPAwJ6geZmadnKSArbiPjYXkaJa5GQyDUYbni8jCyXmMHB7Qsj1Pgc7qCKA7AebV13kADRv3wSbMgWEAbBrxEmBRnHgXw5Nh6EJ5n7ejVYJAJY3kJ8Q2xisLJxW54Y48BK8a4AW7M3fU" -------------------------------------------------------------------------------- /core/test/golden/json/Address4: -------------------------------------------------------------------------------- 1 | "5FCjkr138i9wjRVwawmYMd4Vc9KxU7TuQhMyjMGpnykg9yb2qMpUCerDFzXvfAJMFgJTHyD7Sn4ybLXm2M6zeWAaWe7ctjq5QjVL427vGRx" -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'0_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- 1 | Kmyw4lDSE5S4fSH6etNouiXezCyEjKc3 tG4ja0kFjO8qzai26ZMPUEJfEy15ox5k tG4ja0kFjO8qzai26ZMPUEJfEy15ox5k -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'1_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- 1 | Kmyw4lDSE5S4fSH6etNouiXezCyEjKc3 tG4ja0kFjO8qzai26ZMPUEJfEy15ox5k -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'2_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address'2_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'3_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address'3_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'4_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address'4_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'5_HasNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address'5_HasNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'6_HasNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address'6_HasNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address'7_HasNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address'7_HasNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address0_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address0_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address1_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address1_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address2_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address2_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address3_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address3_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address4_Legacy_NoNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address4_Legacy_NoNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address5_HasNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address5_HasNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address6_HasNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address6_HasNetworkMagic -------------------------------------------------------------------------------- /core/test/golden/safecopy/Address7_HasNetworkMagic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/test/golden/safecopy/Address7_HasNetworkMagic -------------------------------------------------------------------------------- /core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Universum 2 | 3 | import Test.Hspec (hspec) 4 | 5 | import Spec (spec) 6 | 7 | import qualified Test.Pos.Core.Bi 8 | import qualified Test.Pos.Core.Json 9 | import qualified Test.Pos.Core.SafeCopy 10 | import Test.Pos.Util.Tripping (runTests) 11 | 12 | main :: IO () 13 | main = do 14 | hspec spec 15 | runTests 16 | [ Test.Pos.Core.Bi.tests 17 | , Test.Pos.Core.Json.tests 18 | , Test.Pos.Core.SafeCopy.tests 19 | ] 20 | -------------------------------------------------------------------------------- /crypto/Pos/Crypto/Signing.hs: -------------------------------------------------------------------------------- 1 | module Pos.Crypto.Signing 2 | ( module Pos.Crypto.Signing.Check 3 | , module Pos.Crypto.Signing.Redeem 4 | , module Pos.Crypto.Signing.Safe 5 | , module Pos.Crypto.Signing.Signing 6 | , module Pos.Crypto.Signing.Tag 7 | , module Pos.Crypto.Signing.Types 8 | ) where 9 | 10 | import Pos.Crypto.Signing.Check 11 | import Pos.Crypto.Signing.Redeem 12 | import Pos.Crypto.Signing.Safe 13 | import Pos.Crypto.Signing.Signing 14 | import Pos.Crypto.Signing.Tag 15 | import Pos.Crypto.Signing.Types 16 | 17 | -------------------------------------------------------------------------------- /crypto/Pos/Crypto/Signing/Types.hs: -------------------------------------------------------------------------------- 1 | module Pos.Crypto.Signing.Types 2 | ( module Pos.Crypto.Signing.Types.Redeem 3 | , module Pos.Crypto.Signing.Types.Safe 4 | , module Pos.Crypto.Signing.Types.Signing 5 | , module Pos.Crypto.Signing.Types.Tag 6 | ) where 7 | 8 | import Pos.Crypto.Signing.Types.Redeem 9 | import Pos.Crypto.Signing.Types.Safe 10 | import Pos.Crypto.Signing.Types.Signing 11 | import Pos.Crypto.Signing.Types.Tag 12 | -------------------------------------------------------------------------------- /crypto/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /crypto/shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | self = import ../. {}; 3 | in (self.nix-tools.shellFor { 4 | name = "cardano-sl-crypto"; 5 | packages = ps: [ ps.cardano-sl-crypto ps.cabal-install ]; 6 | }) 7 | -------------------------------------------------------------------------------- /crypto/test/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /crypto/test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} 2 | -------------------------------------------------------------------------------- /crypto/test/golden/AbstractHash: -------------------------------------------------------------------------------- 1 | 00: 582001f4b788593d4f70de2a45c2e1e8 2 | 10: 7088bfbdfa29577ae1b62aba60e095e3 3 | 20: ab53 4 | -------------------------------------------------------------------------------- /crypto/test/golden/DecShare: -------------------------------------------------------------------------------- 1 | 00: 58610379a7cfbc3c66ad878629f79505 2 | 10: 10f9fd7ac85977306c53f3a6450c0725 3 | 20: d8da31bfc752b92868d6f3276d15a14c 4 | 30: d7b95979d30b32fc33f1f988a149f63b 5 | 40: 6105a540c532f93b8bd26eb85570a3c7 6 | 50: 7a1114942d23a2d9711f23918d4975a7 7 | 60: d46fb7 8 | -------------------------------------------------------------------------------- /crypto/test/golden/EncShare: -------------------------------------------------------------------------------- 1 | 00: 582102d0ca9ebbac514ebfd135172a06 2 | 10: 1e5f0bcf56babbe5781cdcefa1adb71e 3 | 20: dc2588 4 | -------------------------------------------------------------------------------- /crypto/test/golden/EncryptedSecretKey: -------------------------------------------------------------------------------- 1 | 00: 82588053346653483665744e6f756958 2 | 10: 657a4379456a4b63337447346a61306b 3 | 20: 466a4f38717a616932365a4d5055454a 4 | 30: 66457931356f78356b4a30754b446269 5 | 40: 376936644c586b756573565a394a6648 6 | 50: 676a726374734c4674324e766f76586e 7 | 60: 6368734f7658303559364c6f686c544e 8 | 70: 74356d6b504668556f587531455a534a 9 | 80: 544979583831347c387c317c59413d3d 10 | 90: 7c5463492f69436b5a556d3341724a7a 11 | a0: 6a6372774832462f3651674233365469 12 | b0: 4a6e2b67304441626f69514d3d 13 | -------------------------------------------------------------------------------- /crypto/test/golden/HDAddressPayload: -------------------------------------------------------------------------------- 1 | 00: 5238cf895ceba7b457f968dd626e9cee 2 | 10: ee78d4 3 | -------------------------------------------------------------------------------- /crypto/test/golden/PassPhrase: -------------------------------------------------------------------------------- 1 | 00: 582077346c4453453553346653483665 2 | 10: 744e6f756958657a4379456a4b633374 3 | 20: 4734 4 | -------------------------------------------------------------------------------- /crypto/test/golden/ProxyCert: -------------------------------------------------------------------------------- 1 | 00: 5840162821275262c9d020834d7834a6 2 | 10: 7eebb4f5469d3a219d197fb5af7d4723 3 | 20: 78cf22ac5f01bd0c8beee2ef8d6eadff 4 | 30: 02f8324659623d28e7a3f6d71535808c 5 | 40: 9008 6 | -------------------------------------------------------------------------------- /crypto/test/golden/ProxySecretKey: -------------------------------------------------------------------------------- 1 | 00: 84f65840644c586b756573565a394a66 2 | 10: 48676a726374734c4674324e766f7658 3 | 20: 6e6368734f7658303559364c6f686c54 4 | 30: 4e74356d6b504668556f587531455a53 5 | 40: 4a54497958404b6d7977346c44534535 6 | 50: 53346653483665744e6f756958657a43 7 | 60: 79456a4b63337447346a61306b466a4f 8 | 70: 38717a616932365a4d5055454a664579 9 | 80: 31356f78356b5840162821275262c9d0 10 | 90: 20834d7834a67eebb4f5469d3a219d19 11 | a0: 7fb5af7d472378cf22ac5f01bd0c8bee 12 | b0: e2ef8d6eadff02f8324659623d28e7a3 13 | c0: f6d71535808c9008 14 | -------------------------------------------------------------------------------- /crypto/test/golden/PublicKey: -------------------------------------------------------------------------------- 1 | 00: 58404b6d7977346c4453453553346653 2 | 10: 483665744e6f756958657a4379456a4b 3 | 20: 63337447346a61306b466a4f38717a61 4 | 30: 6932365a4d5055454a66457931356f78 5 | 40: 356b 6 | -------------------------------------------------------------------------------- /crypto/test/golden/RedeemPublicKey: -------------------------------------------------------------------------------- 1 | 00: 5820538960a916726b09f05c9d4d4a92 2 | 10: 2b85b4e11acfcc1434673d95019b7a9a 3 | 20: 52d2 4 | -------------------------------------------------------------------------------- /crypto/test/golden/RedeemSecretKey: -------------------------------------------------------------------------------- 1 | 00: 58404b6d7977346c4453453553346653 2 | 10: 483665744e6f756958657a4379456a4b 3 | 20: 6333538960a916726b09f05c9d4d4a92 4 | 30: 2b85b4e11acfcc1434673d95019b7a9a 5 | 40: 52d2 6 | -------------------------------------------------------------------------------- /crypto/test/golden/RedeemSignature: -------------------------------------------------------------------------------- 1 | 00: 584011cf71f75af2d73d3afa61af5cc2 2 | 10: cc53a98704d78b97b7daec06ccf7eb7c 3 | 20: 6607a954f3fda82b80832290c646bf31 4 | 30: 074c15aaef8eacda84b993882088be60 5 | 40: 5701 6 | -------------------------------------------------------------------------------- /crypto/test/golden/Secret: -------------------------------------------------------------------------------- 1 | 00: 582103a889b85070721af446a282e8d2 2 | 10: 3934612eb6ffc7c422f15aa85ad5c072 3 | 20: 267c79 4 | -------------------------------------------------------------------------------- /crypto/test/golden/SecretKey: -------------------------------------------------------------------------------- 1 | 00: 588053346653483665744e6f75695865 2 | 10: 7a4379456a4b63337447346a61306b46 3 | 20: 6a4f38717a616932365a4d5055454a66 4 | 30: 457931356f78356b4a30754b44626937 5 | 40: 6936644c586b756573565a394a664867 6 | 50: 6a726374734c4674324e766f76586e63 7 | 60: 68734f7658303559364c6f686c544e74 8 | 70: 356d6b504668556f587531455a534a54 9 | 80: 4979 10 | -------------------------------------------------------------------------------- /crypto/test/golden/Signature: -------------------------------------------------------------------------------- 1 | 00: 5840b28bf6b4c08892f5b82dc11e9df0 2 | 10: 8c0c4374a8f7e2b2558d42a83ed43ec2 3 | 20: b6b76dabf1293a561971d772d3f96097 4 | 30: f96f40a363b4201616202ef18fe52f27 5 | 40: f806 6 | -------------------------------------------------------------------------------- /crypto/test/golden/Signed: -------------------------------------------------------------------------------- 1 | 00: 82f65840b28bf6b4c08892f5b82dc11e 2 | 10: 9df08c0c4374a8f7e2b2558d42a83ed4 3 | 20: 3ec2b6b76dabf1293a561971d772d3f9 4 | 30: 6097f96f40a363b4201616202ef18fe5 5 | 40: 2f27f806 6 | -------------------------------------------------------------------------------- /crypto/test/golden/VssPublicKey: -------------------------------------------------------------------------------- 1 | 00: 582102294842accb1d76aaa64bc1af23 2 | 10: 1378e1a01a67c0fc8010824caa021097 3 | 20: 0275c4 4 | -------------------------------------------------------------------------------- /crypto/test/golden/WithHash: -------------------------------------------------------------------------------- 1 | 00: 582001f4b788593d4f70de2a45c2e1e8 2 | 10: 7088bfbdfa29577ae1b62aba60e095e3 3 | 20: ab53 4 | -------------------------------------------------------------------------------- /crypto/test/golden/json/ProtocolMagic0_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | 31337 -------------------------------------------------------------------------------- /crypto/test/golden/json/ProtocolMagic1_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | 2147000001 -------------------------------------------------------------------------------- /crypto/test/golden/json/ProtocolMagic2_Legacy_HasNetworkMagic: -------------------------------------------------------------------------------- 1 | -58952 -------------------------------------------------------------------------------- /crypto/test/golden/json/ProtocolMagic_Legacy_NMMustBeJust: -------------------------------------------------------------------------------- 1 | {"pm":31337,"requiresNetworkMagic":"NMMustBeJust"} -------------------------------------------------------------------------------- /crypto/test/golden/json/ProtocolMagic_Legacy_NMMustBeNothing: -------------------------------------------------------------------------------- 1 | {"pm":-500,"requiresNetworkMagic":"NMMustBeNothing"} -------------------------------------------------------------------------------- /crypto/test/test.hs: -------------------------------------------------------------------------------- 1 | import Universum 2 | 3 | import Test.Hspec (hspec) 4 | 5 | import Spec (spec) 6 | 7 | import qualified Test.Pos.Crypto.Bi 8 | import qualified Test.Pos.Crypto.Json 9 | import Test.Pos.Util.Tripping (runTests) 10 | 11 | main :: IO () 12 | main = do 13 | hspec spec 14 | runTests 15 | [ Test.Pos.Crypto.Bi.tests 16 | , Test.Pos.Crypto.Json.tests 17 | ] 18 | -------------------------------------------------------------------------------- /db/Makefile: -------------------------------------------------------------------------------- 1 | help: ## Print documentation 2 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 3 | 4 | ghcid: ## Run ghcid with the cardano-sl-db package 5 | ghcid \ 6 | --command "stack ghci cardano-sl-db --ghci-options=-fno-code" 7 | 8 | ghcid-test: ## Have ghcid run the test suite on successful recompile 9 | ghcid \ 10 | --command "stack ghci cardano-sl-db:lib cardano-sl-db:test:test --ghci-options=-fobject-code" \ 11 | --test "Main.main" 12 | 13 | .PHONY: ghcid ghcid-test help 14 | -------------------------------------------------------------------------------- /db/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Input Output (Hong Kong) Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /db/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /db/shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | self = import ../. {}; 3 | in (self.nix-tools.shellFor { 4 | name = "cardano-db"; 5 | packages = ps: [ ps.cardano-sl-db ]; 6 | }) 7 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Rocks.hs: -------------------------------------------------------------------------------- 1 | -- | Reexports of "Pos.DB.Rocks.*". 2 | module Pos.DB.Rocks 3 | ( module Pos.DB.Rocks.Functions 4 | , module Pos.DB.Rocks.Types 5 | ) where 6 | import Pos.DB.Rocks.Functions 7 | import Pos.DB.Rocks.Types 8 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Ssc.hs: -------------------------------------------------------------------------------- 1 | module Pos.DB.Ssc 2 | ( module Pos.DB.Ssc.GState 3 | , module Pos.DB.Ssc.Logic 4 | , module Pos.DB.Ssc.SecretStorage 5 | , module Pos.DB.Ssc.State 6 | ) where 7 | 8 | import Pos.DB.Ssc.GState 9 | import Pos.DB.Ssc.Logic 10 | import Pos.DB.Ssc.SecretStorage 11 | import Pos.DB.Ssc.State 12 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Ssc/Logic.hs: -------------------------------------------------------------------------------- 1 | module Pos.DB.Ssc.Logic 2 | ( module Pos.DB.Ssc.Logic.Global 3 | , module Pos.DB.Ssc.Logic.Local 4 | , module Pos.DB.Ssc.Logic.VAR 5 | ) where 6 | 7 | import Pos.DB.Ssc.Logic.Global 8 | import Pos.DB.Ssc.Logic.Local 9 | import Pos.DB.Ssc.Logic.VAR 10 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Txp.hs: -------------------------------------------------------------------------------- 1 | -- | LRC DB stores leaders and richmen, i. e. data computed by LRC. 2 | 3 | module Pos.DB.Txp 4 | ( module Pos.DB.Txp.Logic 5 | , module Pos.DB.Txp.MemState 6 | , module Pos.DB.Txp.Settings 7 | , module Pos.DB.Txp.Stakes 8 | , module Pos.DB.Txp.Utxo 9 | ) where 10 | 11 | import Pos.DB.Txp.Logic 12 | import Pos.DB.Txp.MemState 13 | import Pos.DB.Txp.Settings 14 | import Pos.DB.Txp.Stakes 15 | import Pos.DB.Txp.Utxo 16 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Txp/Logic.hs: -------------------------------------------------------------------------------- 1 | -- Pos.DB.Txp.Logic 2 | module Pos.DB.Txp.Logic 3 | ( module Pos.DB.Txp.Logic.Common 4 | , module Pos.DB.Txp.Logic.Global 5 | , module Pos.DB.Txp.Logic.Local 6 | ) where 7 | 8 | import Pos.DB.Txp.Logic.Common 9 | import Pos.DB.Txp.Logic.Global 10 | import Pos.DB.Txp.Logic.Local 11 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Txp/MemState.hs: -------------------------------------------------------------------------------- 1 | -- Pos.Chain.Txp.Memstate 2 | module Pos.DB.Txp.MemState 3 | ( module Pos.DB.Txp.MemState.Class 4 | , module Pos.DB.Txp.MemState.Holder 5 | , module Pos.DB.Txp.MemState.Metrics 6 | , module Pos.DB.Txp.MemState.Types 7 | ) where 8 | 9 | import Pos.DB.Txp.MemState.Class 10 | import Pos.DB.Txp.MemState.Holder 11 | import Pos.DB.Txp.MemState.Metrics 12 | import Pos.DB.Txp.MemState.Types 13 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Update/Logic.hs: -------------------------------------------------------------------------------- 1 | -- | Major logic of Update System (US). 2 | 3 | module Pos.DB.Update.Logic 4 | ( module Pos.DB.Update.Logic.Global 5 | , module Pos.DB.Update.Logic.Local 6 | ) where 7 | 8 | import Pos.DB.Update.Logic.Global 9 | import Pos.DB.Update.Logic.Local 10 | -------------------------------------------------------------------------------- /db/src/Pos/DB/Update/MemState.hs: -------------------------------------------------------------------------------- 1 | -- | In-memory state of Update System. 2 | 3 | module Pos.DB.Update.MemState 4 | ( module Pos.DB.Update.MemState.Functions 5 | , module Pos.DB.Update.MemState.Types 6 | ) where 7 | 8 | import Pos.DB.Update.MemState.Functions 9 | import Pos.DB.Update.MemState.Types 10 | -------------------------------------------------------------------------------- /db/test/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /db/test/Test/Pos/DB/Update/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -Wno-unused-imports #-} 2 | {-# OPTIONS_GHC -Wno-dodgy-exports #-} 3 | 4 | module Test.Pos.DB.Update.Arbitrary 5 | ( module Test.Pos.DB.Update.Arbitrary.Poll 6 | , module Test.Pos.DB.Update.Arbitrary.MemState 7 | ) where 8 | 9 | import Test.Pos.DB.Update.Arbitrary.MemState 10 | import Test.Pos.DB.Update.Arbitrary.Poll 11 | -------------------------------------------------------------------------------- /db/test/test.hs: -------------------------------------------------------------------------------- 1 | import Universum 2 | 3 | import qualified Test.Pos.DB.Block.Logic.SplitByEpoch 4 | import qualified Test.Pos.DB.Epoch.Index 5 | import qualified Test.Pos.DB.Functions 6 | import qualified Test.Pos.DB.Update.Poll.Logic.Version 7 | import Test.Pos.Util.Tripping (runTests) 8 | 9 | main :: IO () 10 | main = runTests [ Test.Pos.DB.Epoch.Index.tests 11 | , Test.Pos.DB.Functions.tests 12 | , Test.Pos.DB.Update.Poll.Logic.Version.tests 13 | , Test.Pos.DB.Block.Logic.SplitByEpoch.tests 14 | ] 15 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | ## Internal Technical Documentation 2 | 3 | Official documentation for Cardano SL can be found at [cardanodocs.com](https://cardanodocs.com/). 4 | 5 | The purpose of this directory is to store our **internal** developers-oriented technical documentation. 6 | -------------------------------------------------------------------------------- /docs/block-processing/us-bv-states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/docs/block-processing/us-bv-states.png -------------------------------------------------------------------------------- /docs/block-processing/us-proposal-states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/docs/block-processing/us-proposal-states.png -------------------------------------------------------------------------------- /docs/how-to/README.md: -------------------------------------------------------------------------------- 1 | ## How-To 2 | 3 | This directory contains short manuals with step-by-step instructions for common tasks. 4 | -------------------------------------------------------------------------------- /docs/network/example-topologies/behind-nat-no-dns.yaml: -------------------------------------------------------------------------------- 1 | wallet: 2 | relays: [[{"addr": "10.0.0.1"},{"addr": "10.0.0.2", "port": 1234}]] 3 | -------------------------------------------------------------------------------- /docs/network/example-topologies/behind-nat-with-dns.yaml: -------------------------------------------------------------------------------- 1 | wallet: 2 | relays: [[{"host": "domain1"},{"host": "domain2", "port": 1234}]] 3 | valency: 3 # optional 4 | fallbacks: 2 # optional 5 | -------------------------------------------------------------------------------- /docs/network/example-topologies/mainnet-staging.yaml: -------------------------------------------------------------------------------- 1 | # Topology for connecting to the mainnet-staging cluster. 2 | 3 | wallet: 4 | relays: [[{ host: relays.awstest.iohkdev.io }]] 5 | valency: 1 6 | fallbacks: 7 7 | -------------------------------------------------------------------------------- /docs/network/example-topologies/p2p.yaml: -------------------------------------------------------------------------------- 1 | p2p: 2 | variant: normal 3 | valency: 3 4 | fallbacks: 1 5 | -------------------------------------------------------------------------------- /docs/network/example-topologies/static-no-dns.yaml: -------------------------------------------------------------------------------- 1 | nodes: 2 | "node0": 3 | type: core 4 | region: undefined 5 | static-routes: [["node1"], ["node2"]] 6 | addr: 127.0.0.1 7 | port: 3000 8 | "node1": 9 | type: core 10 | region: undefined 11 | static-routes: [["node0"], ["node2"]] 12 | addr: 127.0.0.1 13 | port: 3001 14 | "node2": 15 | type: core 16 | region: undefined 17 | static-routes: [["node0"], ["node1"]] 18 | addr: 127.0.0.1 19 | # default port 20 | -------------------------------------------------------------------------------- /docs/network/example-topologies/static-with-dns.yaml: -------------------------------------------------------------------------------- 1 | nodes: 2 | node0: 3 | type: core 4 | region: eu-central-1 5 | static-routes: [["node1"], ["node2"]] 6 | host: node0.local 7 | # default port 8 | node1: 9 | type: core 10 | region: eu-west-1 11 | static-routes: [["node0"], ["node2"]] 12 | addr: 12.34.56.78 13 | # default port 14 | node2: 15 | type: relay 16 | region: eu-west-2 17 | static-routes: [["node0"], ["node1"]] 18 | # uses 'node2' as the hostname 19 | port: 3000 20 | kademlia: true 21 | -------------------------------------------------------------------------------- /docs/network/example-topologies/traditional.yaml: -------------------------------------------------------------------------------- 1 | p2p: 2 | variant: traditional 3 | valency: 3 4 | fallbacks: 1 5 | -------------------------------------------------------------------------------- /docs/network/shelley/UI.md: -------------------------------------------------------------------------------- 1 | From slack: 2 | Duncan Coutts @alexvieth a couple extra minor requirements that the UI folks would like: how many peers we're connected to, and what bandwidth we're getting from the block cache layer during a blockchain sync operation. 3 | -------------------------------------------------------------------------------- /docs/on-the-wire/Makefile: -------------------------------------------------------------------------------- 1 | # See `./latexmkrc` for latexmk configuration 2 | LATEX = latexmk 3 | PVC = -pvc 4 | 5 | F.tex = $(wildcard *.tex) 6 | F.pdf = $(F.tex:%.tex=%.pdf) $(F.lhs:%.lhs=%.pdf) 7 | F = $(F.tex:%.tex=%) $(F.lhs:%.lhs=%) 8 | 9 | .PHONY: default 10 | default: all 11 | 12 | .PHONY: all 13 | all: $(F.pdf) 14 | 15 | %.pdf: %.tex 16 | $(LATEX) $< 17 | 18 | $(F): 19 | $(LATEX) $(PVC) -use-make $@.tex 20 | -------------------------------------------------------------------------------- /docs/on-the-wire/latexmkrc: -------------------------------------------------------------------------------- 1 | $pdf_mode = "1"; 2 | $pdflatex = "xelatex --shell-escape -halt-on-error -synctex=1"; 3 | $clean_ext = "bbl synctex.gz synctex.gz(busy)"; 4 | 5 | # When a file required for the compilation of the main latex file 6 | # (such as an image for `\includegraphics`) latexmk will call `make` 7 | # in order to have it built. 8 | $use_make_for_missing_files = "1"; 9 | -------------------------------------------------------------------------------- /docs/rules/.gitignore: -------------------------------------------------------------------------------- 1 | ## Generated pdf files 2 | *.pdf 3 | 4 | ## Latex 5 | *.aux 6 | *.fdb_latexmk 7 | *.fls 8 | *.log 9 | *.out 10 | 11 | ## other specific Latex 12 | *.lof 13 | *.lol 14 | *.lot 15 | *.synctex.gz 16 | *.toc 17 | *.vrb 18 | *.ptb 19 | _region_.tex 20 | 21 | ## Bibtex 22 | *.bbl 23 | *.blg 24 | 25 | ## Beamer 26 | *.nav 27 | *.snm 28 | 29 | ## Minted/Pygments 30 | /_minted* 31 | -------------------------------------------------------------------------------- /docs/rules/Makefile: -------------------------------------------------------------------------------- 1 | # See `./latexmkrc` for latexmk configuration 2 | LATEX = latexmk 3 | PVC = -pvc 4 | 5 | F.tex = $(wildcard *.tex) 6 | F.pdf = $(F.tex:%.tex=%.pdf) $(F.lhs:%.lhs=%.pdf) 7 | F = $(F.tex:%.tex=%) $(F.lhs:%.lhs=%) 8 | 9 | .PHONY: default 10 | default: all 11 | 12 | .PHONY: all 13 | all: $(F.pdf) 14 | 15 | %.pdf: %.tex 16 | $(LATEX) $< 17 | 18 | $(F): 19 | $(LATEX) $(PVC) -use-make $@.tex 20 | -------------------------------------------------------------------------------- /docs/rules/latexmkrc: -------------------------------------------------------------------------------- 1 | $pdf_mode = "1"; 2 | $pdflatex = "xelatex --shell-escape -halt-on-error -synctex=1"; 3 | $clean_ext = "bbl synctex.gz synctex.gz(busy)"; 4 | 5 | # When a file required for the compilation of the main latex file 6 | # (such as an image for `\includegraphics`) latexmk will call `make` 7 | # in order to have it built. 8 | $use_make_for_missing_files = "1"; 9 | -------------------------------------------------------------------------------- /explorer/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Unless a later match takes precedence, @akegalj will be requested 2 | # for review when someone opens a pull request. 3 | 4 | * @akegalj 5 | 6 | # Order is important; the last matching pattern takes the most precedence. 7 | 8 | *.purs @sectore 9 | frontend/ @sectore 10 | 11 | src/ @ksaric 12 | src/Pos/Explorer/Socket/ @martoon 13 | test/ @ksaric 14 | -------------------------------------------------------------------------------- /explorer/Makefile: -------------------------------------------------------------------------------- 1 | help: ## Print documentation 2 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 3 | 4 | ghcid: ## Run ghcid with the cardano-sl-explorer package 5 | ghcid \ 6 | --command "stack ghci cardano-sl-explorer --ghci-options=-fno-code" 7 | 8 | ghcid-test: ## Have ghcid run the test suite on successful recompile 9 | ghcid \ 10 | --command "stack ghci cardano-sl-explorer:lib cardano-sl-explorer:test:cardano-explorer-test --ghci-options=-fobject-code" \ 11 | --test "Main.main" 12 | 13 | .PHONY: ghcid ghcid-test help 14 | -------------------------------------------------------------------------------- /explorer/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # PR 2 | 3 | --- 4 | 5 | Youtrack issue URL - **LINK** 6 | 7 | --- 8 | 9 | Short description - **DESCRIBE** 10 | 11 | --- 12 | 13 | How did I test this new functionality/bug fix? 14 | 15 | 1. branch I used 16 | 2. how did I run the project - was it on _DEV_, _TESTNET_, something else? 17 | 3. steps to reproduce the new behaviour, if I have additional tests, please write them down 18 | 19 | --- 20 | 21 | - [ ] PR was tested, and is linted. 22 | 23 | -------------------------------------------------------------------------------- /explorer/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /explorer/bench/Main.hs: -------------------------------------------------------------------------------- 1 | module Main 2 | ( main 3 | ) where 4 | 5 | import Universum 6 | 7 | import System.IO (hSetEncoding, stdout, utf8) 8 | 9 | import qualified Bench.Pos.Explorer.ServerBench as SB 10 | 11 | -- stack bench cardano-sl-explorer 12 | main :: IO () 13 | main = do 14 | hSetEncoding stdout utf8 15 | 16 | SB.runTimeBenchmark 17 | -- SB.runSpaceBenchmark 18 | -------------------------------------------------------------------------------- /explorer/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | bower_components 3 | dist 4 | output 5 | .DS_Store 6 | typings 7 | npm-debug.log 8 | package-lock.json 9 | .psc-ide-port 10 | .psci_modules 11 | # generated backend types + lenses 12 | src/Generated/* 13 | # generated lenses 14 | src/Data/Time/Lenses/* 15 | src/Explorer/I18n/Lenses.purs 16 | src/Explorer/Lenses/* 17 | src/Explorer/View/Lenses/* 18 | -------------------------------------------------------------------------------- /explorer/frontend/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/explorer/frontend/.gitmodules -------------------------------------------------------------------------------- /explorer/frontend/nix/shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | localLib = import ../../../lib.nix; 3 | in 4 | { system ? builtins.currentSystem 5 | , config ? {} 6 | , pkgs ? (import (localLib.nixpkgs) { inherit system config; }) 7 | }: 8 | 9 | let 10 | ghc = pkgs.haskellPackages.ghcWithPackages (ps: [ps.turtle ps.universum]); 11 | 12 | in 13 | # This is an environment for running the frontend deps regeneration script. 14 | pkgs.stdenv.mkDerivation { 15 | name = "explorer-frontend-shell"; 16 | buildInputs = with pkgs; [ nodePackages.bower2nix ghc coreutils ]; 17 | shellHook = "eval $(egrep ^export ${ghc}/bin/ghc)"; 18 | src = null; 19 | } 20 | -------------------------------------------------------------------------------- /explorer/frontend/scripts/build-explorer-frontend.sh: -------------------------------------------------------------------------------- 1 | rm -rf .psci_modules/ .pulp-cache/ node_modules/ bower_components/ output/ 2 | yarn install 3 | ./scripts/generate-explorer-lenses.sh 4 | yarn build:prod 5 | echo "Done generating explorer purescript frontend." 6 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/I18n/Lang.js: -------------------------------------------------------------------------------- 1 | 2 | // -- Based on https://github.com/input-output-hk/vending-application/blob/master/web-client/src/Data/I18N.js 3 | 4 | exports.detectLocaleImpl = function() { 5 | return window.navigator.languages ? 6 | window.navigator.languages[0] : 7 | window.navigator.language || window.navigator.userLanguage; 8 | } 9 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/Images.purs: -------------------------------------------------------------------------------- 1 | module Explorer.Images where 2 | 3 | import Prelude ((<>)) 4 | 5 | imagePath :: String -> String 6 | imagePath = (<>) "/images/" 7 | 8 | examplePath :: String 9 | examplePath = imagePath "any-image.jpg" 10 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/Types/App.purs: -------------------------------------------------------------------------------- 1 | module Explorer.Types.App where 2 | 3 | import Control.Monad.Eff.Console (CONSOLE) 4 | import Control.Monad.Eff.Now (NOW) 5 | import Control.SocketIO.Client (SocketIO) 6 | import DOM (DOM) 7 | import DOM.HTML.Types (HISTORY) 8 | import Network.HTTP.Affjax (AJAX) 9 | import Waypoints (WAYPOINT) 10 | 11 | type AppEffects eff = 12 | ( dom :: DOM 13 | , ajax :: AJAX 14 | , socket :: SocketIO 15 | , now :: NOW 16 | , waypoint :: WAYPOINT 17 | , history :: HISTORY 18 | , console :: CONSOLE 19 | | eff 20 | ) 21 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/Util/Config.js: -------------------------------------------------------------------------------- 1 | exports.versionImpl = $VERSION; // set by webpack 2 | exports.commitHashImpl = $COMMIT_HASH; // set by webpack 3 | exports.isProductionImpl = $PRODUCTION; // set by webpack 4 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/Util/DOM.js: -------------------------------------------------------------------------------- 1 | 2 | exports.scrollTopImpl = function() { 3 | return window.scrollTo(0, 0); 4 | } 5 | 6 | exports.classList = function (element) { 7 | return function () { 8 | return element.classList; 9 | }; 10 | }; 11 | 12 | exports.addClassImpl = function(clazzList, clazz) { 13 | return clazzList.add(clazz); 14 | } 15 | 16 | exports.removeClassImpl = function(clazzList, clazz) { 17 | return clazzList.remove(clazz); 18 | } 19 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/Util/String.js: -------------------------------------------------------------------------------- 1 | 2 | // Based on sformat by underscore.string 3 | // https://github.com/prantlf/underscore.string/blob/sformat/lib/underscore.string.js#L192 4 | exports.substituteImpl = function(str) { 5 | return function(args) { 6 | return str.replace(/\{\{|\}\}|\{(\d+)\}/g, function (match, group) { 7 | var value = args[parseInt(group, 10)]; 8 | return value ? value.toString() : ""; 9 | }); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/View/Dashboard/Types.purs: -------------------------------------------------------------------------------- 1 | module Explorer.View.Dashboard.Types where 2 | 3 | import Data.Maybe (Maybe) 4 | import Explorer.Types.Actions (Action) 5 | 6 | 7 | newtype HeaderOptions = HeaderOptions 8 | { headline :: String 9 | , link :: Maybe HeaderLink 10 | } 11 | 12 | newtype HeaderLink = HeaderLink 13 | { label :: String 14 | , action :: Action 15 | } 16 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/View/Playground.purs: -------------------------------------------------------------------------------- 1 | module Explorer.View.Playground where 2 | 3 | import Prelude 4 | 5 | import Explorer.Types.Actions (Action) 6 | import Explorer.Types.State (State) 7 | import Pux.DOM.HTML (HTML) as P 8 | import Text.Smolder.HTML (div) as S 9 | import Text.Smolder.HTML.Attributes (className) as S 10 | import Text.Smolder.Markup ((!)) 11 | import Text.Smolder.Markup (text) as S 12 | 13 | playgroundView :: State -> P.HTML Action 14 | playgroundView state = 15 | S.div ! S.className "explorer-calculator" 16 | $ S.div ! S.className "explorer-calculator__container" 17 | $ S.text "" 18 | -------------------------------------------------------------------------------- /explorer/frontend/src/Explorer/View/calculator.css: -------------------------------------------------------------------------------- 1 | 2 | .explorer-calculator { 3 | background-color: var(--color4); 4 | 5 | &__container { 6 | @extend .outer-container; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /explorer/frontend/src/Lib/Waypoints/Waypoints.js: -------------------------------------------------------------------------------- 1 | require('@noframework.waypoints'); 2 | 3 | exports.waypointImpl = function (elementId, callback, offset) { 4 | return new Waypoint({ 5 | element: document.getElementById(elementId), 6 | handler: function(direction) { 7 | callback(direction)(); 8 | }, 9 | offset: offset 10 | }); 11 | } 12 | 13 | exports.destroyImpl = function (waypoint) { 14 | return waypoint.destroy(); 15 | } 16 | -------------------------------------------------------------------------------- /explorer/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | // styles 2 | import './index.css'; 3 | // app 4 | import Main from './Main.purs'; 5 | import {initialState} from './Explorer/State.purs'; 6 | 7 | // HMR 8 | if(module.hot) { 9 | var main = Main.main(window.__puxLastState || initialState)() 10 | main.state.subscribe(function (state) { 11 | window.__puxLastState = state; 12 | }); 13 | module.hot.accept(); 14 | } else { 15 | Main.main(initialState)(); 16 | } 17 | -------------------------------------------------------------------------------- /explorer/frontend/src/index.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |