Skip to content

feat(conductor)!: support disabled celestia auth#1372

Merged
joroshiba merged 3 commits intomainfrom
ENG-719
Aug 21, 2024
Merged

feat(conductor)!: support disabled celestia auth#1372
joroshiba merged 3 commits intomainfrom
ENG-719

Conversation

@joroshiba
Copy link
Copy Markdown
Member

@joroshiba joroshiba commented Aug 15, 2024

Summary

Updates conductor celestia client to support using no auth token, adds a config field to specify using no token.

Background

When originally built celestia-node required an auth token, it can now be run with the auth token disabled. We do this by default in our charts, but our code always specifies an auth header which will still be rejected if empty by celestia node.

Changes

  • Add ASTRIA_CONDUCTOR_NO_CELESTIA_AUTH config env var
  • When no_celestia_auth is true, makes celestia node requests without auth header.

Testing

CI/CD smoke tests use no token, blockbox tests use a token to verify both paths still work.

Breaking Changelist

  • ASTRIA_CONDUCTOR_NO_CELESTIA_AUTH config env var added

Related Issues

closes #1370

@github-actions github-actions bot added conductor pertaining to the astria-conductor crate cd labels Aug 15, 2024
@joroshiba joroshiba marked this pull request as ready for review August 15, 2024 19:47
@joroshiba joroshiba requested review from a team as code owners August 15, 2024 19:47
@joroshiba joroshiba requested a review from SuperFluffy August 15, 2024 19:47
Copy link
Copy Markdown
Contributor

@quasystaty1 quasystaty1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Ready to approve, but I think you can make the change to conductor non-breaking.

Copy link
Copy Markdown

@ethanoroshiba ethanoroshiba left a comment

Choose a reason for hiding this comment

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

LGTM, but I tend to agree with Janis in wondering if we could make the changes non-breaking. Would it be possible to instantiate celestia_token here based on whether cfg.celestia_bearer_token contains a value or not, rather than using cfg.no_celestia_bearer_token?

@joroshiba joroshiba enabled auto-merge August 20, 2024 23:00
@SuperFluffy SuperFluffy changed the title feat(conductor)!: support disabled auth feat(conductor)!: support disabled celestia auth Aug 21, 2024
pub celestia_node_http_url: String,

/// Disables using the bearer token auth header for the Celestia jsonrpc
pub no_celestia_auth: bool,
Copy link
Copy Markdown
Contributor

@SuperFluffy SuperFluffy Aug 21, 2024

Choose a reason for hiding this comment

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

This needs to get a default value because otherwise this forces a user to always set ASTRIA_CONDUCTOR_NO_CELESTIA_AUTH=false which I think is highly confusing:

Suggested change
pub no_celestia_auth: bool,
#[serde(default)]
pub no_celestia_auth: bool,

See this error message:

failed to start conductor:
{"0": "failed reading config", "1": "failed reading config from process environment", "2": "missing field `no_celestia_auth`"}

EDIT: I correct myself, this is in line with how we do everything else.

@joroshiba joroshiba added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit 59a615a Aug 21, 2024
@joroshiba joroshiba deleted the ENG-719 branch August 21, 2024 16:04
steezeburger added a commit that referenced this pull request Aug 22, 2024
* main:
  refactor(core, proto)!: define app genesis state in proto (#1346)
  fix(sequencer): bump penumbra dep to fix ibc state access bug (#1389)
  feat(conductor)!: support disabled celestia auth (#1372)
  fix(sequencer)!: fix block fees (#1343)
  perf(sequencer): add benchmark for prepare_proposal (ENG-660) (#1337)
  fix(proto): fix import name mismatch (#1380)
  fix(ci): enable bridge withdrawer building with tag (#1374)
  feat(sequencer): rewrite memool to have per-account transaction storage and maintenance  (#1323)
  refactor(core, sequencer)!: require that bridge unlock address always be set (#1339)
  fix(sequencer)!: take funds from bridge in ics20 withdrawals (#1344)
  fix(sequencer)!: fix TOCTOU issues by merging check and execution (#1332)
  fix: abci error code (#1280)
  refactor(core): shorten `try_from_block_info_and_data()` (#1371)
  fix(relayer): change `reqwest` for `isahc` in relayer blackbox tests (ENG-699) (#1366)
  fix(conductor): update for celestia-node v0.15.0 (#1367)
  Chore: Upgrade celestia-node to v0.14.1 (#1360)
  chore(charts): fix charts production templates (#1359)
  chore(core, proto): migrate byte slices from Vec to Bytes (#1319)
Fraser999 pushed a commit to Fraser999/astria that referenced this pull request Aug 26, 2024
## Summary
Updates conductor celestia client to support using no auth token, adds a
config field to specify using no token.

## Background
When originally built celestia-node required an auth token, it can now
be run with the auth token disabled. We do this by default in our
charts, but our code always specifies an auth header which will still be
rejected if empty by celestia node.

## Changes
- Add `ASTRIA_CONDUCTOR_NO_CELESTIA_AUTH` config env var
- When `no_celestia_auth` is true, makes celestia node requests without
auth header.

## Testing
CI/CD smoke tests use no token, blockbox tests use a token to verify
both paths still work.

## Breaking Changelist
- ASTRIA_CONDUCTOR_NO_CELESTIA_AUTH config env var added

## Related Issues
closes astriaorg#1370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cd conductor pertaining to the astria-conductor crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conductor should support celestia requests without bearer token

4 participants