Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update parity replay with latest classifications #2095

Open
wants to merge 1 commit into
base: parity-replay
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/kadena-io/pact-5.git
tag: 52f41d6b48584e8fcbfae745a6e3abe640500885
tag: 1f9392dc4de0bbed8fa7f990553386a31cd5e189
--sha256: 06karzsrih0hjkdipc8s171v4vgk09j5w6fa7zm3rv6qjw6j6jar

source-repository-package
Expand Down
14 changes: 14 additions & 0 deletions classify-diffs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ mkdir -p diffs/interesting
mkdir -p diffs/defschema-term-position
mkdir -p diffs/invalid-governance
mkdir -p diffs/invalid-def-defschema-position
mkdir -p diffs/invalid-blessed-hash
mkdir -p diffs/defpact-entity

classify_diff() {
grep -q 'Loaded module' "$1" && mv -f "$1" diffs/loaded-module-hash/ && return
Expand Down Expand Up @@ -110,6 +112,8 @@ classify_diff() {
grep -q 'Cannot use defschema \w* in term variable position' "$1" && mv -f "$1" diffs/defschema-term-position && return
grep -q 'Invalid governance. Must be a 0-argument defcap or a keyset.' "$1" && mv -f "$1" diffs/invalid-governance && return
grep -q 'Invalid def in defschema position' "$1" && mv -f "$1" diffs/invalid-def-defschema-position && return
grep -q 'Invalid blessed hash, incorrect format' "$1" && mv -f "$1" diffs/invalid-blessed-hash && return
grep -q 'Pact 5 does not support entity expressions in defpact' "$1" && mv -f "$1" diffs/defpact-entity && return
}

for f in parity-replay-diffs/*; do
Expand Down Expand Up @@ -198,6 +202,16 @@ mv -f parity-replay-diffs/s6w1VVITn* diffs/list-commas 2> /dev/null

mv -f parity-replay-diffs/EMaD-w9ConQkyLfg6_RsfNtld-fS1pEclfTSwtRdNzs.md diffs/interesting 2> /dev/null
mv -f parity-replay-diffs/bSbkJeudtFC6eiz1x9FTL5jwRkdOzO4bzwKK_DLGisI.md diffs/interesting 2> /dev/null
mv -f parity-replay-diffs/uHM_66xiDIxpB9CQzxKoNbtYfJ6hkfl1PU_2PvAyl4E.md diffs/interesting 2> /dev/null
mv -f parity-replay-diffs/nVq3xSmmz2DRhcRzjNdRDwo4YY10TKSTgkCS9rk5L2M.md diffs/interesting 2> /dev/null
mv -f parity-replay-diffs/XwCeYcM4tyDNZePdBqggnzmIb_plES9p8PREl-xd7yw.md diffs/interesting 2> /dev/null
Comment on lines +205 to +207
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are all the same class, make this a manually-classified class rather than putting them in diffs/interesting, which is for one-offs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍



mv -f parity-replay-diffs/F4rREqcjnX4Rztsxu4zKX6r_lMRCSAtiZcsjAehTdCE.md diffs/defpact-entity 2> /dev/null
mv -f parity-replay-diffs/guXsNE57BOuOW_CyiAOObV_ooPZyDXEy13pqzseh7zY.md diffs/defpact-entity 2> /dev/null
mv -f parity-replay-diffs/SQAOHyNBSxM42WGL-Sr0HzcFyc8hrL4G9eYmjREkD1E.md diffs/defpact-entity 2> /dev/null
mv -f parity-replay-diffs/WcMI_riWdz3B9zT1I8oSz2wSbxlLPkZb-kpDpw_hbcs.md diffs/defpact-entity 2> /dev/null
mv -f parity-replay-diffs/Xx8Kt_4YePIND13ZVq8F9grrxzNLCyV-KisBmtO8HMw.md diffs/defpact-entity 2> /dev/null

# mv parity-replay-diffs/14RYfa6_zc8UTWPNyMOqV00jfApmk6spD3v9z7OvwWA.md diffs/interesting 2> /dev/null
# mv parity-replay-diffs/AtlJbN56F2H_ibfuOfepu3NNiVMy8i9SJp6NIUZUkqM.md diffs/interesting 2> /dev/null
Expand Down
12 changes: 9 additions & 3 deletions src/Chainweb/Pact4/Backend/ChainwebPactDb.hs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ import Chainweb.Version.Guards
import Control.Exception.Safe
import Pact.Types.Command (RequestKey)
import Chainweb.Pact.Backend.Types
-- import qualified Data.ByteString as B
-- import System.Directory
-- import System.FilePath

domainTableName :: Domain k v -> SQ3.Utf8
domainTableName = asStringUtf8
Expand Down Expand Up @@ -313,9 +316,12 @@ doReadRow mlim d k = forModuleNameFix $ \mnFix ->
-- resolution concerns
Modules -> do
v <- lookupWithKey (convModuleName mnFix k) checkModuleCache
-- _ <- forM v $ \m -> do
-- liftIO $ createDirectoryIfMissing True "parity-replay-modules"
-- liftIO $ B.writeFile ("parity-replay-modules" </> T.unpack (asString k)) $ J.encodeStrict m
-- Note: Uncomment this to write modules to "parity-replay-modules",
-- but note that this does not work when running more than one chain in parallel during replay
-- This is essentially for debugging purposes only.
-- _ <- forM v $ \m -> do
-- liftIO $ createDirectoryIfMissing True "parity-replay-modules"
-- liftIO $ B.writeFile ("parity-replay-modules" </> T.unpack (asString k)) $ J.encodeStrict m
pure v
Namespaces -> lookupWithKey (convNamespaceName k) noCache
(UserTables _) -> lookupWithKey (convRowKey k) noCache
Expand Down
Loading