Skip to content

Commit

Permalink
Generate mainnet event dump
Browse files Browse the repository at this point in the history
  • Loading branch information
zliu41 committed Jun 23, 2022
1 parent 4a2e471 commit 9bc2509
Show file tree
Hide file tree
Showing 15 changed files with 647 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .buildkite/plutus-script-dump.yml
Expand Up @@ -6,6 +6,6 @@ steps:
concurrency: 1
concurrency_group: "plutus-script-evaluation"
soft_fail: true
timeout_in_minutes: 180
timeout_in_minutes: 240
agents:
queue: "plutus"
7 changes: 4 additions & 3 deletions cabal.project
Expand Up @@ -14,6 +14,7 @@ packages: doc
plutus-pab
plutus-pab-executables
plutus-playground-server
plutus-script-evaluation-test
plutus-script-utils
plutus-use-cases
plutus-streaming
Expand Down Expand Up @@ -107,7 +108,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/plutus
tag: 5cc518f1202930ad52b8ba838af32af084c0e754
tag: 267d387c4873a6cf892dbe862662e4103e062f92
subdir:
plutus-core
plutus-ledger-api
Expand Down Expand Up @@ -168,8 +169,8 @@ source-repository-package
-- Cardano mainnet (>=1.35)
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: 65422ff373f2f88a563afa746a9a16d211ffdc7c
location: https://github.com/zliu41/cardano-node
tag: 54d3866a5aa053af97654be851778e1fbf26f804
subdir:
cardano-api
cardano-cli
Expand Down
4 changes: 2 additions & 2 deletions nix/pkgs/haskell/sha256map.nix
Expand Up @@ -5,15 +5,15 @@
"https://github.com/input-output-hk/cardano-config"."e9de7a2cf70796f6ff26eac9f9540184ded0e4e6" = "1wm1c99r5zvz22pdl8nhkp13falvqmj8dgkm8fxskwa9ydqz01ld";
"https://github.com/input-output-hk/cardano-crypto"."f73079303f663e028288f9f4a9e08bcca39a923e" = "1n87i15x54s0cjkh3nsxs4r1x016cdw1fypwmr68936n3xxsjn6q";
"https://github.com/input-output-hk/cardano-ledger"."1db68a3ec0a2dcb5751004beb22b906162474f23" = "03pv2jvskbi65dwaddp6a8bxbbcw674csjxhg8xbqd6q1kfpc41a";
"https://github.com/input-output-hk/cardano-node"."65422ff373f2f88a563afa746a9a16d211ffdc7c" = "0rvwf2nmfn8yad0004qfp1racygriqrd7fd0z2wgbjgh18dfnin2";
"https://github.com/zliu41/cardano-node"."54d3866a5aa053af97654be851778e1fbf26f804" = "sha256-aSqyxjCGrwG3pu2XRq0VTuuKTF9aulp4//ftb1q52qA=";
"https://github.com/input-output-hk/cardano-prelude"."bb4ed71ba8e587f672d06edf9d2e376f4b055555" = "sha256-kgX3DKyfjBb8/XcDEd+/adlETsFlp5sCSurHWgsFAQI=";
"https://github.com/ak3n/cw"."538375cb3efa0c66604ff0b13b6ecc0c4a694d64" = "sha256-rCVX42d2nM67aWBPUu2wdMAGQ6s25VJcrEZwUUYa800=";
"https://github.com/input-output-hk/goblins"."cde90a2b27f79187ca8310b6549331e59595e7ba" = "sha256-z9ut0y6umDIjJIRjz9KSvKgotuw06/S8QDwOtVdGiJ0=";
"https://github.com/input-output-hk/hedgehog-extras"."967d79533c21e33387d0227a5f6cc185203fe658" = "0rbqb7a64aya1qizlr3im06hdydg9zr6sl3i8bvqqlf7kpa647sd";
"https://github.com/input-output-hk/iohk-monitoring-framework"."eb7854d1337637b8672af1227b276aa33a658f47" = "1ll81hlhkhj96f5v6lswjkq2h8f7zcmdrj2azqhi4ylzafn026r3";
"https://github.com/input-output-hk/optparse-applicative"."7497a29cb998721a9068d5725d49461f2bba0e7a" = "1gvsrg925vynwgqwplgjmp53vj953qyh3wbdf34pw21c8r47w35r";
"https://github.com/input-output-hk/ouroboros-network"."ad47441e9e399495579d7dd05ccaf96b46a487b2" = "1a54yfc4m9n5j699cn8ln524h28043dyrlzn34wmnhsgqnxhavr4";
"https://github.com/input-output-hk/plutus"."5cc518f1202930ad52b8ba838af32af084c0e754" = "sha256-bmkP98dcMdDDmAk5UsceYh0Wme19Z0squHWJnY8FO3E=";
"https://github.com/input-output-hk/plutus"."267d387c4873a6cf892dbe862662e4103e062f92" = "sha256-4PebMCwh5y6uPFZW+c1gxZn7zR+PUdgLZv1wLUwN0co=";
"https://github.com/input-output-hk/purescript-bridge"."47a1f11825a0f9445e0f98792f79172efef66c00" = "0da1vn2l6iyfxcjk58qal1l4755v92zi6yppmjmqvxf1gacyf9px";
"https://github.com/input-output-hk/servant-purescript"."44e7cacf109f84984cd99cd3faf185d161826963" = "10pb0yfp80jhb9ryn65a4rha2lxzsn2vlhcc6xphrrkf4x5lhzqc";
"https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d" = "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx";
Expand Down
26 changes: 26 additions & 0 deletions plutus-script-evaluation-test/dump-script-events/Main.hs
@@ -0,0 +1,26 @@
module Main (main) where

import Options.Applicative qualified as O
import Plutus.Script.Evaluation.Dump (dumpScriptEvents)
import Plutus.Script.Evaluation.Options (parserInfo)

{-
Example:
AWS_ACCESS_KEY_ID=plutus \
AWS_SECRET_ACCESS_KEY=plutuskey \
AWS_DEFAULT_REGION=us-east-1 \
AWS_ENDPOINT_URL=https://s3.devx.iog.io \
S3_DUMP_DIR=s3://plutus/mainnet-script-dump/ \
cabal v2-run plutus-script-evaluation-test:dump-script-events -- \
--socket-path $HOME/cardano/db/node.socket \
--config $HOME/cardano/mainnet-config.json \
--mainnet \
--blocks-per-file 10000 \
--events-per-file 50000 \
--dir $HOME/cardano-dump
-}

main :: IO ()
main = dumpScriptEvents =<< O.execParser parserInfo
84 changes: 84 additions & 0 deletions plutus-script-evaluation-test/plutus-script-evaluation-test.cabal
@@ -0,0 +1,84 @@
cabal-version: 3.0
name: plutus-script-evaluation-test
version: 0.1.0.0

common lang
default-language: Haskell2010
default-extensions:
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
ExplicitForAll
GeneralizedNewtypeDeriving
ImportQualifiedPost
LambdaCase
NamedFieldPuns
ScopedTypeVariables
StandaloneDeriving
ghc-options:
-O2
-Wall
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wmissing-import-lists
-Wnoncanonical-monad-instances
-Wredundant-constraints
-Wunused-packages

library testlib
import: lang
hs-source-dirs: testlib
exposed-modules:
Plutus.Script.Evaluation.Dump
Plutus.Script.Evaluation.Options
Plutus.Script.Evaluation.Types
build-depends:
PyF,
async,
base >=4.9 && <5,
base16-bytestring,
cardano-api,
cardano-binary,
cardano-ledger-alonzo,
cardano-ledger-core,
containers,
extra,
filepath,
optparse-applicative,
plutus-ledger-api,
plutus-ledger-api:plutus-ledger-api-testlib,
plutus-streaming,
serialise,
streaming,
text,
time,
transformers

executable dump-script-events
import: lang
hs-source-dirs: dump-script-events
main-is: Main.hs
build-depends:
PyF,
base >=4.9 && <5,
base16-bytestring,
cardano-api,
cardano-binary,
cardano-ledger-alonzo,
cardano-ledger-core,
extra,
filepath,
optparse-applicative,
plutus-core,
plutus-ledger-api,
plutus-ledger-api:plutus-ledger-api-testlib,
plutus-streaming,
serialise,
streaming,
text,
time,
transformers,
testlib

0 comments on commit 9bc2509

Please sign in to comment.