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

INDY-2157: TAA acceptance use date #1256

Merged
merged 4 commits into from
Jul 9, 2019

Conversation

Toktar
Copy link
Contributor

@Toktar Toktar commented Jul 5, 2019

Signed-off-by: toktar renata.toktar@dsr-corporation.com

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
@Toktar Toktar changed the title INDY-2157: TAA acceptance should use date INDY-2157: TAA acceptance use date Jul 5, 2019
@Toktar
Copy link
Contributor Author

Toktar commented Jul 5, 2019

test this please

@Toktar Toktar changed the title INDY-2157: TAA acceptance use date [ci skip]INDY-2157: TAA acceptance use date Jul 8, 2019
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
@Toktar Toktar changed the title [ci skip]INDY-2157: TAA acceptance use date INDY-2157: TAA acceptance use date Jul 8, 2019
@Toktar
Copy link
Contributor Author

Toktar commented Jul 8, 2019

test this please

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
if datetime_r_taa.time() != time(0):
raise InvalidClientTaaAcceptanceError(
request.identifier, request.reqId,
"TAA timestamp {} is too precise and is a privacy risk."
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be more clear to have the following error message (to be more consistent with other error messages):
Txn Author Agreement acceptance time {} is too precise and is a privacy risk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will be changed in #1263

max_last_accepted_pre_prepare_time +
randint(0, tconf.TXN_AUTHOR_AGREEMENT_ACCEPTANCE_TIME_AFTER_PP_TIME)
)
pp_time = max_last_accepted_pre_prepare_time
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we remove adding the delta here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it is the addition of randomness to the test as a small time shift. Now we use the date and this is impossible.

@ashcherbakov ashcherbakov merged commit 9863844 into hyperledger:master Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants