Skip to content

Conversation

@websurferdoteth
Copy link

@websurferdoteth websurferdoteth commented Aug 27, 2025

Linked to CLI PR #130

Why

We don't currently require any authentication to submit a challenge, and it is possible for anyone to send contract submissions for anyone else.

How

  • Adds extra validation to the /submit endpoint, requiring a message signed by the user's account
  • Adds a GET /message/:userAddress endpoint for the CLI to get the correct message to be signed
Screencast.from.2025-08-27.14-22-11.webm

@websurferdoteth websurferdoteth marked this pull request as draft August 27, 2025 22:12
Comment on lines 113 to 116
nonce: {
type: Number,
default: 1,
},
Copy link
Author

Choose a reason for hiding this comment

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

This nonce is what I am unsure about. I'd like have someway to invalidate old signatures once they've been used. Not sure if there is a more standard approach than a nonce, like maybe a timestamp?

Also wondering if there is a more standard way the message itself should be structured?

Copy link
Collaborator

@escottalexander escottalexander Aug 28, 2025

Choose a reason for hiding this comment

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

Why do we need to invalidate them? They are just proving that a certain address is the one submitting a challenge. Somebody could maliciously send the same signature later but first they would have to do a man in the middle attack. What am I missing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like a timestamp more than a nonce. That way we don't need to track nonces, we just need to look at the current time. Still not sure we need it though.

Copy link
Author

Choose a reason for hiding this comment

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

Ok got it, thanks. You're not missing anything. The only reason to add a nonce or timestamp would be to prevent signatures from being leaked and reused. But that does seem like overkill for ETT.

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.

2 participants