-
Notifications
You must be signed in to change notification settings - Fork 217
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
Flaky BYRON_ADDRESSES, ADDRESS_IMPORT_05 - I can import 15000 of addresses #2218
Comments
The integration tests looks pretty simple, I'd guess the problem isn't there. This should be the responsible function: importRandomAddresses
:: forall ctx s k.
( HasDBLayer s k ctx
, RndStateLike s
, k ~ ByronKey
)
=> ctx
-> WalletId
-> [Address]
-> ExceptT ErrImportRandomAddress IO ()
importRandomAddresses ctx wid addrs = db & \DBLayer{..} -> mapExceptT atomically $ do
cp <- withExceptT ErrImportAddrNoSuchWallet
$ withNoSuchWallet wid (readCheckpoint (PrimaryKey wid))
let s0 = getState cp
ours = scanl' (\s addr -> s >>= Rnd.importAddress addr) (Right s0) addrs
case last ours of
Left err ->
throwE $ ErrImportAddr err
Right s' ->
withExceptT ErrImportAddrNoSuchWallet $
putCheckpoint (PrimaryKey wid) (updateState s' cp)
where
db = ctx ^. dbLayer @s @k There is an I'm guessing though, that I'm guessing changing that would be pretty complex. And low priority, given that it is about legacy byron wallets. So we could mark it |
@Anviking the point of the The problem may not be in this function but somewhere else, a function that would read and update a checkpoint in two separate |
I know. But if I'm thinking something like this:
|
Ouch. Yes. Because addresses are then added only at a recent slot which gets dropped with the rollback. That's quite bad and a pretty major issue. |
Not flaky but a real issue: ADP-619 |
Context
#2161 (comment)
The
ADDRESS_IMPORT_05 - I can import 15000 of addresses
test can probably be expected to be somewhat slow.Test Case
https://github.com/input-output-hk/cardano-wallet/blob/4ad068a00187df54b52ba1c88ed68b2b264866bf/lib/core-integration/src/Test/Integration/Scenario/API/Byron/Addresses.hs#L401-L433
Failure / Counter-example
Resolution
QA
The text was updated successfully, but these errors were encountered: