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

feat: Add Lilypad version HTTP header #408

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Conversation

bgins
Copy link
Contributor

@bgins bgins commented Oct 18, 2024

Summary

This pull request makes the following changes:

  • Add X-Lilypad-Version HTTP header
  • Log header on solver when receiving resource offers

The X-Lilypad-Version header is added to all HTTP requests across services.

As a demonstration, this PR adds a solver log to report the version when a resource provider makes an add resource offer post. We can remove the log or keep it if it seems useful.

Task/Issue reference

Closes: #406

Test plan

Build the binary with a placeholder version for testing:

go build -v -ldflags="-X 'github.com/lilypad-tech/lilypad/pkg/system.Version=v2.9.0' -w" .

Run the stack, using the binary for the resource provider and supplying our development-only private key:

WEB3_PRIVATE_KEY=0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a ./lilypad resource-provider --network dev

Check the solver logs for a "resource provider adding offer with version header v2.9.0" log.

@bgins bgins force-pushed the bgins/feat-add-version-header branch from 866ec01 to 2f63ace Compare October 18, 2024 21:18
@bgins bgins marked this pull request as ready for review October 18, 2024 21:19
@bgins bgins requested a review from a team as a code owner October 18, 2024 21:19
Copy link
Collaborator

@narbs91 narbs91 left a comment

Choose a reason for hiding this comment

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

LGTM

@bgins bgins merged commit b4e56e3 into main Oct 18, 2024
5 checks passed
@bgins bgins deleted the bgins/feat-add-version-header branch October 18, 2024 22:22
@bgins bgins self-assigned this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add version on HTTP requests
2 participants