2023-09-08 00:31:13 -07:00
// G e n e r a t e d u s i n g S o u r c e r y 2 . 0 . 3 — h t t p s : / / g i t h u b . c o m / k r z y s z t o f z a b l o c k i / S o u r c e r y
2023-04-24 14:15:20 -07:00
// D O N O T E D I T
/*
!!!!! To edit this file go to ZcashErrorCodeDefinition first and udate / add codes . Then run generateErrorCode . sh script to regenerate this file .
By design each error should be used only at one place in the app . Thanks to that it is possible to identify exact line in the code from which the
error originates . And it can help with debugging .
*/
import Foundation
public enum ZcashError : Equatable , Error {
2023-05-21 09:48:29 -07:00
// / S o m e e r r o r h a p p e n e d t h a t i s n o t h a n d l e d a s ` Z c a s h E r r o r ` . A l l e r r o r s i n t h e S D K a r e ( s h o u l d b e ) ` Z c a s h E r r o r ` .
// / T h i s c a s e i s i d e a l l y n o t c o n t r u c t e d d i r e c t l y o r t h r o w n b y a n y S D K f u n c t i o n , r a t h e r i t ' s a w r a p p e r f o r c a s e c l i e n t s e x p e c t Z c a s h E r r o t a n d w a n t t o p a s s i t t o a f u n c t i o n / e n u m .
// / I f t h i s i s t h e c a s e , u s e ` t o Z c a s h E r r o r ( ) ` e x t e n s i o n o f E r r o r . T h i s h e l p e r a v o i d s t o e n d u p w i t h O p t i o n a l h a n d l i n g .
2023-05-09 04:31:05 -07:00
// / Z U N K W N 0 0 0 1
case unknown ( _ error : Error )
2023-04-24 14:15:20 -07:00
// / U p d a t i n g o f p a t h s i n ` I n i t i l i z e r ` a c c o r d i n g t o a l i a s f a i l e d .
// / Z I N I T 0 0 0 1
case initializerCantUpdateURLWithAlias ( _ url : URL )
// / A l i a s u s e d t o c r e a t e t h i s i n s t a n c e o f t h e ` S D K S y n c h r o n i z e r ` i s a l r e a d y u s e d b y o t h e r i n s t a n c e .
// / Z I N I T 0 0 0 2
case initializerAliasAlreadyInUse ( _ alias : ZcashSynchronizerAlias )
2023-05-21 09:48:29 -07:00
// / O b j e c t o n d i s k a t ` g e n e r a l S t o r a g e U R L ` p a t h e x i s t s . B u t i t f i l e n o t d i r e c t o r y .
// / Z I N I T 0 0 0 3
case initializerGeneralStorageExistsButIsFile ( _ generalStorageURL : URL )
// / C a n ' t c r e a t e d i r e c t o r y a t ` g e n e r a l S t o r a g e U R L ` p a t h .
// / Z I N I T 0 0 0 4
case initializerGeneralStorageCantCreate ( _ generalStorageURL : URL , _ error : Error )
// / C a n ' t s e t ` i s E x c l u d e d F r o m B a c k u p ` f l a g t o ` g e n e r a l S t o r a g e U R L ` .
// / Z I N I T 0 0 0 5
case initializerCantSetNoBackupFlagToGeneralStorageURL ( _ generalStorageURL : URL , _ error : Error )
2023-04-24 14:15:20 -07:00
// / U n k n o w n G R P C S e r v i c e e r r o r
// / Z S R V C 0 0 0 1
case serviceUnknownError ( _ error : Error )
// / L i g h t W a l l e t S e r v i c e . g e t I n f o f a i l e d .
// / Z S R V C 0 0 0 2
case serviceGetInfoFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . l a t e s t B l o c k f a i l e d .
// / Z S R V C 0 0 0 3
case serviceLatestBlockFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . l a t e s t B l o c k H e i g h t f a i l e d .
// / Z S R V C 0 0 0 4
case serviceLatestBlockHeightFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . b l o c k R a n g e f a i l e d .
// / Z S R V C 0 0 0 5
case serviceBlockRangeFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . s u b m i t f a i l e d .
// / Z S R V C 0 0 0 6
case serviceSubmitFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . f e t c h T r a n s a c t i o n f a i l e d .
// / Z S R V C 0 0 0 7
case serviceFetchTransactionFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . f e t c h U T X O s f a i l e d .
// / Z S R V C 0 0 0 8
case serviceFetchUTXOsFailed ( _ error : LightWalletServiceError )
// / L i g h t W a l l e t S e r v i c e . b l o c k S t r e a m f a i l e d .
// / Z S R V C 0 0 0 0
case serviceBlockStreamFailed ( _ error : LightWalletServiceError )
2023-07-30 23:51:04 -07:00
// / L i g h t W a l l e t S e r v i c e . g e t S u b t r e e R o o t s f a i l e d .
// / Z S R V C 0 0 0 9
case serviceSubtreeRootsStreamFailed ( _ error : LightWalletServiceError )
2023-04-24 14:15:20 -07:00
// / S i m p l e C o n n e c t i o n P r o v i d e r i n i t o f C o n n e c t i o n f a i l e d .
// / Z S C P C 0 0 0 1
case simpleConnectionProvider ( _ error : Error )
// / D o w n l o a d e d f i l e w i t h s a p l i n g s p e n d i n g p a r a m e t e r s i s n ' t v a l i d .
// / Z S A P P 0 0 0 1
case saplingParamsInvalidSpendParams
// / D o w n l o a d e d f i l e w i t h s a p l i n g o u t p u t p a r a m e t e r s i s n ' t v a l i d .
// / Z S A P P 0 0 0 2
case saplingParamsInvalidOutputParams
// / F a i l e d t o d o w n l o a d s a p l i n g p a r a m e t e r s f i l e
// / - ` e r r o r ` i s d o w n l o a d e r r o r .
// / - ` d o w n l o a d U R L ` i s U R L f r o m w h i c h w a s f i l e d o w n l o a d e d .
// / Z S A P P 0 0 0 3
case saplingParamsDownload ( _ error : Error , _ downloadURL : URL )
// / F a i l e d t o m o v e s a p l i n g p a r a m e t e r s f i l e t o f i n a l d e s t i n a t i o n a f t e r d o w n l o a d .
// / - ` e r r o r ` i s m o v e e r r o r .
// / - ` d o w n l o a d U R L ` i s U R L f r o m w h i c h w a s f i l e d o w n l o a d e d .
// / - ` d e s t i n a t i o n ` i s f i l e s y s t e m U R L p o i n t i n g t o l o c a t i o n w h e r e d o w n l o a d e d f i l e s h o u l d b e m o v e d .
// / Z S A P P 0 0 0 4
case saplingParamsCantMoveDownloadedFile ( _ error : Error , _ downloadURL : URL , _ destination : URL )
// / S Q L i t e q u e r y f a i l e d w h e n f e t c h i n g b l o c k i n f o r m a t i o n f r o m d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z B D A O 0 0 0 1
case blockDAOBlock ( _ sqliteError : Error )
// / F e t c h e d b l o c k i n f o r m a t i o n f r o m D B b u t c a n ' t d e c o d e t h e m .
// / - ` e r r o r ` i s d e c o d i n g e r r o r .
// / Z B D A O 0 0 0 2
case blockDAOCantDecode ( _ error : Error )
// / S Q L i t e q u e r y f a i l e d w h e n f e t c h i n g h e i g h t o f t h e l a t e s t b l o c k f r o m t h e d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z B D A O 0 0 0 3
case blockDAOLatestBlockHeight ( _ sqliteError : Error )
// / S Q L i t e q u e r y f a i l e d w h e n f e t c h i n g t h e l a t e s t b l o c k f r o m t h e d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z B D A O 0 0 0 4
case blockDAOLatestBlock ( _ sqliteError : Error )
2023-06-15 07:54:09 -07:00
// / F e t c h e d l a t e s t b l o c k i n f o r m a t i o n f r o m D B b u t c a n ' t d e c o d e t h e m .
2023-04-24 14:15:20 -07:00
// / - ` e r r o r ` i s d e c o d i n g e r r o r .
// / Z B D A O 0 0 0 5
case blockDAOLatestBlockCantDecode ( _ error : Error )
2023-06-15 07:54:09 -07:00
// / S Q L i t e q u e r y f a i l e d w h e n f e t c h i n g t h e f i r s t u n e n h a n c e d b l o c k f r o m t h e d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z B D A O 0 0 0 6
case blockDAOFirstUnenhancedHeight ( _ sqliteError : Error )
// / F e t c h e d u n e n h a n c e d b l o c k i n f o r m a t i o n f r o m D B b u t c a n ' t d e c o d e t h e m .
// / - ` e r r o r ` i s d e c o d i n g e r r o r .
// / Z B D A O 0 0 0 7
case blockDAOFirstUnenhancedCantDecode ( _ error : Error )
2023-04-24 14:15:20 -07:00
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . c r e a t e A c c o u n t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 0 1
case rustCreateAccount ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . c r e a t e T o A d d r e s s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 0 2
case rustCreateToAddress ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . d e c r y p t A n d S t o r e T r a n s a c t i o n
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 0 3
case rustDecryptAndStoreTransaction ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t C u r r e n t A d d r e s s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 0 5
case rustGetCurrentAddress ( _ rustError : String )
// / U n i f i e d a d d r e s s g e n e r a t e d b y r u s t l a y e r i s i n v a l i d w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t C u r r e n t A d d r e s s
// / Z R U S T 0 0 0 6
case rustGetCurrentAddressInvalidAddress
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t N e a r e s t R e w i n d H e i g h t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 0 7
case rustGetNearestRewindHeight ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t N e x t A v a i l a b l e A d d r e s s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 0 8
case rustGetNextAvailableAddress ( _ rustError : String )
// / U n i f i e d a d d r e s s g e n e r a t e d b y r u s t l a y e r i s i n v a l i d w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t N e x t A v a i l a b l e A d d r e s s
// / Z R U S T 0 0 0 9
case rustGetNextAvailableAddressInvalidAddress
// / a c c o u n t p a r a m e t e r i s l o w e r t h a n 0 w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t B a l a n c e
// / - ` a c c o u n t ` i s a c c o u n t p a s s e d t o Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t B a l a n c e .
// / Z R U S T 0 0 1 0
case rustGetTransparentBalanceNegativeAccount ( _ account : Int )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t B a l a n c e
// / - ` a c c o u n t ` i s a c c o u n t p a s s e d t o Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t B a l a n c e .
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 1 1
case rustGetTransparentBalance ( _ account : Int , _ rustError : String )
// / a c c o u n t p a r a m e t e r i s l o w e r t h a n 0 w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t V e r i f i e d T r a n s p a r e n t B a l a n c e
// / - ` a c c o u n t ` i s a c c o u n t p a s s e d t o Z c a s h R u s t B a c k e n d . g e t V e r i f i e d T r a n s p a r e n t B a l a n c e .
// / Z R U S T 0 0 1 3
case rustGetVerifiedTransparentBalanceNegativeAccount ( _ account : Int )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t V e r i f i e d T r a n s p a r e n t B a l a n c e
// / - ` a c c o u n t ` i s a c c o u n t p a s s e d t o Z c a s h R u s t B a c k e n d . g e t V e r i f i e d T r a n s p a r e n t B a l a n c e .
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 1 4
case rustGetVerifiedTransparentBalance ( _ account : Int , _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . i n i t D a t a D b
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 1 5
case rustInitDataDb ( _ rustError : String )
// / A n y o f t h e v i e w i n g k e y s p a s s e d t o t h e Z c a s h R u s t B a c k e n d . i n i t A c c o u n t s T a b l e m e t h o d c o n t a i n s n u l l b y t e s b e f o r e e n d
// / Z R U S T 0 0 1 6
case rustInitAccountsTableViewingKeyCotainsNullBytes
// / A n y o f t h e v i e w i n g k e y s p a s s e d t o t h e Z c a s h R u s t B a c k e n d . i n i t A c c o u n t s T a b l e m e t h o d i s n ' t v a l i d
// / Z R U S T 0 0 1 7
case rustInitAccountsTableViewingKeyIsInvalid
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . i n i t A c c o u n t s T a b l e
// / Z R U S T 0 0 1 8
case rustInitAccountsTableDataDbNotEmpty
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . i n i t A c c o u n t s T a b l e
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 1 9
case rustInitAccountsTable ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . i n i t B l o c k M e t a d a t a D b
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 2 0
case rustInitBlockMetadataDb ( _ rustError : String )
// / U n a b l e t o a l l o c a t e m e m o r y r e q u i r e d t o w r i t e b l o c k s w h e n c a l l i n g Z c a s h R u s t B a c k e n d . w r i t e B l o c k s M e t a d a t a
// / Z R U S T 0 0 2 1
case rustWriteBlocksMetadataAllocationProblem
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . w r i t e B l o c k s M e t a d a t a
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 2 2
case rustWriteBlocksMetadata ( _ rustError : String )
// / h a s h p a s s e d t o t h e Z c a s h R u s t B a c k e n d . i n i t B l o c k s T a b l e m e t h o d c o n t a i n s n u l l b y t e s b e f o r e e n d
// / Z R U S T 0 0 2 3
case rustInitBlocksTableHashContainsNullBytes
// / s a p l i n g T r e e p a s s e d t o t h e Z c a s h R u s t B a c k e n d . i n i t B l o c k s T a b l e m e t h o d c o n t a i n s n u l l b y t e s b e f o r e e n d
// / Z R U S T 0 0 2 4
case rustInitBlocksTableSaplingTreeContainsNullBytes
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . i n i t B l o c k s T a b l e
// / Z R U S T 0 0 2 5
case rustInitBlocksTableDataDbNotEmpty
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . i n i t B l o c k s T a b l e
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 2 6
case rustInitBlocksTable ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . l i s t T r a n s p a r e n t R e c e i v e r s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 2 7
case rustListTransparentReceivers ( _ rustError : String )
// / T r a n s p a r e n t r e c e i v e r g e n e r a t e d b y r u s t l a y e r i s i n v a l i d w h e n c a l l i n g Z c a s h R u s t B a c k e n d . l i s t T r a n s p a r e n t R e c e i v e r s
// / Z R U S T 0 0 2 8
case rustListTransparentReceiversInvalidAddress
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . p u t U n s p e n t T r a n s p a r e n t O u t p u t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 2 9
case rustPutUnspentTransparentOutput ( _ rustError : String )
// / E r r o r u n r e l a t e d t o c h a i n v a l i d i t y f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . v a l i d a t e C o m b i n e d C h a i n
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 0
case rustValidateCombinedChainValidationFailed ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . r e w i n d T o H e i g h t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 2
case rustRewindToHeight ( _ height : Int32 , _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . r e w i n d C a c h e T o H e i g h t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 3
case rustRewindCacheToHeight ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . s c a n B l o c k s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 4
case rustScanBlocks ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . s h i e l d F u n d s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 5
case rustShieldFunds ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . c o n s e n s u s B r a n c h I d F o r
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 6
case rustNoConsensusBranchId ( _ height : Int32 )
// / a d d r e s s p a s s e d t o t h e Z c a s h R u s t B a c k e n d . r e c e i v e r T y p e c o d e s O n U n i f i e d A d d r e s s m e t h o d c o n t a i n s n u l l b y t e s b e f o r e e n d
// / - ` a d d r e s s ` i s a d d r e s s p a s s e d t o Z c a s h R u s t B a c k e n d . r e c e i v e r T y p e c o d e s O n U n i f i e d A d d r e s s .
// / Z R U S T 0 0 3 7
case rustReceiverTypecodesOnUnifiedAddressContainsNullBytes ( _ address : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . r e c e i v e r T y p e c o d e s O n U n i f i e d A d d r e s s
// / Z R U S T 0 0 3 8
case rustRustReceiverTypecodesOnUnifiedAddressMalformed
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . d e r i v e U n i f i e d S p e n d i n g K e y
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 3 9
case rustDeriveUnifiedSpendingKey ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . d e r i v e U n i f i e d F u l l V i e w i n g K e y
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 4 0
case rustDeriveUnifiedFullViewingKey ( _ rustError : String )
// / V i e w i n g k e y d e r i v e d b y r u s t l a y e r i s i n v a l i d w h e n c a l l i n g Z c a s h R u s t B a c k e n d . d e r i v e U n i f i e d F u l l V i e w i n g K e y
// / Z R U S T 0 0 4 1
case rustDeriveUnifiedFullViewingKeyInvalidDerivedKey
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t S a p l i n g R e c e i v e r
// / - ` a d d r e s s ` i s a d d r e s s p a s s e d t o Z c a s h R u s t B a c k e n d . g e t S a p l i n g R e c e i v e r .
// / Z R U S T 0 0 4 2
case rustGetSaplingReceiverInvalidAddress ( _ address : UnifiedAddress )
// / S a p l i n g r e c e i v e r g e n e r a t e d b y r u s t l a y e r i s i n v a l i d w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t S a p l i n g R e c e i v e r
// / Z R U S T 0 0 4 3
case rustGetSaplingReceiverInvalidReceiver
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t R e c e i v e r
// / - ` a d d r e s s ` i s a d d r e s s p a s s e d t o Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t R e c e i v e r .
// / Z R U S T 0 0 4 4
case rustGetTransparentReceiverInvalidAddress ( _ address : UnifiedAddress )
// / T r a n s p a r e n t r e c e i v e r g e n e r a t e d b y r u s t l a y e r i s i n v a l i d w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t T r a n s p a r e n t R e c e i v e r
// / Z R U S T 0 0 4 5
case rustGetTransparentReceiverInvalidReceiver
2023-07-19 10:13:59 -07:00
// / U n a b l e t o a l l o c a t e m e m o r y r e q u i r e d t o w r i t e b l o c k s w h e n c a l l i n g Z c a s h R u s t B a c k e n d . p u t S a p l i n g S u b t r e e R o o t s
2023-07-30 23:51:04 -07:00
// / s o u r c e r y : c o d e = " Z R U S T 0 0 4 6 "
2023-07-19 10:13:59 -07:00
// / Z R U S T 0 0 4 6
case rustPutSaplingSubtreeRootsAllocationProblem
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . p u t S a p l i n g S u b t r e e R o o t s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
2023-07-30 23:51:04 -07:00
// / s o u r c e r y : c o d e = " Z R U S T 0 0 4 7 "
2023-07-19 10:13:59 -07:00
// / Z R U S T 0 0 4 7
case rustPutSaplingSubtreeRoots ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . u p d a t e C h a i n T i p
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
2023-07-30 23:51:04 -07:00
// / s o u r c e r y : c o d e = " Z R U S T 0 0 4 8 "
2023-07-19 10:13:59 -07:00
// / Z R U S T 0 0 4 8
case rustUpdateChainTip ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . s u g g e s t S c a n R a n g e s
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
2023-07-30 23:51:04 -07:00
// / s o u r c e r y : c o d e = " Z R U S T 0 0 4 9 "
2023-07-19 10:13:59 -07:00
// / Z R U S T 0 0 4 9
case rustSuggestScanRanges ( _ rustError : String )
2023-09-08 00:31:13 -07:00
// / I n v a l i d t r a n s a c t i o n I D l e n g t h w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t M e m o . t x I d m u s t b e 3 2 b y t e s .
2023-08-07 17:47:22 -07:00
// / Z R U S T 0 0 5 0
case rustGetMemoInvalidTxIdLength
2023-09-06 04:28:25 -07:00
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . f u l l y S c a n n e d H e i g h t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 5 2
case rustFullyScannedHeight ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . m a x S c a n n e d H e i g h t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 5 3
case rustMaxScannedHeight ( _ rustError : String )
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . l a t e s t C a c h e d B l o c k H e i g h t
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 5 4
case rustLatestCachedBlockHeight ( _ rustError : String )
2023-09-08 00:31:13 -07:00
// / R u s t l a y e r ' s c a l l Z c a s h R u s t B a c k e n d . g e t S c a n P r o g r e s s r e t u r n e d v a l u e s t h a t a f t e r c o m p u t a t i o n a r e o u t s i d e o f a l l o w e d r a n g e 0 - 1 0 0 % .
// / - ` p r o g r e s s ` v a l u e r e p o r t e d
// / Z R U S T 0 0 5 5
case rustScanProgressOutOfRange ( _ progress : String )
2024-01-26 19:07:18 -08:00
// / E r r o r f r o m r u s t l a y e r w h e n c a l l i n g Z c a s h R u s t B a c k e n d . g e t W a l l e t S u m m a r y
// / - ` r u s t E r r o r ` c o n t a i n s e r r o r g e n e r a t e d b y t h e r u s t l a y e r .
// / Z R U S T 0 0 5 6
case rustGetWalletSummary ( _ rustError : String )
2023-04-24 14:15:20 -07:00
// / S Q L i t e q u e r y f a i l e d w h e n f e t c h i n g a l l a c c o u n t s f r o m t h e d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z A D A O 0 0 0 1
case accountDAOGetAll ( _ sqliteError : Error )
// / F e t c h e d a c c o u n t s f r o m S Q L i t e b u t c a n ' t d e c o d e t h e m .
// / - ` e r r o r ` i s d e c o d i n g e r r o r .
// / Z A D A O 0 0 0 2
case accountDAOGetAllCantDecode ( _ error : Error )
// / S Q L i t e q u e r y f a i l e d w h e n s e a c h i n g f o r a c c o u n t s i n t h e d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z A D A O 0 0 0 3
case accountDAOFindBy ( _ sqliteError : Error )
// / F e t c h e d a c c o u n t s f r o m S Q L i t e b u t c a n ' t d e c o d e t h e m .
// / - ` e r r o r ` i s d e c o d i n g e r r o r .
// / Z A D A O 0 0 0 4
case accountDAOFindByCantDecode ( _ error : Error )
// / O b j e c t p a s s e d t o u p d a t e ( ) m e t h o d c o n f o r m s t o ` A c c o u n t E n t i t y ` p r o t o c o l b u t i s n ' t e x a c t l y ` A c c o u n t ` t y p e .
// / Z A D A O 0 0 0 5
case accountDAOUpdateInvalidAccount
// / S Q L i t e q u e r y f a i l e d w h e n u p d a t i n g a c c o u n t i n t h e d a t a b a s e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z A D A O 0 0 0 6
case accountDAOUpdate ( _ sqliteError : Error )
// / U p d a t e o f t h e a c c o u n t u p d a t e d 0 r o w s i n t h e d a t a b a s e . O n e r o w s h o u l d b e u p d a t e d .
// / Z A D A O 0 0 0 7
case accountDAOUpdatedZeroRows
// / F a i l e d t o w r i t e b l o c k t o d i s k .
// / Z B L R P 0 0 0 0 1
2023-03-29 11:28:24 -07:00
case blockRepositoryWriteBlock ( _ block : ZcashCompactBlock , _ error : Error )
2023-04-24 14:15:20 -07:00
// / F a i l e d t o g e t f i l e n a m e f o r t h e b l o c k f r o m f i l e U R L .
// / Z B L R P 0 0 0 2
case blockRepositoryGetFilename ( _ url : URL )
// / F a i l e d t o p a r s e b l o c k h e i g h t f r o m f i l e n a m e .
// / Z B L R P 0 0 0 3
case blockRepositoryParseHeightFromFilename ( _ filename : String )
// / F a i l e d t o r e m o v e e x i s t i n g b l o c k f r o m d i s k .
// / Z B L R P 0 0 0 4
2023-03-29 11:28:24 -07:00
case blockRepositoryRemoveExistingBlock ( _ url : URL , _ error : Error )
2023-04-24 14:15:20 -07:00
// / F a i l e d t o g e t f i l e n a m e a n d i n f o r m a t i o n i f u r l p o i n t s t o d i r e c t o r y f r o m f i l e U R L .
// / Z B L R P 0 0 0 5
case blockRepositoryGetFilenameAndIsDirectory ( _ url : URL )
// / F a i l e d t o c r e a t e b l o c k s c a c h e d i r e c t o r y .
// / Z B L R P 0 0 0 6
2023-03-29 11:28:24 -07:00
case blockRepositoryCreateBlocksCacheDirectory ( _ url : URL , _ error : Error )
2023-04-24 14:15:20 -07:00
// / F a i l e d t o r e a d c o n t e n t o f d i r e c t o r y .
// / Z B L R P 0 0 0 7
2023-03-29 11:28:24 -07:00
case blockRepositoryReadDirectoryContent ( _ url : URL , _ error : Error )
2023-04-24 14:15:20 -07:00
// / F a i l e d t o r e m o v e b l o c k f r o m d i s k a f t e r r e w i n d o p e r a t i o n .
// / Z B L R P 0 0 0 8
2023-03-29 11:28:24 -07:00
case blockRepositoryRemoveBlockAfterRewind ( _ url : URL , _ error : Error )
2023-04-24 14:15:20 -07:00
// / F a i l e d t o r e m o v e b l o c k s c a c h e d i r e c t o r y w h i l e c l e a r i n g s t o r a g e .
// / Z B L R P 0 0 0 9
2023-03-29 11:28:24 -07:00
case blockRepositoryRemoveBlocksCacheDirectory ( _ url : URL , _ error : Error )
// / F a i l e d t o r e m o v e b l o c k f r o m c a c h e w h e n c l e a r i n g c a c h e u p t o s o m e h e i g h t .
// / Z B L R P 0 0 1 0
case blockRepositoryRemoveBlockClearingCache ( _ url : URL , _ error : Error )
// / T r y i n g t o d o w n l o a d b l o c k s b e f o r e s y n c r a n g e i s s e t i n ` B l o c k D o w n l o a d e r I m p l ` . T h i s m e a n s t h a t d o w n l o a d s t r e a m i s n o t c r e a t e d a n d d o w n l o a d c a n t ' s t a r t .
// / Z B D W N 0 0 0 1
case blockDownloadSyncRangeNotSet
2023-04-24 14:15:20 -07:00
// / S t r e a m d o w n l o a d i n g t h e g i v e n b l o c k r a n g e f a i l e d .
// / Z B D S E O 0 0 0 1
case blockDownloaderServiceDownloadBlockRange ( _ error : Error )
// / I n i t i a l i z a t i o n o f ` Z c a s h T r a n s a c t i o n . O v e r v i e w ` f a i l e d .
// / Z T E Z T 0 0 0 1
case zcashTransactionOverviewInit ( _ error : Error )
// / I n i t i a l i z a t i o n o f ` Z c a s h T r a n s a c t i o n . R e c e i v e d ` f a i l e d .
// / Z T E Z T 0 0 0 2
case zcashTransactionReceivedInit ( _ error : Error )
// / I n i t i a l i z a t i o n o f ` Z c a s h T r a n s a c t i o n . S e n t ` f a i l e d .
// / Z T E Z T 0 0 0 3
case zcashTransactionSentInit ( _ error : Error )
2023-05-05 10:30:47 -07:00
// / I n i t i a l i z a t i o n o f ` Z c a s h T r a n s a c t i o n . O u t p u t ` f a i l e d .
// / Z T E Z T 0 0 0 4
case zcashTransactionOutputInit ( _ error : Error )
// / I n i t i a l i z a t i o n o f ` Z c a s h T r a n s a c t i o n . O u t p u t ` f a i l e d b e c a u s e t h e r e a n i n c o n s i s t e n c y i n t h e o u t p u t r e c i p i e n t .
// / Z T E Z T 0 0 0 5
case zcashTransactionOutputInconsistentRecipient
2023-04-24 14:15:20 -07:00
// / E n t i t y n o t f o u n d i n t h e d a t a b a s e , r e s u l t o f ` c r e a t e E n t i t y ` e x e c u t i o n .
// / Z T R E E 0 0 0 1
case transactionRepositoryEntityNotFound
// / ` F i n d ` c a l l i s m i s s i n g f i e l d s , r e q u i r e d f i e l d s a r e t r a n s a c t i o n ` i n d e x ` a n d ` b l o c k T i m e ` .
// / Z T R E E 0 0 0 2
case transactionRepositoryTransactionMissingRequiredFields
// / C o u n t i n g a l l t r a n s a c t i o n s f a i l e d .
// / Z T R E E 0 0 0 3
case transactionRepositoryCountAll ( _ error : Error )
// / C o u n t i n g a l l u n m i n e d t r a n s a c t i o n s f a i l e d .
// / Z T R E E 0 0 0 4
case transactionRepositoryCountUnmined ( _ error : Error )
// / E x e c u t i o n o f a q u e r y f a i l e d .
// / Z T R E E 0 0 0 5
case transactionRepositoryQueryExecute ( _ error : Error )
// / F i n d i n g m e m o s i n t h e d a t a b a s e f a i l e d .
// / Z T R E E 0 0 0 6
case transactionRepositoryFindMemos ( _ error : Error )
// / C a n ' t e n c o d e ` Z c a s h C o m p a c t B l o c k ` o b j e c t .
// / Z C M P B 0 0 0 1
case compactBlockEncode ( _ error : Error )
// / I n v a l i d U T F - 8 B y t e s w h e r e d e t e c t e d w h e n a t t e m p t i n g t o c r e a t e a M e m o T e x t .
// / Z M E M O 0 0 0 1
case memoTextInvalidUTF8
// / T r a i l i n g n u l l - b y t e s w e r e f o u n d w h e n a t t e m p t i n g t o c r e a t e a M e m o T e x t .
// / Z M E M O 0 0 0 2
case memoTextInputEndsWithNullBytes
// / T h e r e s u l t i n g b y t e s p r o v i d e d a r e t o o l o n g t o b e s t o r e d a s a M e m o T e x t .
// / Z M E M O 0 0 0 3
case memoTextInputTooLong ( _ length : Int )
// / T h e r e s u l t i n g b y t e s p r o v i d e d a r e t o o l o n g t o b e s t o r e d a s a M e m o B y t e s .
// / Z M E M O 0 0 0 4
case memoBytesInputTooLong ( _ length : Int )
// / I n v a l i d U T F - 8 B y t e s w h e r e d e t e c t e d w h e n a t t e m p t i n g t o c o n v e r t M e m o B y t e s t o M e m o .
// / Z M E M O 0 0 0 5
case memoBytesInvalidUTF8
// / F a i l e d t o l o a d J S O N w i t h c h e c k p o i n t f r o m d i s k .
// / Z C H K P 0 0 0 1
case checkpointCantLoadFromDisk ( _ error : Error )
// / F a i l e d t o d e c o d e ` C h e c k p o i n t ` o b j e c t .
// / Z C H K P 0 0 0 2
case checkpointDecode ( _ error : Error )
// / I n v a l i d a c c o u n t w h e n t r y i n g t o d e r i v e s p e n d i n g k e y
// / Z D R V T 0 0 0 1
case derivationToolSpendingKeyInvalidAccount
// / C r e a t i o n o f t h e t a b l e f o r u n s p e n t t r a n s a c t i o n o u t p u t f a i l e d .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z U T O D 0 0 0 1
case unspentTransactionOutputDAOCreateTable ( _ sqliteError : Error )
// / S Q L i t e q u e r y f a i l e d w h e n s t o r i n g u n s p e n t t r a n s a c t i o n o u t p u t .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z U T O D 0 0 0 2
case unspentTransactionOutputDAOStore ( _ sqliteError : Error )
// / S Q L i t e q u e r y f a i l e d w h e n r e m o v i n g a l l t h e u n s p e n t t r a n s a t i o n o u t p u t s .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z U T O D 0 0 0 3
case unspentTransactionOutputDAOClearAll ( _ sqliteError : Error )
// / F e t c h e d i n f o r m a t i o n a b o u t u n s p e n t t r a n s a c t i o n o u t p u t f r o m t h e D B b u t i t c a n ' t b e d e c o d e d t o ` U T X O ` o b j e c t .
// / - ` e r r o r ` d e c o d i n g e r r o r .
// / Z U T O D 0 0 0 4
case unspentTransactionOutputDAOGetAllCantDecode ( _ error : Error )
// / S Q L i t e q u e r y f a i l e d w h e n g e t t i n g a l l t h e u n s p e n t t r a n s a t i o n o u t p u t s .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z U T O D 0 0 0 5
case unspentTransactionOutputDAOGetAll ( _ sqliteError : Error )
// / S Q L i t e q u e r y f a i l e d w h e n g e t t i n g b a l a n c e .
// / - ` s q l i t e E r r o r ` i s e r r o r p r o d u c e d b y S Q L i t e l i b r a r y .
// / Z U T O D 0 0 0 6
case unspentTransactionOutputDAOBalance ( _ sqliteError : Error )
// / C a n ' t c r e a t e ` S a p l i n g E x t e n d e d S p e n d i n g K e y ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 1
case spendingKeyInvalidInput
// / C a n ' t c r e a t e ` U n i f i e d F u l l V i e w i n g K e y ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 2
case unifiedFullViewingKeyInvalidInput
// / C a n ' t c r e a t e ` S a p l i n g E x t e n d e d F u l l V i e w i n g K e y ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 3
case extetendedFullViewingKeyInvalidInput
// / C a n ' t c r e a t e ` T r a n s p a r e n t A d d r e s s ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 4
case transparentAddressInvalidInput
// / C a n ' t c r e a t e ` S a p l i n g A d d r e s s ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 5
case saplingAddressInvalidInput
// / C a n ' t c r e a t e ` U n i f i e d A d d r e s s ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 6
case unifiedAddressInvalidInput
// / C a n ' t c r e a t e ` R e c i p i e n t ` b e c a u s e i n p u t i s i n v a l i d .
// / Z W L T P 0 0 0 7
case recipientInvalidInput
// / W a l l e t T r a n s a c t i o n E n c o d e r w a n t s t o c r e a t e t r a n s a c t i o n b u t f i l e s w i t h s a p l i n g p a r a m e t e r s a r e n o t p r e s e n t o n d i s k .
// / Z W L T E 0 0 0 1
case walletTransEncoderCreateTransactionMissingSaplingParams
// / W a l l e t T r a n s a c t i o n E n c o d e r w a n t s t o s h i e l d f u n d s b u t f i l e s w i t h s a p l i n g p a r a m e t e r s a r e n o t p r e s e n t o n d i s k .
// / Z W L T E 0 0 0 2
case walletTransEncoderShieldFundsMissingSaplingParams
// / I n i t i a t i l z a t i o n f o ` Z a t o s h i ` f r o m a d e c o d e r f a i l e d .
// / Z T S H O 0 0 0 1
case zatoshiDecode ( _ error : Error )
// / E n c o d e o f ` Z a t o s h i ` f a i l e d .
// / Z T S H O 0 0 0 2
case zatoshiEncode ( _ error : Error )
// / A w a i t i n g t r a n s a c t i o n s f r o m t h e s t r e a m f a i l e d .
// / Z U T X O 0 0 0 1
case unspentTransactionFetcherStream ( _ error : Error )
// / C o m p a c t B l o c k P r o c e s s o r w a s s t a r t e d w i t h a n i n v a l i d c o n f i g u r a t i o n .
// / Z C B P E O 0 0 0 1
case compactBlockProcessorInvalidConfiguration
// / C o m p a c t B l o c k P r o c e s s o r w a s s e t u p w i t h p a t h b u t t h a t l o c a t i o n c o u l d n ' t b e r e a c h e d .
// / Z C B P E O 0 0 0 2
case compactBlockProcessorMissingDbPath ( _ path : String )
// / D a t a D b f i l e c o u l d n ' t b e i n i t i a l i z e d a t p a t h .
// / Z C B P E O 0 0 0 3
case compactBlockProcessorDataDbInitFailed ( _ path : String )
// / T h e r e ' s a p r o b l e m w i t h t h e n e t w o r k c o n n e c t i o n .
// / Z C B P E O 0 0 0 4
case compactBlockProcessorConnection ( _ underlyingError : Error )
// / E r r o r o n g R P C h a p p e n e d .
// / Z C B P E O 0 0 0 5
case compactBlockProcessorGrpcError ( _ statusCode : Int , _ message : String )
// / N e t w o r k c o n n e c t i o n t i m e o u t .
// / Z C B P E O 0 0 0 6
case compactBlockProcessorConnectionTimeout
// / C o m p a c t B l o c k f a i l e d a n d r e a c h e d t h e m a x i m u m a m o u n t o f r e t r i e s i t w a s s e t u p t o d o .
// / Z C B P E O 0 0 0 7
case compactBlockProcessorMaxAttemptsReached ( _ attempts : Int )
// / U n s p e c i f i e d e r r o r o c c u r e d .
// / Z C B P E O 0 0 0 8
case compactBlockProcessorUnspecified ( _ underlyingError : Error )
// / C r i t i c a l e r r o r o c c u r e d .
// / Z C B P E O 0 0 0 9
case compactBlockProcessorCritical
// / I n v a l i d A c c o u n t .
// / Z C B P E O 0 0 1 0
case compactBlockProcessorInvalidAccount
// / T h e r e m o t e s e r v e r y o u a r e c o n n e c t i n g t o i s p u b l i s h i n g a d i f f e r e n t b r a n c h I D t h a n t h e o n e y o u r A p p i s e x p e c t i n g T h i s c o u l d b e c a u s e d b y y o u r A p p b e i n g o u t o f d a t e o r t h e s e r v e r y o u a r e c o n n e c t i n g y o u b e i n g e i t h e r o n a d i f f e r e n t n e t w o r k o r o u t o f d a t e a f t e r a n e t w o r k u p g r a d e .
// / Z C B P E O 0 0 1 1
case compactBlockProcessorWrongConsensusBranchId ( _ expectedLocally : ConsensusBranchID , _ found : ConsensusBranchID )
// / A s e r v e r w a s r e a c h e d , b u t i t ' s t a r g e t i n g t h e w r o n g n e t w o r k T y p e . M a k e s u r e y o u a r e p o i n t i n g t o t h e r i g h t s e r v e r .
// / Z C B P E O 0 0 1 2
case compactBlockProcessorNetworkMismatch ( _ expected : NetworkType , _ found : NetworkType )
// / A s e r v e r w a s r e a c h e d , i t ' s s h o w i n g a d i f f e r e n t s a p l i n g a c t i v a t i o n . A r e y o u s u r e y o u a r e p o i n t i n g t o t h e r i g h t s e r v e r ?
// / Z C B P E O 0 0 1 3
case compactBlockProcessorSaplingActivationMismatch ( _ expected : BlockHeight , _ found : BlockHeight )
// / w h e n t h e g i v e n U R L i s t h e s a m e U R L t h a n t h e o n e p r o v i d e d a s ` s e l f . f s B l o c k D b R o o t ` a s s u m i n g t h a t ' s a p r o g r a m m i n g e r r o r b e i n g t h e ` l e g a c y C a c h e D b U R L ` a s q l i t e d a t a b a s e f i l e a n d n o t a d i r e c t o r y
// / Z C B P E O 0 0 1 4
case compactBlockProcessorCacheDbMigrationFsCacheMigrationFailedSameURL
// / D e l e t i o n o f r e a d a b l e f i l e a t t h e p r o v i d e d U R L f a i l e d .
// / Z C B P E O 0 0 1 5
case compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb ( _ error : Error )
// / C h a i n n a m e d o e s n o t m a t c h . E x p e c t e d e i t h e r ' t e s t ' o r ' m a i n ' . T h i s i s p r o b a b l y a n A P I o r p r o g r a m m i n g e r r o r .
// / Z C B P E O 0 0 1 6
case compactBlockProcessorChainName ( _ name : String )
// / C o n s e n s u s B r a n c h I D s d o n ' t m a t c h t h i s i s p r o b a b l y a n A P I o r p r o g r a m m i n g e r r o r .
// / Z C B P E O 0 0 1 7
case compactBlockProcessorConsensusBranchID
[#1140] ClearCache action before anything starts
- draft
[#1140] ClearCache action before anything starts
- ClearCache action right after the idle action, clearing out metadata so the sync process can be fully restored from the DB and live blockchain values only.
- InternalSyncProgress removed
- InternalSyncProgressStorage removed
- Sync process control logic updated, controlled by latestScannedHeight and firstUnenhancedHeight only
- cleaned up unused code
[#1140] ClearCache action before anything starts
- ChecksBeforeSyncAction removed
- Offline tests fixed
[#1140] ClearCache action before anything starts
- fixed injection of a wallet birthday, the sync range must start with wallet BD instead of lower bound
[#1140] ClearCache action before anything starts
- Network tests fixed
- DarkSideTests partially fixed
[#1140] ClearCache action before anything starts
- rewind actions extension in compact block processor added
[#1140] ClearCache action before anything starts
- draft
[#1140] ClearCache action before anything starts
- DarkSideTests fixed
[#1140] ClearCache action before anything starts
- SyncRanges modified to be even less dependent on ranges, now it holds just 3 values (latest block height, latest scanned height if any, first unenhanced height if any), the rest is computed on the fly
[#1140] ClearCache action before anything starts
- SyncRanges struct not anymore, refactored to SyncControlData, holding just 3 mentioned values
[#1140] ClearCache action before anything starts
- cleanup
[#1140] ClearCache action before anything starts (#1148)
- TODO solved, the UTXOs fetcher doesn't work with range anymore, therefore reporting 100%
2023-06-20 02:59:56 -07:00
// / R e w i n d o f D o w n l o a d B l o c k A c t i o n f a i l e d a s n o a c t i o n i s p o s s i b l e t o u n w r a p p .
// / Z C B P E O 0 0 1 8
case compactBlockProcessorDownloadBlockActionRewind
2023-07-30 23:51:04 -07:00
// / P u t s a p l i n g s u b t r e e r o o t s t o t h e D B f a i l e d .
// / Z C B P E O 0 0 1 9
case compactBlockProcessorPutSaplingSubtreeRoots ( _ error : Error )
2023-08-09 01:03:36 -07:00
// / G e t t i n g t h e ` l a s t S c a n n e d H e i g h t ` f a i l e d b u t i t ' s s u p p o s e d t o a l w a y s p r o v i d e s o m e v a l u e .
// / Z C B P E O 0 0 2 0
case compactBlockProcessorLastScannedHeight
// / G e t t i n g t h e ` s u p p o r t e d S y n c A l g o r i t h m ` f a i l e d b u t i t ' s s u p p o s e d t o a l w a y s p r o v i d e s o m e v a l u e .
// / Z C B P E O 0 0 2 1
case compactBlockProcessorSupportedSyncAlgorithm
2023-04-24 14:15:20 -07:00
// / T h e s y n c h r o n i z e r i s u n p r e p a r e d .
// / Z S Y N C O 0 0 0 1
case synchronizerNotPrepared
// / M e m o s c a n ' t b e s e n t t o t r a n s p a r e n t a d d r e s s e s .
// / Z S Y N C O 0 0 0 2
case synchronizerSendMemoToTransparentAddress
// / T h e r e i s n o t e n o u g h t r a n s p a r e n t f u n d s t o c o v e r f e e f o r t h e s h i e l d i n g .
// / Z S Y N C O 0 0 0 3
case synchronizerShieldFundsInsuficientTransparentFunds
// / L a t e s t U T X O s f o r t h e a d d r e s s f a i l e d , i n v a l i d t - a d d r e s s .
// / Z S Y N C O 0 0 0 4
case synchronizerLatestUTXOsInvalidTAddress
// / R e w i n d f a i l e d , u n k n o w n a r c h o r h e i g h t
// / Z S Y N C O 0 0 0 5
case synchronizerRewindUnknownArchorHeight
2023-04-28 10:13:21 -07:00
// / I n d i c a t e s t h a t t h i s S y n c h r o n i z e r i s d i s c o n n e c t e d f r o m i t s l i g h t w a l l e t d s e r v e r .
// / Z S Y N C O 0 0 0 6
case synchronizerDisconnected
2023-04-24 14:15:20 -07:00
public var message : String {
switch self {
2023-05-21 09:48:29 -07:00
case . unknown : return " Some error happened that is not handled as `ZcashError`. All errors in the SDK are (should be) `ZcashError`. "
2023-04-24 14:15:20 -07:00
case . initializerCantUpdateURLWithAlias : return " Updating of paths in `Initilizer` according to alias failed. "
case . initializerAliasAlreadyInUse : return " Alias used to create this instance of the `SDKSynchronizer` is already used by other instance. "
2023-05-21 09:48:29 -07:00
case . initializerGeneralStorageExistsButIsFile : return " Object on disk at `generalStorageURL` path exists. But it file not directory. "
case . initializerGeneralStorageCantCreate : return " Can't create directory at `generalStorageURL` path. "
case . initializerCantSetNoBackupFlagToGeneralStorageURL : return " Can't set `isExcludedFromBackup` flag to `generalStorageURL`. "
2023-04-24 14:15:20 -07:00
case . serviceUnknownError : return " Unknown GRPC Service error "
case . serviceGetInfoFailed : return " LightWalletService.getInfo failed. "
case . serviceLatestBlockFailed : return " LightWalletService.latestBlock failed. "
case . serviceLatestBlockHeightFailed : return " LightWalletService.latestBlockHeight failed. "
case . serviceBlockRangeFailed : return " LightWalletService.blockRange failed. "
case . serviceSubmitFailed : return " LightWalletService.submit failed. "
case . serviceFetchTransactionFailed : return " LightWalletService.fetchTransaction failed. "
case . serviceFetchUTXOsFailed : return " LightWalletService.fetchUTXOs failed. "
case . serviceBlockStreamFailed : return " LightWalletService.blockStream failed. "
2023-07-30 23:51:04 -07:00
case . serviceSubtreeRootsStreamFailed : return " LightWalletService.getSubtreeRoots failed. "
2023-04-24 14:15:20 -07:00
case . simpleConnectionProvider : return " SimpleConnectionProvider init of Connection failed. "
case . saplingParamsInvalidSpendParams : return " Downloaded file with sapling spending parameters isn't valid. "
case . saplingParamsInvalidOutputParams : return " Downloaded file with sapling output parameters isn't valid. "
case . saplingParamsDownload : return " Failed to download sapling parameters file "
case . saplingParamsCantMoveDownloadedFile : return " Failed to move sapling parameters file to final destination after download. "
case . blockDAOBlock : return " SQLite query failed when fetching block information from database. "
case . blockDAOCantDecode : return " Fetched block information from DB but can't decode them. "
case . blockDAOLatestBlockHeight : return " SQLite query failed when fetching height of the latest block from the database. "
case . blockDAOLatestBlock : return " SQLite query failed when fetching the latest block from the database. "
2023-06-15 07:54:09 -07:00
case . blockDAOLatestBlockCantDecode : return " Fetched latest block information from DB but can't decode them. "
case . blockDAOFirstUnenhancedHeight : return " SQLite query failed when fetching the first unenhanced block from the database. "
case . blockDAOFirstUnenhancedCantDecode : return " Fetched unenhanced block information from DB but can't decode them. "
2023-04-24 14:15:20 -07:00
case . rustCreateAccount : return " Error from rust layer when calling ZcashRustBackend.createAccount "
case . rustCreateToAddress : return " Error from rust layer when calling ZcashRustBackend.createToAddress "
case . rustDecryptAndStoreTransaction : return " Error from rust layer when calling ZcashRustBackend.decryptAndStoreTransaction "
case . rustGetCurrentAddress : return " Error from rust layer when calling ZcashRustBackend.getCurrentAddress "
case . rustGetCurrentAddressInvalidAddress : return " Unified address generated by rust layer is invalid when calling ZcashRustBackend.getCurrentAddress "
case . rustGetNearestRewindHeight : return " Error from rust layer when calling ZcashRustBackend.getNearestRewindHeight "
case . rustGetNextAvailableAddress : return " Error from rust layer when calling ZcashRustBackend.getNextAvailableAddress "
case . rustGetNextAvailableAddressInvalidAddress : return " Unified address generated by rust layer is invalid when calling ZcashRustBackend.getNextAvailableAddress "
case . rustGetTransparentBalanceNegativeAccount : return " account parameter is lower than 0 when calling ZcashRustBackend.getTransparentBalance "
case . rustGetTransparentBalance : return " Error from rust layer when calling ZcashRustBackend.getTransparentBalance "
case . rustGetVerifiedTransparentBalanceNegativeAccount : return " account parameter is lower than 0 when calling ZcashRustBackend.getVerifiedTransparentBalance "
case . rustGetVerifiedTransparentBalance : return " Error from rust layer when calling ZcashRustBackend.getVerifiedTransparentBalance "
case . rustInitDataDb : return " Error from rust layer when calling ZcashRustBackend.initDataDb "
case . rustInitAccountsTableViewingKeyCotainsNullBytes : return " Any of the viewing keys passed to the ZcashRustBackend.initAccountsTable method contains null bytes before end "
case . rustInitAccountsTableViewingKeyIsInvalid : return " Any of the viewing keys passed to the ZcashRustBackend.initAccountsTable method isn't valid "
case . rustInitAccountsTableDataDbNotEmpty : return " Error from rust layer when calling ZcashRustBackend.initAccountsTable "
case . rustInitAccountsTable : return " Error from rust layer when calling ZcashRustBackend.initAccountsTable "
case . rustInitBlockMetadataDb : return " Error from rust layer when calling ZcashRustBackend.initBlockMetadataDb "
case . rustWriteBlocksMetadataAllocationProblem : return " Unable to allocate memory required to write blocks when calling ZcashRustBackend.writeBlocksMetadata "
case . rustWriteBlocksMetadata : return " Error from rust layer when calling ZcashRustBackend.writeBlocksMetadata "
case . rustInitBlocksTableHashContainsNullBytes : return " hash passed to the ZcashRustBackend.initBlocksTable method contains null bytes before end "
case . rustInitBlocksTableSaplingTreeContainsNullBytes : return " saplingTree passed to the ZcashRustBackend.initBlocksTable method contains null bytes before end "
case . rustInitBlocksTableDataDbNotEmpty : return " Error from rust layer when calling ZcashRustBackend.initBlocksTable "
case . rustInitBlocksTable : return " Error from rust layer when calling ZcashRustBackend.initBlocksTable "
case . rustListTransparentReceivers : return " Error from rust layer when calling ZcashRustBackend.listTransparentReceivers "
case . rustListTransparentReceiversInvalidAddress : return " Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.listTransparentReceivers "
case . rustPutUnspentTransparentOutput : return " Error from rust layer when calling ZcashRustBackend.putUnspentTransparentOutput "
case . rustValidateCombinedChainValidationFailed : return " Error unrelated to chain validity from rust layer when calling ZcashRustBackend.validateCombinedChain "
case . rustRewindToHeight : return " Error from rust layer when calling ZcashRustBackend.rewindToHeight "
case . rustRewindCacheToHeight : return " Error from rust layer when calling ZcashRustBackend.rewindCacheToHeight "
case . rustScanBlocks : return " Error from rust layer when calling ZcashRustBackend.scanBlocks "
case . rustShieldFunds : return " Error from rust layer when calling ZcashRustBackend.shieldFunds "
case . rustNoConsensusBranchId : return " Error from rust layer when calling ZcashRustBackend.consensusBranchIdFor "
case . rustReceiverTypecodesOnUnifiedAddressContainsNullBytes : return " address passed to the ZcashRustBackend.receiverTypecodesOnUnifiedAddress method contains null bytes before end "
case . rustRustReceiverTypecodesOnUnifiedAddressMalformed : return " Error from rust layer when calling ZcashRustBackend.receiverTypecodesOnUnifiedAddress "
case . rustDeriveUnifiedSpendingKey : return " Error from rust layer when calling ZcashRustBackend.deriveUnifiedSpendingKey "
case . rustDeriveUnifiedFullViewingKey : return " Error from rust layer when calling ZcashRustBackend.deriveUnifiedFullViewingKey "
case . rustDeriveUnifiedFullViewingKeyInvalidDerivedKey : return " Viewing key derived by rust layer is invalid when calling ZcashRustBackend.deriveUnifiedFullViewingKey "
case . rustGetSaplingReceiverInvalidAddress : return " Error from rust layer when calling ZcashRustBackend.getSaplingReceiver "
case . rustGetSaplingReceiverInvalidReceiver : return " Sapling receiver generated by rust layer is invalid when calling ZcashRustBackend.getSaplingReceiver "
case . rustGetTransparentReceiverInvalidAddress : return " Error from rust layer when calling ZcashRustBackend.getTransparentReceiver "
case . rustGetTransparentReceiverInvalidReceiver : return " Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.getTransparentReceiver "
2023-07-30 23:51:04 -07:00
case . rustPutSaplingSubtreeRootsAllocationProblem : return " Unable to allocate memory required to write blocks when calling ZcashRustBackend.putSaplingSubtreeRoots "
2023-07-19 10:13:59 -07:00
case . rustPutSaplingSubtreeRoots : return " Error from rust layer when calling ZcashRustBackend.putSaplingSubtreeRoots "
case . rustUpdateChainTip : return " Error from rust layer when calling ZcashRustBackend.updateChainTip "
case . rustSuggestScanRanges : return " Error from rust layer when calling ZcashRustBackend.suggestScanRanges "
2023-09-08 00:31:13 -07:00
case . rustGetMemoInvalidTxIdLength : return " Invalid transaction ID length when calling ZcashRustBackend.getMemo. txId must be 32 bytes. "
2023-09-06 04:28:25 -07:00
case . rustFullyScannedHeight : return " Error from rust layer when calling ZcashRustBackend.fullyScannedHeight "
case . rustMaxScannedHeight : return " Error from rust layer when calling ZcashRustBackend.maxScannedHeight "
case . rustLatestCachedBlockHeight : return " Error from rust layer when calling ZcashRustBackend.latestCachedBlockHeight "
2023-09-08 00:31:13 -07:00
case . rustScanProgressOutOfRange : return " Rust layer's call ZcashRustBackend.getScanProgress returned values that after computation are outside of allowed range 0-100%. "
2024-01-26 19:07:18 -08:00
case . rustGetWalletSummary : return " Error from rust layer when calling ZcashRustBackend.getWalletSummary "
2023-04-24 14:15:20 -07:00
case . accountDAOGetAll : return " SQLite query failed when fetching all accounts from the database. "
case . accountDAOGetAllCantDecode : return " Fetched accounts from SQLite but can't decode them. "
case . accountDAOFindBy : return " SQLite query failed when seaching for accounts in the database. "
case . accountDAOFindByCantDecode : return " Fetched accounts from SQLite but can't decode them. "
case . accountDAOUpdateInvalidAccount : return " Object passed to update() method conforms to `AccountEntity` protocol but isn't exactly `Account` type. "
case . accountDAOUpdate : return " SQLite query failed when updating account in the database. "
case . accountDAOUpdatedZeroRows : return " Update of the account updated 0 rows in the database. One row should be updated. "
case . blockRepositoryWriteBlock : return " Failed to write block to disk. "
case . blockRepositoryGetFilename : return " Failed to get filename for the block from file URL. "
case . blockRepositoryParseHeightFromFilename : return " Failed to parse block height from filename. "
case . blockRepositoryRemoveExistingBlock : return " Failed to remove existing block from disk. "
case . blockRepositoryGetFilenameAndIsDirectory : return " Failed to get filename and information if url points to directory from file URL. "
case . blockRepositoryCreateBlocksCacheDirectory : return " Failed to create blocks cache directory. "
case . blockRepositoryReadDirectoryContent : return " Failed to read content of directory. "
case . blockRepositoryRemoveBlockAfterRewind : return " Failed to remove block from disk after rewind operation. "
case . blockRepositoryRemoveBlocksCacheDirectory : return " Failed to remove blocks cache directory while clearing storage. "
2023-03-29 11:28:24 -07:00
case . blockRepositoryRemoveBlockClearingCache : return " Failed to remove block from cache when clearing cache up to some height. "
case . blockDownloadSyncRangeNotSet : return " Trying to download blocks before sync range is set in `BlockDownloaderImpl`. This means that download stream is not created and download cant' start. "
2023-04-24 14:15:20 -07:00
case . blockDownloaderServiceDownloadBlockRange : return " Stream downloading the given block range failed. "
case . zcashTransactionOverviewInit : return " Initialization of `ZcashTransaction.Overview` failed. "
case . zcashTransactionReceivedInit : return " Initialization of `ZcashTransaction.Received` failed. "
case . zcashTransactionSentInit : return " Initialization of `ZcashTransaction.Sent` failed. "
2023-05-05 10:30:47 -07:00
case . zcashTransactionOutputInit : return " Initialization of `ZcashTransaction.Output` failed. "
case . zcashTransactionOutputInconsistentRecipient : return " Initialization of `ZcashTransaction.Output` failed because there an inconsistency in the output recipient. "
2023-04-24 14:15:20 -07:00
case . transactionRepositoryEntityNotFound : return " Entity not found in the database, result of `createEntity` execution. "
case . transactionRepositoryTransactionMissingRequiredFields : return " `Find` call is missing fields, required fields are transaction `index` and `blockTime`. "
case . transactionRepositoryCountAll : return " Counting all transactions failed. "
case . transactionRepositoryCountUnmined : return " Counting all unmined transactions failed. "
case . transactionRepositoryQueryExecute : return " Execution of a query failed. "
case . transactionRepositoryFindMemos : return " Finding memos in the database failed. "
case . compactBlockEncode : return " Can't encode `ZcashCompactBlock` object. "
case . memoTextInvalidUTF8 : return " Invalid UTF-8 Bytes where detected when attempting to create a MemoText. "
case . memoTextInputEndsWithNullBytes : return " Trailing null-bytes were found when attempting to create a MemoText. "
case . memoTextInputTooLong : return " The resulting bytes provided are too long to be stored as a MemoText. "
case . memoBytesInputTooLong : return " The resulting bytes provided are too long to be stored as a MemoBytes. "
case . memoBytesInvalidUTF8 : return " Invalid UTF-8 Bytes where detected when attempting to convert MemoBytes to Memo. "
case . checkpointCantLoadFromDisk : return " Failed to load JSON with checkpoint from disk. "
case . checkpointDecode : return " Failed to decode `Checkpoint` object. "
case . derivationToolSpendingKeyInvalidAccount : return " Invalid account when trying to derive spending key "
case . unspentTransactionOutputDAOCreateTable : return " Creation of the table for unspent transaction output failed. "
case . unspentTransactionOutputDAOStore : return " SQLite query failed when storing unspent transaction output. "
case . unspentTransactionOutputDAOClearAll : return " SQLite query failed when removing all the unspent transation outputs. "
case . unspentTransactionOutputDAOGetAllCantDecode : return " Fetched information about unspent transaction output from the DB but it can't be decoded to `UTXO` object. "
case . unspentTransactionOutputDAOGetAll : return " SQLite query failed when getting all the unspent transation outputs. "
case . unspentTransactionOutputDAOBalance : return " SQLite query failed when getting balance. "
case . spendingKeyInvalidInput : return " Can't create `SaplingExtendedSpendingKey` because input is invalid. "
case . unifiedFullViewingKeyInvalidInput : return " Can't create `UnifiedFullViewingKey` because input is invalid. "
case . extetendedFullViewingKeyInvalidInput : return " Can't create `SaplingExtendedFullViewingKey` because input is invalid. "
case . transparentAddressInvalidInput : return " Can't create `TransparentAddress` because input is invalid. "
case . saplingAddressInvalidInput : return " Can't create `SaplingAddress` because input is invalid. "
case . unifiedAddressInvalidInput : return " Can't create `UnifiedAddress` because input is invalid. "
case . recipientInvalidInput : return " Can't create `Recipient` because input is invalid. "
case . walletTransEncoderCreateTransactionMissingSaplingParams : return " WalletTransactionEncoder wants to create transaction but files with sapling parameters are not present on disk. "
case . walletTransEncoderShieldFundsMissingSaplingParams : return " WalletTransactionEncoder wants to shield funds but files with sapling parameters are not present on disk. "
case . zatoshiDecode : return " Initiatilzation fo `Zatoshi` from a decoder failed. "
case . zatoshiEncode : return " Encode of `Zatoshi` failed. "
case . unspentTransactionFetcherStream : return " Awaiting transactions from the stream failed. "
case . compactBlockProcessorInvalidConfiguration : return " CompactBlockProcessor was started with an invalid configuration. "
case . compactBlockProcessorMissingDbPath : return " CompactBlockProcessor was set up with path but that location couldn't be reached. "
case . compactBlockProcessorDataDbInitFailed : return " Data Db file couldn't be initialized at path. "
case . compactBlockProcessorConnection : return " There's a problem with the network connection. "
case . compactBlockProcessorGrpcError : return " Error on gRPC happened. "
case . compactBlockProcessorConnectionTimeout : return " Network connection timeout. "
case . compactBlockProcessorMaxAttemptsReached : return " Compact Block failed and reached the maximum amount of retries it was set up to do. "
case . compactBlockProcessorUnspecified : return " Unspecified error occured. "
case . compactBlockProcessorCritical : return " Critical error occured. "
case . compactBlockProcessorInvalidAccount : return " Invalid Account. "
case . compactBlockProcessorWrongConsensusBranchId : return " The remote server you are connecting to is publishing a different branch ID than the one your App is expecting This could be caused by your App being out of date or the server you are connecting you being either on a different network or out of date after a network upgrade. "
case . compactBlockProcessorNetworkMismatch : return " A server was reached, but it's targeting the wrong network Type. Make sure you are pointing to the right server. "
case . compactBlockProcessorSaplingActivationMismatch : return " A server was reached, it's showing a different sapling activation. Are you sure you are pointing to the right server? "
case . compactBlockProcessorCacheDbMigrationFsCacheMigrationFailedSameURL : return " when the given URL is the same URL than the one provided as `self.fsBlockDbRoot` assuming that's a programming error being the `legacyCacheDbURL` a sqlite database file and not a directory "
case . compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb : return " Deletion of readable file at the provided URL failed. "
case . compactBlockProcessorChainName : return " Chain name does not match. Expected either 'test' or 'main'. This is probably an API or programming error. "
case . compactBlockProcessorConsensusBranchID : return " Consensus BranchIDs don't match this is probably an API or programming error. "
[#1140] ClearCache action before anything starts
- draft
[#1140] ClearCache action before anything starts
- ClearCache action right after the idle action, clearing out metadata so the sync process can be fully restored from the DB and live blockchain values only.
- InternalSyncProgress removed
- InternalSyncProgressStorage removed
- Sync process control logic updated, controlled by latestScannedHeight and firstUnenhancedHeight only
- cleaned up unused code
[#1140] ClearCache action before anything starts
- ChecksBeforeSyncAction removed
- Offline tests fixed
[#1140] ClearCache action before anything starts
- fixed injection of a wallet birthday, the sync range must start with wallet BD instead of lower bound
[#1140] ClearCache action before anything starts
- Network tests fixed
- DarkSideTests partially fixed
[#1140] ClearCache action before anything starts
- rewind actions extension in compact block processor added
[#1140] ClearCache action before anything starts
- draft
[#1140] ClearCache action before anything starts
- DarkSideTests fixed
[#1140] ClearCache action before anything starts
- SyncRanges modified to be even less dependent on ranges, now it holds just 3 values (latest block height, latest scanned height if any, first unenhanced height if any), the rest is computed on the fly
[#1140] ClearCache action before anything starts
- SyncRanges struct not anymore, refactored to SyncControlData, holding just 3 mentioned values
[#1140] ClearCache action before anything starts
- cleanup
[#1140] ClearCache action before anything starts (#1148)
- TODO solved, the UTXOs fetcher doesn't work with range anymore, therefore reporting 100%
2023-06-20 02:59:56 -07:00
case . compactBlockProcessorDownloadBlockActionRewind : return " Rewind of DownloadBlockAction failed as no action is possible to unwrapp. "
2023-07-30 23:51:04 -07:00
case . compactBlockProcessorPutSaplingSubtreeRoots : return " Put sapling subtree roots to the DB failed. "
2023-08-09 01:03:36 -07:00
case . compactBlockProcessorLastScannedHeight : return " Getting the `lastScannedHeight` failed but it's supposed to always provide some value. "
case . compactBlockProcessorSupportedSyncAlgorithm : return " Getting the `supportedSyncAlgorithm` failed but it's supposed to always provide some value. "
2023-04-24 14:15:20 -07:00
case . synchronizerNotPrepared : return " The synchronizer is unprepared. "
case . synchronizerSendMemoToTransparentAddress : return " Memos can't be sent to transparent addresses. "
case . synchronizerShieldFundsInsuficientTransparentFunds : return " There is not enough transparent funds to cover fee for the shielding. "
case . synchronizerLatestUTXOsInvalidTAddress : return " LatestUTXOs for the address failed, invalid t-address. "
case . synchronizerRewindUnknownArchorHeight : return " Rewind failed, unknown archor height "
2023-04-28 10:13:21 -07:00
case . synchronizerDisconnected : return " Indicates that this Synchronizer is disconnected from its lightwalletd server. "
2023-04-24 14:15:20 -07:00
}
}
public var code : ZcashErrorCode {
switch self {
2023-05-09 04:31:05 -07:00
case . unknown : return . unknown
2023-04-24 14:15:20 -07:00
case . initializerCantUpdateURLWithAlias : return . initializerCantUpdateURLWithAlias
case . initializerAliasAlreadyInUse : return . initializerAliasAlreadyInUse
2023-05-21 09:48:29 -07:00
case . initializerGeneralStorageExistsButIsFile : return . initializerGeneralStorageExistsButIsFile
case . initializerGeneralStorageCantCreate : return . initializerGeneralStorageCantCreate
case . initializerCantSetNoBackupFlagToGeneralStorageURL : return . initializerCantSetNoBackupFlagToGeneralStorageURL
2023-04-24 14:15:20 -07:00
case . serviceUnknownError : return . serviceUnknownError
case . serviceGetInfoFailed : return . serviceGetInfoFailed
case . serviceLatestBlockFailed : return . serviceLatestBlockFailed
case . serviceLatestBlockHeightFailed : return . serviceLatestBlockHeightFailed
case . serviceBlockRangeFailed : return . serviceBlockRangeFailed
case . serviceSubmitFailed : return . serviceSubmitFailed
case . serviceFetchTransactionFailed : return . serviceFetchTransactionFailed
case . serviceFetchUTXOsFailed : return . serviceFetchUTXOsFailed
case . serviceBlockStreamFailed : return . serviceBlockStreamFailed
2023-07-30 23:51:04 -07:00
case . serviceSubtreeRootsStreamFailed : return . serviceSubtreeRootsStreamFailed
2023-04-24 14:15:20 -07:00
case . simpleConnectionProvider : return . simpleConnectionProvider
case . saplingParamsInvalidSpendParams : return . saplingParamsInvalidSpendParams
case . saplingParamsInvalidOutputParams : return . saplingParamsInvalidOutputParams
case . saplingParamsDownload : return . saplingParamsDownload
case . saplingParamsCantMoveDownloadedFile : return . saplingParamsCantMoveDownloadedFile
case . blockDAOBlock : return . blockDAOBlock
case . blockDAOCantDecode : return . blockDAOCantDecode
case . blockDAOLatestBlockHeight : return . blockDAOLatestBlockHeight
case . blockDAOLatestBlock : return . blockDAOLatestBlock
case . blockDAOLatestBlockCantDecode : return . blockDAOLatestBlockCantDecode
2023-06-15 07:54:09 -07:00
case . blockDAOFirstUnenhancedHeight : return . blockDAOFirstUnenhancedHeight
case . blockDAOFirstUnenhancedCantDecode : return . blockDAOFirstUnenhancedCantDecode
2023-04-24 14:15:20 -07:00
case . rustCreateAccount : return . rustCreateAccount
case . rustCreateToAddress : return . rustCreateToAddress
case . rustDecryptAndStoreTransaction : return . rustDecryptAndStoreTransaction
case . rustGetCurrentAddress : return . rustGetCurrentAddress
case . rustGetCurrentAddressInvalidAddress : return . rustGetCurrentAddressInvalidAddress
case . rustGetNearestRewindHeight : return . rustGetNearestRewindHeight
case . rustGetNextAvailableAddress : return . rustGetNextAvailableAddress
case . rustGetNextAvailableAddressInvalidAddress : return . rustGetNextAvailableAddressInvalidAddress
case . rustGetTransparentBalanceNegativeAccount : return . rustGetTransparentBalanceNegativeAccount
case . rustGetTransparentBalance : return . rustGetTransparentBalance
case . rustGetVerifiedTransparentBalanceNegativeAccount : return . rustGetVerifiedTransparentBalanceNegativeAccount
case . rustGetVerifiedTransparentBalance : return . rustGetVerifiedTransparentBalance
case . rustInitDataDb : return . rustInitDataDb
case . rustInitAccountsTableViewingKeyCotainsNullBytes : return . rustInitAccountsTableViewingKeyCotainsNullBytes
case . rustInitAccountsTableViewingKeyIsInvalid : return . rustInitAccountsTableViewingKeyIsInvalid
case . rustInitAccountsTableDataDbNotEmpty : return . rustInitAccountsTableDataDbNotEmpty
case . rustInitAccountsTable : return . rustInitAccountsTable
case . rustInitBlockMetadataDb : return . rustInitBlockMetadataDb
case . rustWriteBlocksMetadataAllocationProblem : return . rustWriteBlocksMetadataAllocationProblem
case . rustWriteBlocksMetadata : return . rustWriteBlocksMetadata
case . rustInitBlocksTableHashContainsNullBytes : return . rustInitBlocksTableHashContainsNullBytes
case . rustInitBlocksTableSaplingTreeContainsNullBytes : return . rustInitBlocksTableSaplingTreeContainsNullBytes
case . rustInitBlocksTableDataDbNotEmpty : return . rustInitBlocksTableDataDbNotEmpty
case . rustInitBlocksTable : return . rustInitBlocksTable
case . rustListTransparentReceivers : return . rustListTransparentReceivers
case . rustListTransparentReceiversInvalidAddress : return . rustListTransparentReceiversInvalidAddress
case . rustPutUnspentTransparentOutput : return . rustPutUnspentTransparentOutput
case . rustValidateCombinedChainValidationFailed : return . rustValidateCombinedChainValidationFailed
case . rustRewindToHeight : return . rustRewindToHeight
case . rustRewindCacheToHeight : return . rustRewindCacheToHeight
case . rustScanBlocks : return . rustScanBlocks
case . rustShieldFunds : return . rustShieldFunds
case . rustNoConsensusBranchId : return . rustNoConsensusBranchId
case . rustReceiverTypecodesOnUnifiedAddressContainsNullBytes : return . rustReceiverTypecodesOnUnifiedAddressContainsNullBytes
case . rustRustReceiverTypecodesOnUnifiedAddressMalformed : return . rustRustReceiverTypecodesOnUnifiedAddressMalformed
case . rustDeriveUnifiedSpendingKey : return . rustDeriveUnifiedSpendingKey
case . rustDeriveUnifiedFullViewingKey : return . rustDeriveUnifiedFullViewingKey
case . rustDeriveUnifiedFullViewingKeyInvalidDerivedKey : return . rustDeriveUnifiedFullViewingKeyInvalidDerivedKey
case . rustGetSaplingReceiverInvalidAddress : return . rustGetSaplingReceiverInvalidAddress
case . rustGetSaplingReceiverInvalidReceiver : return . rustGetSaplingReceiverInvalidReceiver
case . rustGetTransparentReceiverInvalidAddress : return . rustGetTransparentReceiverInvalidAddress
case . rustGetTransparentReceiverInvalidReceiver : return . rustGetTransparentReceiverInvalidReceiver
2023-07-19 10:13:59 -07:00
case . rustPutSaplingSubtreeRootsAllocationProblem : return . rustPutSaplingSubtreeRootsAllocationProblem
case . rustPutSaplingSubtreeRoots : return . rustPutSaplingSubtreeRoots
case . rustUpdateChainTip : return . rustUpdateChainTip
case . rustSuggestScanRanges : return . rustSuggestScanRanges
2023-08-07 17:47:22 -07:00
case . rustGetMemoInvalidTxIdLength : return . rustGetMemoInvalidTxIdLength
2023-09-06 04:28:25 -07:00
case . rustFullyScannedHeight : return . rustFullyScannedHeight
case . rustMaxScannedHeight : return . rustMaxScannedHeight
case . rustLatestCachedBlockHeight : return . rustLatestCachedBlockHeight
2023-09-08 00:31:13 -07:00
case . rustScanProgressOutOfRange : return . rustScanProgressOutOfRange
2024-01-26 19:07:18 -08:00
case . rustGetWalletSummary : return . rustGetWalletSummary
2023-04-24 14:15:20 -07:00
case . accountDAOGetAll : return . accountDAOGetAll
case . accountDAOGetAllCantDecode : return . accountDAOGetAllCantDecode
case . accountDAOFindBy : return . accountDAOFindBy
case . accountDAOFindByCantDecode : return . accountDAOFindByCantDecode
case . accountDAOUpdateInvalidAccount : return . accountDAOUpdateInvalidAccount
case . accountDAOUpdate : return . accountDAOUpdate
case . accountDAOUpdatedZeroRows : return . accountDAOUpdatedZeroRows
case . blockRepositoryWriteBlock : return . blockRepositoryWriteBlock
case . blockRepositoryGetFilename : return . blockRepositoryGetFilename
case . blockRepositoryParseHeightFromFilename : return . blockRepositoryParseHeightFromFilename
case . blockRepositoryRemoveExistingBlock : return . blockRepositoryRemoveExistingBlock
case . blockRepositoryGetFilenameAndIsDirectory : return . blockRepositoryGetFilenameAndIsDirectory
case . blockRepositoryCreateBlocksCacheDirectory : return . blockRepositoryCreateBlocksCacheDirectory
case . blockRepositoryReadDirectoryContent : return . blockRepositoryReadDirectoryContent
case . blockRepositoryRemoveBlockAfterRewind : return . blockRepositoryRemoveBlockAfterRewind
case . blockRepositoryRemoveBlocksCacheDirectory : return . blockRepositoryRemoveBlocksCacheDirectory
2023-03-29 11:28:24 -07:00
case . blockRepositoryRemoveBlockClearingCache : return . blockRepositoryRemoveBlockClearingCache
case . blockDownloadSyncRangeNotSet : return . blockDownloadSyncRangeNotSet
2023-04-24 14:15:20 -07:00
case . blockDownloaderServiceDownloadBlockRange : return . blockDownloaderServiceDownloadBlockRange
case . zcashTransactionOverviewInit : return . zcashTransactionOverviewInit
case . zcashTransactionReceivedInit : return . zcashTransactionReceivedInit
case . zcashTransactionSentInit : return . zcashTransactionSentInit
2023-05-05 10:30:47 -07:00
case . zcashTransactionOutputInit : return . zcashTransactionOutputInit
case . zcashTransactionOutputInconsistentRecipient : return . zcashTransactionOutputInconsistentRecipient
2023-04-24 14:15:20 -07:00
case . transactionRepositoryEntityNotFound : return . transactionRepositoryEntityNotFound
case . transactionRepositoryTransactionMissingRequiredFields : return . transactionRepositoryTransactionMissingRequiredFields
case . transactionRepositoryCountAll : return . transactionRepositoryCountAll
case . transactionRepositoryCountUnmined : return . transactionRepositoryCountUnmined
case . transactionRepositoryQueryExecute : return . transactionRepositoryQueryExecute
case . transactionRepositoryFindMemos : return . transactionRepositoryFindMemos
case . compactBlockEncode : return . compactBlockEncode
case . memoTextInvalidUTF8 : return . memoTextInvalidUTF8
case . memoTextInputEndsWithNullBytes : return . memoTextInputEndsWithNullBytes
case . memoTextInputTooLong : return . memoTextInputTooLong
case . memoBytesInputTooLong : return . memoBytesInputTooLong
case . memoBytesInvalidUTF8 : return . memoBytesInvalidUTF8
case . checkpointCantLoadFromDisk : return . checkpointCantLoadFromDisk
case . checkpointDecode : return . checkpointDecode
case . derivationToolSpendingKeyInvalidAccount : return . derivationToolSpendingKeyInvalidAccount
case . unspentTransactionOutputDAOCreateTable : return . unspentTransactionOutputDAOCreateTable
case . unspentTransactionOutputDAOStore : return . unspentTransactionOutputDAOStore
case . unspentTransactionOutputDAOClearAll : return . unspentTransactionOutputDAOClearAll
case . unspentTransactionOutputDAOGetAllCantDecode : return . unspentTransactionOutputDAOGetAllCantDecode
case . unspentTransactionOutputDAOGetAll : return . unspentTransactionOutputDAOGetAll
case . unspentTransactionOutputDAOBalance : return . unspentTransactionOutputDAOBalance
case . spendingKeyInvalidInput : return . spendingKeyInvalidInput
case . unifiedFullViewingKeyInvalidInput : return . unifiedFullViewingKeyInvalidInput
case . extetendedFullViewingKeyInvalidInput : return . extetendedFullViewingKeyInvalidInput
case . transparentAddressInvalidInput : return . transparentAddressInvalidInput
case . saplingAddressInvalidInput : return . saplingAddressInvalidInput
case . unifiedAddressInvalidInput : return . unifiedAddressInvalidInput
case . recipientInvalidInput : return . recipientInvalidInput
case . walletTransEncoderCreateTransactionMissingSaplingParams : return . walletTransEncoderCreateTransactionMissingSaplingParams
case . walletTransEncoderShieldFundsMissingSaplingParams : return . walletTransEncoderShieldFundsMissingSaplingParams
case . zatoshiDecode : return . zatoshiDecode
case . zatoshiEncode : return . zatoshiEncode
case . unspentTransactionFetcherStream : return . unspentTransactionFetcherStream
case . compactBlockProcessorInvalidConfiguration : return . compactBlockProcessorInvalidConfiguration
case . compactBlockProcessorMissingDbPath : return . compactBlockProcessorMissingDbPath
case . compactBlockProcessorDataDbInitFailed : return . compactBlockProcessorDataDbInitFailed
case . compactBlockProcessorConnection : return . compactBlockProcessorConnection
case . compactBlockProcessorGrpcError : return . compactBlockProcessorGrpcError
case . compactBlockProcessorConnectionTimeout : return . compactBlockProcessorConnectionTimeout
case . compactBlockProcessorMaxAttemptsReached : return . compactBlockProcessorMaxAttemptsReached
case . compactBlockProcessorUnspecified : return . compactBlockProcessorUnspecified
case . compactBlockProcessorCritical : return . compactBlockProcessorCritical
case . compactBlockProcessorInvalidAccount : return . compactBlockProcessorInvalidAccount
case . compactBlockProcessorWrongConsensusBranchId : return . compactBlockProcessorWrongConsensusBranchId
case . compactBlockProcessorNetworkMismatch : return . compactBlockProcessorNetworkMismatch
case . compactBlockProcessorSaplingActivationMismatch : return . compactBlockProcessorSaplingActivationMismatch
case . compactBlockProcessorCacheDbMigrationFsCacheMigrationFailedSameURL : return . compactBlockProcessorCacheDbMigrationFsCacheMigrationFailedSameURL
case . compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb : return . compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb
case . compactBlockProcessorChainName : return . compactBlockProcessorChainName
case . compactBlockProcessorConsensusBranchID : return . compactBlockProcessorConsensusBranchID
[#1140] ClearCache action before anything starts
- draft
[#1140] ClearCache action before anything starts
- ClearCache action right after the idle action, clearing out metadata so the sync process can be fully restored from the DB and live blockchain values only.
- InternalSyncProgress removed
- InternalSyncProgressStorage removed
- Sync process control logic updated, controlled by latestScannedHeight and firstUnenhancedHeight only
- cleaned up unused code
[#1140] ClearCache action before anything starts
- ChecksBeforeSyncAction removed
- Offline tests fixed
[#1140] ClearCache action before anything starts
- fixed injection of a wallet birthday, the sync range must start with wallet BD instead of lower bound
[#1140] ClearCache action before anything starts
- Network tests fixed
- DarkSideTests partially fixed
[#1140] ClearCache action before anything starts
- rewind actions extension in compact block processor added
[#1140] ClearCache action before anything starts
- draft
[#1140] ClearCache action before anything starts
- DarkSideTests fixed
[#1140] ClearCache action before anything starts
- SyncRanges modified to be even less dependent on ranges, now it holds just 3 values (latest block height, latest scanned height if any, first unenhanced height if any), the rest is computed on the fly
[#1140] ClearCache action before anything starts
- SyncRanges struct not anymore, refactored to SyncControlData, holding just 3 mentioned values
[#1140] ClearCache action before anything starts
- cleanup
[#1140] ClearCache action before anything starts (#1148)
- TODO solved, the UTXOs fetcher doesn't work with range anymore, therefore reporting 100%
2023-06-20 02:59:56 -07:00
case . compactBlockProcessorDownloadBlockActionRewind : return . compactBlockProcessorDownloadBlockActionRewind
2023-07-30 23:51:04 -07:00
case . compactBlockProcessorPutSaplingSubtreeRoots : return . compactBlockProcessorPutSaplingSubtreeRoots
2023-08-09 01:03:36 -07:00
case . compactBlockProcessorLastScannedHeight : return . compactBlockProcessorLastScannedHeight
case . compactBlockProcessorSupportedSyncAlgorithm : return . compactBlockProcessorSupportedSyncAlgorithm
2023-04-24 14:15:20 -07:00
case . synchronizerNotPrepared : return . synchronizerNotPrepared
case . synchronizerSendMemoToTransparentAddress : return . synchronizerSendMemoToTransparentAddress
case . synchronizerShieldFundsInsuficientTransparentFunds : return . synchronizerShieldFundsInsuficientTransparentFunds
case . synchronizerLatestUTXOsInvalidTAddress : return . synchronizerLatestUTXOsInvalidTAddress
case . synchronizerRewindUnknownArchorHeight : return . synchronizerRewindUnknownArchorHeight
2023-04-28 10:13:21 -07:00
case . synchronizerDisconnected : return . synchronizerDisconnected
2023-04-24 14:15:20 -07:00
}
}
public static func = = ( lhs : ZcashError , rhs : ZcashError ) -> Bool {
return lhs . code = = rhs . code
}
}