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

Test relay altered message #121

Merged
merged 12 commits into from
Nov 15, 2023
Merged

Test relay altered message #121

merged 12 commits into from
Nov 15, 2023

Conversation

gwen917
Copy link
Contributor

@gwen917 gwen917 commented Nov 9, 2023

Why this should be merged

Implements the following test cases from #94

  • Try resubmitting a message that has been slightly altered, ensure it doesn't work.
  • Relayer modifies a message in flight. This should fail warp verification

How this works

See above

How this was tested

New E2E test cases

How is this documented

@gwen917 gwen917 mentioned this pull request Nov 9, 2023
24 tasks
Copy link
Contributor

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

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

One small typo, otherwise LGTM

tests/relayer_modifies_message.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bernard-avalabs bernard-avalabs left a comment

Choose a reason for hiding this comment

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

LGTM. Just some questions for my own understanding.

Expect(modifiedMessage[:]).ShouldNot(Equal(signedMessage.Payload[:]))
signedMessage.Payload = modifiedMessage

signedMessage.Initialize()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we consider a related test where the signature is from the original payload? Perhaps testing incorrect signatures is already covered in a different test case.

@gwen917 gwen917 merged commit c093521 into general-e2e Nov 15, 2023
10 checks passed
@gwen917 gwen917 deleted the test-cases branch November 15, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants