Skip to content
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

Time independent consensus [issue 2] #6

Merged
merged 1 commit into from
Apr 4, 2017
Merged

Time independent consensus [issue 2] #6

merged 1 commit into from
Apr 4, 2017

Conversation

stanislav-tkach
Copy link
Contributor

#2

Copy link
Contributor

@alekseysidorov alekseysidorov left a comment

Choose a reason for hiding this comment

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

In generally it is looking good for me. But you need to check problem with time in sandbox.

  • Do not use any information from outside in sandbox tests.

1
}
}

// FIXME find more flexible solution
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the remark is actual?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't fully understand the idea of the original comment - is it about the whole round_start_time method or about time from the last block?

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not remember, but now everything seems to be looking good. Maybe later we can hold a hunt for remarks.

@@ -257,7 +258,8 @@ impl State {
stored: StoredConfiguration,
connect: Connect,
last_hash: Hash,
last_height: u64)
last_height: u64,
time: Timespec)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the time means? I do not understand it from code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

time is used for height_start_time (State field) initialization. This field is updated when the node is initialized and when switching to new height.

Should I change parameter name from time to height_start_time in new_height and new functions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think that it will become clearer.

@@ -457,7 +457,7 @@ pub fn sandbox_with_services(services: Vec<Box<Service>>) -> Sandbox {

let inner = Arc::new(Mutex::new(SandboxInner {
address: addresses[0].clone(),
time: blockchain.last_block().unwrap().time(),
time: get_time(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you using the system time here? I think that is not a good idea because it breaks the repeatability of sandbox tests. Maybe need to use predefined constant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@alekseysidorov alekseysidorov left a comment

Choose a reason for hiding this comment

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

LGTM

@alexauroradev alexauroradev requested review from vldm and removed request for dj8yfo April 4, 2017 09:20
Copy link
Contributor

@vldm vldm left a comment

Choose a reason for hiding this comment

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

LGTM

@alexauroradev alexauroradev merged commit af52679 into exonum:master Apr 4, 2017
vldm pushed a commit that referenced this pull request Jul 13, 2017
Time independent consensus (fixes #2)

Former-commit-id: e171510ed388eff583e1b86387a7b3c3901bc84d
@stanislav-tkach stanislav-tkach deleted the 2-time-independent-consensus branch July 17, 2017 11:06
stanislav-tkach pushed a commit to stanislav-tkach/exonum that referenced this pull request Feb 1, 2018
stanislav-tkach pushed a commit to stanislav-tkach/exonum that referenced this pull request Feb 17, 2018
Update core to separated keys revision
stanislav-tkach pushed a commit to stanislav-tkach/exonum that referenced this pull request Apr 4, 2018
stanislav-tkach pushed a commit to stanislav-tkach/exonum that referenced this pull request Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants