-
Notifications
You must be signed in to change notification settings - Fork 144
Description
Issue summary
Taken from design doc regarding introduction of the Client
type (link):
I propose introducing a similar
client.Client
type that will fulfill the storage, block import, and finality notifications in a similar way. Translating the primitive types and theBlockchainEvents
andPreCommitActions
traits into interfaces will be quite easy. Implementation of these interfaces can closely align with the reference substrate code. The chief dependency of the subtrateClient
is essentially thesc_db::Backend
. ...
I also think the introduction of
Client
will provide a foundation that allows us to implement more of these smaller traits, which comprise the full scope of the substrateClient
. Some of these traits are essentially theBlockState
andStorageState
interface functionalities that have already been introduced on therefactor/client-db
branch and are described inapi.Backend
and implemented bydb.Backend
.
Taken from design regarding LockImportRun
(link):
The code that implements import_block utilizes the LockImportRun trait which contains a single lock_import_and_run function. I propose to translate and implement the LockImportRun trait first given it is a dependancy for BlockImport methods. By implementing the full logic of LockImportRun, there are calls to fire off the storage, finality, and block import notifications after a successful import.
Acceptance Criteria
- Introduction of
Client
type utilizingdb.Backend
. - Introduction of
LockImportRun
interface. - Implementation of
LockImportRun
interface.
Other information and links
- substrate reference to
LockImportRun
. - substrate reference to
Client