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

all: add user agents and improve build info log #202

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

joshuasing
Copy link
Contributor

Summary
Add User-Agent headers and a UserAgent to the secp256k1 authenticator.
This allows our HTTP connections to be identifiable, and provides some basic information about the client.

Changes

  • Add user agent creation to the version package.
  • Add User-Agent header to the popm->bfg connection.
  • Add UserAgent to the secp256k1 authenticator.
  • Properly set the version.PreRelease variable at link-time for releases.
  • Add ability to set Go linker flags through the Makefile (GO_LDFLAGS).
  • Add BuildInfo() function to version package that includes basic information about the environment that is useful for debugging.

@joshuasing joshuasing added type: enhancement This improves existing functionality type: feature This adds new functionality size: L This change is large (+/- <500) labels Aug 14, 2024
@joshuasing joshuasing requested a review from max-sanchez August 14, 2024 17:18
@github-actions github-actions bot added area: bfg This is a change to BFG (Bitcoin Finality Governor) area: bss This is a change to BSS (Bitcoin Secure Sequencer) area: ci This is a change to CI files. Excluded from changelog area: popm This is a change to popm (PoP Miner) area: popm/wasm This is a change to the WASM popm (PoP Miner) area: docker This is a change to a Dockerfile area: hemictl This is a change to hemictl area: tbc This is a change to TBC (Tiny Bitcoin) area: make This changes a Makefile labels Aug 14, 2024
@joshuasing joshuasing changed the title all: add user agents all: add user agents and improve build info log Aug 14, 2024
@RamdanSe55

This comment was marked as spam.

@crlt-max

This comment was marked as spam.

Copy link
Contributor

@ClaytonNorthey92 ClaytonNorthey92 left a comment

Choose a reason for hiding this comment

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

hey @joshuasing I have a very small request change to a test; it is almost a nitpick but I think it would help determine which test fails if one does.

additionally, and this is completely optional but would give me peace of mind 😌 , I would love a test that sends a specific UserAgent to bfg, and ensured that bfg received the useragent correctly (i.e. there is no issue reading that value from where it should be)

version/useragent_test.go Outdated Show resolved Hide resolved
cmd/bfgd/bfgd.go Show resolved Hide resolved
@joshuasing joshuasing merged commit 348479f into main Aug 21, 2024
4 of 5 checks passed
@joshuasing joshuasing deleted the joshua/popm-user-agent branch August 21, 2024 18:24
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bfg This is a change to BFG (Bitcoin Finality Governor) area: bss This is a change to BSS (Bitcoin Secure Sequencer) area: ci This is a change to CI files. Excluded from changelog area: docker This is a change to a Dockerfile area: hemictl This is a change to hemictl area: make This changes a Makefile area: popm/wasm This is a change to the WASM popm (PoP Miner) area: popm This is a change to popm (PoP Miner) area: tbc This is a change to TBC (Tiny Bitcoin) size: L This change is large (+/- <500) type: enhancement This improves existing functionality type: feature This adds new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants