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
bebeef14
Unverified
Commit
bebeef14
authored
Apr 25, 2021
by
Mark Tyneway
Committed by
GitHub
Apr 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ops: check for URL before trying to query it (#572)
Co-authored-by:
Georgios Konstantopoulos
<
me@gakonst.com
>
parent
77779a5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
26 deletions
+35
-26
batches.sh
ops/scripts/batches.sh
+6
-4
dtl.sh
ops/scripts/dtl.sh
+6
-4
geth.sh
ops/scripts/geth.sh
+17
-14
relayer.sh
ops/scripts/relayer.sh
+6
-4
No files found.
ops/scripts/batches.sh
View file @
bebeef14
#!/bin/bash
#!/bin/bash
RETRIES
=
${
RETRIES
:-
40
}
RETRIES
=
${
RETRIES
:-
40
}
# get the addrs from the URL provided
if
[[
!
-z
"
$URL
"
]]
;
then
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
# get the addrs from the URL provided
# set the env
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
export
ADDRESS_MANAGER_ADDRESS
=
$(
echo
$ADDRESSES
| jq
-r
'.AddressManager'
)
# set the env
export
ADDRESS_MANAGER_ADDRESS
=
$(
echo
$ADDRESSES
| jq
-r
'.AddressManager'
)
fi
# waits for l2geth to be up
# waits for l2geth to be up
curl
--silent
\
curl
--silent
\
...
...
ops/scripts/dtl.sh
View file @
bebeef14
#!/bin/bash
#!/bin/bash
RETRIES
=
${
RETRIES
:-
60
}
RETRIES
=
${
RETRIES
:-
60
}
# get the addrs from the URL provided
if
[[
!
-z
"
$URL
"
]]
;
then
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
# get the addrs from the URL provided
# set the env
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
export
DATA_TRANSPORT_LAYER__ADDRESS_MANAGER
=
$(
echo
$ADDRESSES
| jq
-r
'.AddressManager'
)
# set the env
export
DATA_TRANSPORT_LAYER__ADDRESS_MANAGER
=
$(
echo
$ADDRESSES
| jq
-r
'.AddressManager'
)
fi
# go
# go
exec
node dist/src/services/run.js
exec
node dist/src/services/run.js
ops/scripts/geth.sh
View file @
bebeef14
#!/bin/bash
#!/bin/bash
RETRIES
=
${
RETRIES
:-
40
}
RETRIES
=
${
RETRIES
:-
40
}
VERBOSITY
=
${
VERBOSITY
:-
6
}
VERBOSITY
=
${
VERBOSITY
:-
6
}
# get the addrs from the URL provided
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
function
envSet
()
{
if
[[
!
-z
"
$URL
"
]]
;
then
VAR
=
$1
# get the addrs from the URL provided
export
$VAR
=
$(
echo
$ADDRESSES
| jq
-r
".
$2
"
)
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
}
# set all the necessary env vars
function
envSet
()
{
envSet ETH1_ADDRESS_RESOLVER_ADDRESS AddressManager
VAR
=
$1
envSet ETH1_L1_CROSS_DOMAIN_MESSENGER_ADDRESS Proxy__OVM_L1CrossDomainMessenger
export
$VAR
=
$(
echo
$ADDRESSES
| jq
-r
".
$2
"
)
envSet ROLLUP_ADDRESS_MANAGER_OWNER_ADDRESS Deployer
}
# set the address to the proxy gateway if possible
# set all the necessary env vars
envSet ETH1_L1_ETH_GATEWAY_ADDRESS Proxy__OVM_L1ETHGateway
envSet ETH1_ADDRESS_RESOLVER_ADDRESS AddressManager
if
[
$ETH1_L1_ETH_GATEWAY_ADDRESS
==
null
]
;
then
envSet ETH1_L1_CROSS_DOMAIN_MESSENGER_ADDRESS Proxy__OVM_L1CrossDomainMessenger
envSet ETH1_L1_ETH_GATEWAY_ADDRESS OVM_L1ETHGateway
envSet ROLLUP_ADDRESS_MANAGER_OWNER_ADDRESS Deployer
# set the address to the proxy gateway if possible
envSet ETH1_L1_ETH_GATEWAY_ADDRESS Proxy__OVM_L1ETHGateway
if
[
$ETH1_L1_ETH_GATEWAY_ADDRESS
==
null
]
;
then
envSet ETH1_L1_ETH_GATEWAY_ADDRESS OVM_L1ETHGateway
fi
fi
fi
# wait for the dtl to be up, else geth will crash if it cannot connect
# wait for the dtl to be up, else geth will crash if it cannot connect
...
...
ops/scripts/relayer.sh
View file @
bebeef14
#!/bin/bash
#!/bin/bash
RETRIES
=
${
RETRIES
:-
60
}
RETRIES
=
${
RETRIES
:-
60
}
# get the addrs from the URL provided
if
[[
!
-z
"
$URL
"
]]
;
then
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
# get the addrs from the URL provided
# set the env
ADDRESSES
=
$(
curl
--silent
--retry-connrefused
--retry
$RETRIES
--retry-delay
5
$URL
)
export
ADDRESS_MANAGER_ADDRESS
=
$(
echo
$ADDRESSES
| jq
-r
'.AddressManager'
)
# set the env
export
ADDRESS_MANAGER_ADDRESS
=
$(
echo
$ADDRESSES
| jq
-r
'.AddressManager'
)
fi
# waits for l2geth to be up
# waits for l2geth to be up
curl
\
curl
\
...
...
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