Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
240e62e9
Unverified
Commit
240e62e9
authored
Oct 29, 2021
by
Mark Tyneway
Committed by
GitHub
Oct 29, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1647 from ethereum-optimism/bwilson/rpc-proxy-only-on-post
Bypass lua checking when the request is not a POST
parents
458dd0ef
3e09aa0a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
2 deletions
+74
-2
smart-crabs-jump.md
.changeset/smart-crabs-jump.md
+5
-0
publish-canary.yml
.github/workflows/publish-canary.yml
+27
-0
release.yml
.github/workflows/release.yml
+31
-0
nginx.template.conf
ops/docker/rpc-proxy/nginx.template.conf
+3
-1
package.json
ops/docker/rpc-proxy/package.json
+6
-0
package.json
package.json
+2
-1
No files found.
.changeset/smart-crabs-jump.md
0 → 100644
View file @
240e62e9
---
'
@eth-optimism/rpc-proxy'
:
patch
---
Initial rpc-proxy package
.github/workflows/publish-canary.yml
View file @
240e62e9
...
@@ -24,6 +24,7 @@ jobs:
...
@@ -24,6 +24,7 @@ jobs:
replica-healthcheck
:
${{ steps.packages.outputs.replica-healthcheck }}
replica-healthcheck
:
${{ steps.packages.outputs.replica-healthcheck }}
canary-docker-tag
:
${{ steps.docker-image-name.outputs.canary-docker-tag }}
canary-docker-tag
:
${{ steps.docker-image-name.outputs.canary-docker-tag }}
proxyd
:
${{ steps.canary-publish.outputs.proxyd }}
proxyd
:
${{ steps.canary-publish.outputs.proxyd }}
rpc-proxy
:
${{ steps.canary-publish.outputs.rpc-proxy }}
steps
:
steps
:
-
name
:
Check out source code
-
name
:
Check out source code
...
@@ -342,3 +343,29 @@ jobs:
...
@@ -342,3 +343,29 @@ jobs:
build-args
:
build-args
:
-
GITCOMMIT=$GITHUB_SHA
-
GITCOMMIT=$GITHUB_SHA
-
GITDATE=$GITDATE
-
GITDATE=$GITDATE
rpc-proxy
:
name
:
Publish rpc-proxy Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs
:
canary-publish
if
:
needs.canary-publish.outputs.rpc-proxy != ''
runs-on
:
ubuntu:latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v1
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v1
with
:
username
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
-
name
:
Build and push
uses
:
docker/build-push-action@v2
with
:
context
:
.
file
:
./ops/docker/Dockerfile.rpc-proxy
push
:
true
tags
:
ethereumoptimism/rpc-proxy:${{ needs.canary-publish.outputs.rpc-proxy }}
.github/workflows/release.yml
View file @
240e62e9
...
@@ -20,6 +20,7 @@ jobs:
...
@@ -20,6 +20,7 @@ jobs:
gas-oracle
:
${{ steps.packages.outputs.gas-oracle }}
gas-oracle
:
${{ steps.packages.outputs.gas-oracle }}
replica-healthcheck
:
${{ steps.packages.outputs.replica-healthcheck }}
replica-healthcheck
:
${{ steps.packages.outputs.replica-healthcheck }}
proxyd
:
${{ steps.packages.outputs.proxyd }}
proxyd
:
${{ steps.packages.outputs.proxyd }}
rpc-proxy
:
${{ steps.packages.outputs.rpc-proxy }}
steps
:
steps
:
-
name
:
Checkout Repo
-
name
:
Checkout Repo
...
@@ -360,3 +361,33 @@ jobs:
...
@@ -360,3 +361,33 @@ jobs:
build-args
:
build-args
:
-
GITCOMMIT=$GITHUB_SHA
-
GITCOMMIT=$GITHUB_SHA
-
GITDATE=$GITDATE
-
GITDATE=$GITDATE
rpc-proxy
:
name
:
Publish rpc-proxy Version ${{ needs.release.outputs.rpc-proxy }}
needs
:
release
if
:
needs.release.outputs.rpc-proxy != ''
runs-on
:
ubuntu:latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v1
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v1
with
:
username
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
-
name
:
Set env
run
:
|
echo "GITDATE=$(date)" >> $GITHUB_ENV"
-
name
:
Build and push
uses
:
docker/build-push-action@v2
with
:
context
:
.
file
:
./ops/docker/Dockerfile.rpc-proxy
push
:
true
tags
:
ethereumoptimism/rpc-proxy:${{ needs.canary-publish.outputs.rpc-proxy }}
ops/docker/rpc-proxy/nginx.template.conf
View file @
240e62e9
...
@@ -69,7 +69,9 @@ http {
...
@@ -69,7 +69,9 @@ http {
}
}
location
/ {
location
/ {
set
$
jsonrpc_whitelist
{{
env
.
Getenv
"ETH_CALLS_ALLOWED"
}};
set
$
jsonrpc_whitelist
{{
env
.
Getenv
"ETH_CALLS_ALLOWED"
}};
access_by_lua_file
'eth-jsonrpc-access.lua'
;
if
($
request_method
=
POST
) {
access_by_lua_file
'eth-jsonrpc-access.lua'
;
}
proxy_pass
http
://
sequencer
;
proxy_pass
http
://
sequencer
;
}
}
}
}
...
...
ops/docker/rpc-proxy/package.json
0 → 100644
View file @
240e62e9
{
"name"
:
"@eth-optimism/rpc-proxy"
,
"version"
:
"0.0.1"
,
"private"
:
true
,
"devDependencies"
:
{}
}
package.json
View file @
240e62e9
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
"specs"
,
"specs"
,
"go/gas-oracle"
,
"go/gas-oracle"
,
"go/batch-submitter"
,
"go/batch-submitter"
,
"go/proxyd"
"go/proxyd"
,
"ops/docker/rpc-proxy"
],
],
"nohoist"
:
[
"nohoist"
:
[
"examples/*"
"examples/*"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment