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

Naive light client synchronization #3892

Merged
merged 49 commits into from
Jan 5, 2017
Merged

Naive light client synchronization #3892

merged 49 commits into from
Jan 5, 2017

Conversation

rphmeier
Copy link
Contributor

This work was getting pretty massive so I've decided to cut it off here for now and leave further improvements/tests to future PRs.

Please review but don't merge until 1.5 is released.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 85.726% when pulling 70d53dc on lightsync into e0f6f8f on master.

@arkpar arkpar added A7-looksgoodcantmerge 🙄 Pull request is reviewed well, but cannot be merged due to conflicts. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 22, 2016
@arkpar
Copy link
Collaborator

arkpar commented Dec 22, 2016

ethcore/res/ethereum/tests needs reverting

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A7-looksgoodcantmerge 🙄 Pull request is reviewed well, but cannot be merged due to conflicts. labels Dec 23, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d0194f3 on lightsync into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 0688ccb on lightsync into ** on master**.

if number == 1 {
let g_view = HeaderView::new(&self.genesis_header);
g_view.difficulty()
} else {
Copy link
Contributor

@NikVolf NikVolf Dec 27, 2016

Choose a reason for hiding this comment

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

else {
	try!(candidates.get(&(number - 1))
		.and_then(|entry| entry.candidates.iter().find(|c| c.hash == parent_hash))
		.map(|c| c.total_difficulty)
		.ok_or(BlockError::UnknownParent(parent_hash)))
}

?

pub fn genesis_hash(&self) -> H256 {
use util::Hashable;

self.genesis_header.sha3()
Copy link
Contributor

Choose a reason for hiding this comment

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

one-liner
::util::Hashable::sha3(&self.genesis_header)
?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 55dbfbf on lightsync into ** on master**.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 86.47% when pulling e6324a8 on lightsync into 3067a8d on master.

@rphmeier
Copy link
Contributor Author

rphmeier commented Jan 4, 2017

Given that 1.5 has been delayed a bit, it might make sense to remove the CLI option for now and merge this into master afterwards. I have a few pending PRs which build upon it but I haven't made yet in anticipation of the merge.

@rphmeier rphmeier removed the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Jan 4, 2017
@rphmeier
Copy link
Contributor Author

rphmeier commented Jan 4, 2017

(CLI removed)

@rphmeier rphmeier mentioned this pull request Jan 4, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 86.554% when pulling 0b9a0b1 on lightsync into 3067a8d on master.

@rphmeier rphmeier removed this from the 1.6 milestone Jan 4, 2017
@rphmeier rphmeier merged commit f1dd96c into master Jan 5, 2017
@rphmeier rphmeier deleted the lightsync branch January 5, 2017 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants