Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Offchain-worker: Make it possible to disable http support #10087

Merged
merged 7 commits into from
Oct 31, 2021

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Oct 22, 2021

If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.

Closes: #9984

If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Oct 22, 2021
Copy link
Contributor

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

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

looks good, but we already have capabilities filtering though, so this adds yet another layer to the setup. I understand that we want to avoid starting the shared http client, but just pointing out that this a bit of a workaround.

Have you considered compilation features instead? It would be perfectly fine to leave http requests enabled and just disable https from the shared client.

client/offchain/src/lib.rs Outdated Show resolved Hide resolved
bkchr and others added 3 commits October 24, 2021 21:51
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
@bkchr bkchr requested a review from tomusdrw October 24, 2021 21:44
@bkchr
Copy link
Member Author

bkchr commented Oct 24, 2021

@tomusdrw I now switched to the Capabilities. Ty for reminding me! There was even already a Http capability :D

@bkchr bkchr added the D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit label Oct 25, 2021
Copy link
Contributor

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

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

looks good!

client/offchain/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
@bkchr bkchr merged commit b63e1c5 into master Oct 31, 2021
@bkchr bkchr deleted the bkchr-offchain-disable-http branch October 31, 2021 18:13
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
…#10087)

* Offchain-worker: Make it possible to disable http support

If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.

* Switch to bitflags

* Use Capabilities

* Update client/offchain/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Fix test

* Update client/offchain/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
…#10087)

* Offchain-worker: Make it possible to disable http support

If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.

* Switch to bitflags

* Use Capabilities

* Update client/offchain/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Fix test

* Update client/offchain/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CA root certificate required even if not used
3 participants