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

verify sender from VRS, not hardcoded client ID #65

Open
arcolife opened this issue Aug 2, 2018 · 2 comments
Open

verify sender from VRS, not hardcoded client ID #65

arcolife opened this issue Aug 2, 2018 · 2 comments
Assignees
Labels
bug Something isn't working C-level trivial low-level difficulty
Milestone

Comments

@arcolife
Copy link
Collaborator

arcolife commented Aug 2, 2018

the client could just be anyone.
So verify the sender of the block by obtaining the VRS in block, deconstructing public key from that and comparing the obtained key with stored public key of the sender.

Also fix the 3 modes, 2 out of which are currently dummy, as per https://github.com/truechain/truechain-consensus-core/blob/master/README.md#step-3

4. `TRUE_SIMULATION` is as follows:
  - if set to 0 (default) - should tell the project to pickup testbed configurations. 
  - if set to 1 - staging, meaning all CI/CD tests are run before draft run. (dummy functionality at the moment)
  - if set to 2 - production. Will try to connect to boot nodes. (dummy functionality at the moment)
@arcolife arcolife added the C-level trivial low-level difficulty label Aug 2, 2018
@arcolife arcolife added this to the Alpha 1 milestone Aug 2, 2018
@arcolife arcolife self-assigned this Aug 2, 2018
@arcolife arcolife added the bug Something isn't working label Aug 2, 2018
arcolife added a commit to arcolife/truechain-consensus-core that referenced this issue Aug 2, 2018
@samikshan
Copy link
Contributor

I just want to document here what the function VerifySender currently does. func VerifySender(tx *pb.Transaction, n int) ([]byte, bool) currently verifies if a transaction has come from sender with index n, where 0 <= n <= N and the client is indexed as N for lack of addresses as of now. Inside the function we do recover the public key used to sign the transaction (the signature is in R || S || V format) and compare it with the public key of the sender indexed 'n'. If they match we infer that tx has indeed been sent by the sender with index n.

@arcolife
Copy link
Collaborator Author

arcolife commented Aug 2, 2018

+1

stuff for dev docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C-level trivial low-level difficulty
Projects
None yet
Development

No branches or pull requests

2 participants