Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

DB-based light client backend #250

Merged
merged 4 commits into from
Jun 29, 2018
Merged

DB-based light client backend #250

merged 4 commits into from
Jun 29, 2018

Conversation

svyatonik
Copy link
Contributor

This PR is about switch from using in-memory to database backend on light nodes. Additionally, client/src/light.rs has been split into separate files in client/src/light/ subfolder, because it grew too big.

Databases of full && light nodes are made incompatible (i.e. you can't open full db by light client and light db by full client). Initially tried to use the same db for both nodes, but found this a bad decision, because it:

  1. would require upgrading full db when light db structure changes and vice versa;
  2. lead to errors on full clients when we're trying to use light node' database (missing body, etc).

P.S.: syncing with --light is broken on current master, I'm currently working on it, but still wanted to start reviews of my previous work.

@svyatonik svyatonik added the A0-please_review Pull request needs code review. label Jun 26, 2018
@svyatonik
Copy link
Contributor Author

deadlock is fixed in #260

@@ -227,7 +227,7 @@ pub fn prove<B: TryIntoTrieBackend, Exec: CodeExecutor>(
}

/// Check execution proof, generated by `prove` call.
pub fn proof_check<Exec: CodeExecutor>(
pub fn execution_proof_check<Exec: CodeExecutor>(
Copy link
Contributor

Choose a reason for hiding this comment

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

in comment: generated by prove_execution call

Copy link
Contributor

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

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

looks good!

best_number: Zero::zero(),
genesis_hash: Default::default(),
})
storage: storage.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this clone really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

blockchain: Arc<Blockchain<S, F>>,
}

/// Ligh block (header and justification) import operation.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Ligh/Light

@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jun 29, 2018
Copy link
Member

@gavofyork gavofyork left a comment

Choose a reason for hiding this comment

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

Only a shallow review but looks good.

@gavofyork gavofyork merged commit c8f8981 into master Jun 29, 2018
@gavofyork gavofyork deleted the light_separate_db branch June 29, 2018 14:10
JoshOrndorff added a commit to moonbeam-foundation/substrate that referenced this pull request Apr 21, 2021
* Remove mock timestamp provider.

* Relax runtime's minimum timestamp requirement. (We aren't using time-based slots, so it doesn't matter.)

* bump runtime version
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
provide new fee proportion
liuchengxu added a commit to subspace/substrate that referenced this pull request Jun 3, 2022
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
* return none if subscription returns early

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* add comment on subscription close

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* no need for jsonrpsee error enum

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants