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

Rosetta Tests #1079

Merged
merged 68 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
b874139
initial commit
emilypi Jun 15, 2020
e75d182
Merge branch 'master' into rosetta-tests
emilypi Jun 15, 2020
090986e
fix exports
emilypi Jun 15, 2020
bdff193
Merge branch 'master' into rosetta-tests
emilypi Jun 17, 2020
fda98c0
boilerplate extravaganza
emilypi Jun 17, 2020
c13b9ba
she compiles
emilypi Jun 18, 2020
80e841a
merge master
emilypi Jun 18, 2020
955791a
merge maseter
emilypi Jun 18, 2020
ffd8841
prep
emilypi Jun 18, 2020
6ac6d7d
remove multinode code dupe
emilypi Jun 18, 2020
cd8213a
put back extra dep
emilypi Jun 18, 2020
0ef7169
partition out common code
emilypi Jun 18, 2020
dde28f2
first batch of tests work
emilypi Jun 18, 2020
74ea49a
account balance
emilypi Jun 19, 2020
42d9107
remove target chain
emilypi Jun 19, 2020
74124fd
remove target chain
emilypi Jun 19, 2020
e94ddf8
remove chainweb network
emilypi Jun 19, 2020
e3dd33b
add block stuff
emilypi Jun 19, 2020
fa7a771
implement block tests
emilypi Jun 22, 2020
b73b9b1
merge master
emilypi Jun 22, 2020
b114ff0
add simple checks fro network list/options/status
emilypi Jun 23, 2020
741c334
making progress. TODO's listed
emilypi Jun 23, 2020
d493098
update status test
emilypi Jun 23, 2020
256621d
make options test a little nicer
emilypi Jun 24, 2020
c9bd5ef
fix account balance test
emilypi Jun 24, 2020
1dcc5ff
small changes
emilypi Jun 24, 2020
e6fa205
add async tests for mempool
emilypi Jun 25, 2020
5f7ee94
add fixes to mempool test, keep going on mempool transaction
emilypi Jun 25, 2020
5cfc8c4
Merge branch 'master' into rosetta-tests
emilypi Jun 25, 2020
0c67a2a
remove cruft, finish block tx test
emilypi Jun 26, 2020
2d8ab02
Merge branch 'rosetta-tests' of github.com:kadena-io/chainweb-node in…
emilypi Jun 26, 2020
0225549
add construction submit endpoint test
emilypi Jun 30, 2020
6493ef2
Merge branch 'master' into rosetta-tests
emilypi Jun 30, 2020
efb4500
unnecessary scheduling
emilypi Jun 30, 2020
d632f0f
done for the day
emilypi Jun 30, 2020
9ad98f3
Merge branch 'master' into rosetta-tests
emilypi Jul 3, 2020
45460d1
Merge branch 'master' into rosetta-tests
emilypi Jul 6, 2020
2e36deb
last thing: remeds
emilypi Jul 6, 2020
fb73811
use actual devnet remediations (hash-changing update)
emilypi Jul 6, 2020
8e15889
remove fasttimed cpm payload
emilypi Jul 6, 2020
a099c52
rosetta tests done, TODO: fix the tests broken by using actual remedi…
emilypi Jul 7, 2020
1c7e371
fix pact in proc api test
emilypi Jul 7, 2020
7558a3c
unmask -Werror
emilypi Jul 7, 2020
18bc7dc
pare back some cruft
emilypi Jul 7, 2020
f7b6be1
Merge branch 'master' into rosetta-tests
emilypi Jul 7, 2020
cb0dd1c
clean up module tests
emilypi Jul 7, 2020
f00de17
Merge branch 'rosetta-tests' of github.com:kadena-io/chainweb-node in…
emilypi Jul 7, 2020
c95e9e0
revert coinv2 block height increase
emilypi Jul 7, 2020
5a1450d
revert adding remediation to txs
emilypi Jul 8, 2020
afd67e8
remove hie.yaml
emilypi Jul 8, 2020
cd552ae
revert whitespace changes
emilypi Jul 8, 2020
e0ba6b4
Merge branch 'master' into rosetta-tests
emilypi Jul 8, 2020
ca30b4d
add note about 20-chain upgrades
emilypi Jul 8, 2020
97400fe
bad merge
emilypi Jul 8, 2020
90e0a1f
Merge branch 'master' into rosetta-tests
emilypi Jul 8, 2020
88f94ad
remove comment + whitespace
emilypi Jul 8, 2020
65b00f8
Merge branch 'rosetta-tests' of github.com:kadena-io/chainweb-node in…
emilypi Jul 8, 2020
dda1f2e
Merge branch 'master' into rosetta-tests
emilypi Jul 9, 2020
11a3c35
Merge branch 'master' into rosetta-tests
emilypi Jul 9, 2020
dc04db7
Merge branch 'master' into rosetta-tests
emilypi Jul 9, 2020
dba49b1
fix conflicts
emilypi Jul 9, 2020
7884c6f
Merge branch 'rosetta-tests' of github.com:kadena-io/chainweb-node in…
emilypi Jul 9, 2020
4095877
update header
emilypi Jul 9, 2020
c906aa0
remove some cruft
emilypi Jul 9, 2020
6a2f1a0
Merge branch 'master' into rosetta-tests
emilypi Jul 9, 2020
3697c84
Update test/Chainweb/Test/Rosetta/RestAPI.hs
emilypi Jul 9, 2020
e2cefe9
address linda's comments
emilypi Jul 9, 2020
79ce35d
add note
emilypi Jul 9, 2020
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
Prev Previous commit
Next Next commit
remove cruft, finish block tx test
  • Loading branch information
emilypi committed Jun 26, 2020
commit 0c67a2ac761bf639f8cad506106cb3bf61b94acf
1 change: 0 additions & 1 deletion src/Chainweb/Mempool/InMem.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ memberInMem :: MVar (InMemoryMempoolData t)
memberInMem lock txs = do
q <- withMVarMasked lock (readIORef . _inmemPending)
V.mapM (memberOne q) txs

where
memberOne q txHash = return $! HashMap.member txHash q

Expand Down
41 changes: 4 additions & 37 deletions test/Chainweb/Test/RestAPI/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
module Chainweb.Test.RestAPI.Utils
( -- * Retry Policies
testRetryPolicy
, fastRetryPolicy

-- * Debugging
, debug

-- * Utils
, repeatUntil

-- * Pact client DSL
, PactTestFailure(..)
, PollingExpectation(..)
Expand All @@ -19,6 +21,7 @@ module Chainweb.Test.RestAPI.Utils
, spv
, sending
, polling

-- * Rosetta client DSL
, RosettaTestException(..)
, accountBalance
Expand All @@ -27,7 +30,6 @@ module Chainweb.Test.RestAPI.Utils
, constructionMetadata
, constructionSubmit
, mempoolTransaction
, mempoolTransactionWithFastRetry
, mempool
, networkOptions
, networkList
Expand Down Expand Up @@ -88,23 +90,6 @@ testRetryPolicy = stepped <> limitRetries 150
2 -> Just 100_000
_ -> Just 250_000

-- | Backoff up to a constant 25ms, limiting to 12s
--
fastRetryPolicy :: RetryPolicy
fastRetryPolicy = fastSteps <> limitRetries 500
where
fastSteps = retryPolicy $ \rs -> case rsIterNumber rs of
0 -> Just 100
1 -> Just 200
2 -> Just 300
3 -> Just 400
4 -> Just 500
5 -> Just 600
6 -> Just 700
7 -> Just 800
8 -> Just 900
_ -> Just 25_000

-- ------------------------------------------------------------------ --
-- Pact api client utils w/ retry

Expand Down Expand Up @@ -374,24 +359,6 @@ mempoolTransaction cenv req =
MempoolTransactionFailure _ -> return True
_ -> return False

mempoolTransactionWithFastRetry
:: ClientEnv
-> MempoolTransactionReq
-> IO MempoolTransactionResp
mempoolTransactionWithFastRetry cenv req =
recovering fastRetryPolicy [h] $ \s -> do
debug
$ "requesting mempool transaction for " <> (show req)
<> " [" <> show (view rsIterNumberL s) <> "]"

runClientM (rosettaMempoolTransactionApiClient v req) cenv >>= \case
Left e -> throwM $ MempoolTransactionFailure (show e)
Right t -> return t
where
h _ = Handler $ \case
MempoolTransactionFailure _ -> return True
_ -> return False

mempool
:: ClientEnv
-> MempoolReq
Expand Down
Loading