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
9e68cb0e
Unverified
Commit
9e68cb0e
authored
Jun 19, 2024
by
smartcontracts
Committed by
GitHub
Jun 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maint: remove drippie-mon (#10945)
Drippie monitoring is now handled in monitorism.
parent
8e987923
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2 additions
and
268 deletions
+2
-268
release-docker-canary.yml
.github/workflows/release-docker-canary.yml
+0
-28
release.yml
.github/workflows/release.yml
+0
-28
Dockerfile.packages
ops/docker/Dockerfile.packages
+0
-4
.env.example
packages/chain-mon/.env.example
+0
-10
README.md
packages/chain-mon/README.md
+2
-2
service.ts
packages/chain-mon/contrib/drippie-mon/service.ts
+0
-193
package.json
packages/chain-mon/package.json
+0
-2
index.ts
packages/chain-mon/src/index.ts
+0
-1
No files found.
.github/workflows/release-docker-canary.yml
View file @
9e68cb0e
...
...
@@ -16,7 +16,6 @@ jobs:
# map the step outputs to job outputs
outputs
:
balance-mon
:
${{ steps.packages.outputs.balance-mon }}
drippie-mon
:
${{ steps.packages.outputs.drippie-mon }}
fault-mon
:
${{ steps.packages.outputs.fault-mon }}
multisig-mon
:
${{ steps.packages.outputs.multisig-mon }}
replica-mon
:
${{ steps.packages.outputs.replica-mon }}
...
...
@@ -123,33 +122,6 @@ jobs:
push
:
true
tags
:
ethereumoptimism/multisig-mon:${{ needs.canary-publish.outputs.canary-docker-tag }}
drippie-mon
:
name
:
Publish Drippie Monitor Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs
:
canary-publish
if
:
needs.canary-publish.outputs.drippie-mon != ''
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v3
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v3
with
:
username
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
-
name
:
Build and push
uses
:
docker/build-push-action@v6
with
:
context
:
.
file
:
./ops/docker/Dockerfile.packages
target
:
drippie-mon
push
:
true
tags
:
ethereumoptimism/drippie-mon:${{ needs.canary-publish.outputs.canary-docker-tag }}
wd-mon
:
name
:
Publish Withdrawal Monitor Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs
:
canary-publish
...
...
.github/workflows/release.yml
View file @
9e68cb0e
...
...
@@ -17,7 +17,6 @@ jobs:
# map the step outputs to job outputs
outputs
:
balance-mon
:
${{ steps.packages.outputs.balance-mon }}
drippie-mon
:
${{ steps.packages.outputs.drippie-mon }}
fault-mon
:
${{ steps.packages.outputs.fault-mon }}
multisig-mon
:
${{ steps.packages.outputs.multisig-mon }}
replica-mon
:
${{ steps.packages.outputs.replica-mon }}
...
...
@@ -187,33 +186,6 @@ jobs:
push
:
true
tags
:
ethereumoptimism/multisig-mon:${{ needs.release.outputs.multisig-mon }},ethereumoptimism/multisig-mon:latest
drippie-mon
:
name
:
Publish Drippie Monitor Version ${{ needs.release.outputs.drippie-mon }}
needs
:
release
if
:
needs.release.outputs.drippie-mon != ''
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v3
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v3
with
:
username
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password
:
${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
-
name
:
Build and push
uses
:
docker/build-push-action@v6
with
:
context
:
.
file
:
./ops/docker/Dockerfile.packages
target
:
drippie-mon
push
:
true
tags
:
ethereumoptimism/drippie-mon:${{ needs.release.outputs.drippie-mon }},ethereumoptimism/drippie-mon:latest
replica-mon
:
name
:
Publish Replica Healthcheck Version ${{ needs.release.outputs.replica-mon }}
needs
:
release
...
...
ops/docker/Dockerfile.packages
View file @
9e68cb0e
...
...
@@ -98,10 +98,6 @@ FROM base as balance-mon
WORKDIR /opt/optimism/packages/chain-mon/internal
CMD ["start:balance-mon"]
FROM base as drippie-mon
WORKDIR /opt/optimism/packages/chain-mon/contrib
CMD ["start:drippie-mon"]
from base as fault-mon
WORKDIR /opt/optimism/packages/chain-mon/
CMD ["start:fault-mon"]
...
...
packages/chain-mon/.env.example
View file @
9e68cb0e
...
...
@@ -31,16 +31,6 @@ WALLET_MON__RPC=
# Defaults to the first bedrock block if unset.
WALLET_MON__START_BLOCK_NUMBER=
###############################################################################
# ↓ drippie-mon ↓ #
###############################################################################
# RPC pointing to network where Drippie is deployed
DRIPPIE_MON__RPC=
# Address of the Drippie contract
DRIPPIE_MON__DRIPPIE_ADDRESS=
###############################################################################
# ↓ wd-mon ↓ #
###############################################################################
...
...
packages/chain-mon/README.md
View file @
9e68cb0e
...
...
@@ -23,8 +23,8 @@ Once your environment variables have been set, run via:
pnpm start:<service name>
```
For example, to run
`
drippi
e-mon`
, execute:
For example, to run
`
balanc
e-mon`
, execute:
```
pnpm start:
drippi
e-mon
pnpm start:
balanc
e-mon
```
packages/chain-mon/contrib/drippie-mon/service.ts
deleted
100644 → 0
View file @
8e987923
import
{
BaseServiceV2
,
StandardOptions
,
Gauge
,
Counter
,
validators
,
}
from
'
@eth-optimism/common-ts
'
import
{
Provider
}
from
'
@ethersproject/abstract-provider
'
import
{
ethers
}
from
'
ethers
'
import
*
as
DrippieArtifact
from
'
@eth-optimism/contracts-bedrock/forge-artifacts/Drippie.sol/Drippie.json
'
import
{
version
}
from
'
../../package.json
'
type
DrippieMonOptions
=
{
rpc
:
Provider
drippieAddress
:
string
}
type
DrippieMonMetrics
=
{
isExecutable
:
Gauge
executedDripCount
:
Gauge
unexpectedRpcErrors
:
Counter
}
type
DrippieMonState
=
{
drippie
:
ethers
.
Contract
}
export
class
DrippieMonService
extends
BaseServiceV2
<
DrippieMonOptions
,
DrippieMonMetrics
,
DrippieMonState
>
{
constructor
(
options
?:
Partial
<
DrippieMonOptions
&
StandardOptions
>
)
{
super
({
version
,
name
:
'
drippie-mon
'
,
loop
:
true
,
options
:
{
loopIntervalMs
:
60
_000
,
...
options
,
},
optionsSpec
:
{
rpc
:
{
validator
:
validators
.
provider
,
desc
:
'
Provider for network where Drippie is deployed
'
,
},
drippieAddress
:
{
validator
:
validators
.
str
,
desc
:
'
Address of Drippie contract
'
,
public
:
true
,
},
},
metricsSpec
:
{
isExecutable
:
{
type
:
Gauge
,
desc
:
'
Whether or not the drip is currently executable
'
,
labels
:
[
'
name
'
],
},
executedDripCount
:
{
type
:
Gauge
,
desc
:
'
Number of times a drip has been executed
'
,
labels
:
[
'
name
'
],
},
unexpectedRpcErrors
:
{
type
:
Counter
,
desc
:
'
Number of unexpected RPC errors
'
,
labels
:
[
'
section
'
,
'
name
'
],
},
},
})
}
protected
async
init
():
Promise
<
void
>
{
this
.
state
.
drippie
=
new
ethers
.
Contract
(
this
.
options
.
drippieAddress
,
DrippieArtifact
.
abi
,
this
.
options
.
rpc
)
}
protected
async
main
():
Promise
<
void
>
{
let
dripCreatedEvents
:
ethers
.
Event
[]
try
{
dripCreatedEvents
=
await
this
.
state
.
drippie
.
queryFilter
(
this
.
state
.
drippie
.
filters
.
DripCreated
()
)
}
catch
(
err
)
{
this
.
logger
.
info
(
`got unexpected RPC error`
,
{
section
:
'
creations
'
,
name
:
'
NULL
'
,
err
,
})
this
.
metrics
.
unexpectedRpcErrors
.
inc
({
section
:
'
creations
'
,
name
:
'
NULL
'
,
})
return
}
// Not the most efficient thing in the world. Will end up making one request for every drip
// created. We don't expect there to be many drips, so this is fine for now. We can also cache
// and skip any archived drips to cut down on a few requests. Worth keeping an eye on this to
// see if it's a bottleneck.
for
(
const
event
of
dripCreatedEvents
)
{
const
name
=
event
.
args
.
name
let
drip
:
any
try
{
drip
=
await
this
.
state
.
drippie
.
drips
(
name
)
}
catch
(
err
)
{
this
.
logger
.
info
(
`got unexpected RPC error`
,
{
section
:
'
drips
'
,
name
,
err
,
})
this
.
metrics
.
unexpectedRpcErrors
.
inc
({
section
:
'
drips
'
,
name
,
})
continue
}
this
.
logger
.
info
(
`getting drip executable status`
,
{
name
,
count
:
drip
.
count
.
toNumber
(),
})
this
.
metrics
.
executedDripCount
.
set
(
{
name
,
},
drip
.
count
.
toNumber
()
)
let
executable
:
boolean
try
{
// To avoid making unnecessary RPC requests, filter out any drips that we don't expect to
// be executable right now. Only active drips (status = 2) and drips that are due to be
// executed are expected to be executable (but might not be based on the dripcheck).
if
(
drip
.
status
===
2
&&
drip
.
last
.
toNumber
()
+
drip
.
config
.
interval
.
toNumber
()
<
Date
.
now
()
/
1000
)
{
executable
=
await
this
.
state
.
drippie
.
executable
(
name
)
}
else
{
executable
=
false
}
}
catch
(
err
)
{
// All reverts include the string "Drippie:", so we can check for that.
if
(
err
.
message
.
includes
(
'
Drippie:
'
))
{
// Not executable yet.
executable
=
false
}
else
{
this
.
logger
.
info
(
`got unexpected RPC error`
,
{
section
:
'
executable
'
,
name
,
err
,
})
this
.
metrics
.
unexpectedRpcErrors
.
inc
({
section
:
'
executable
'
,
name
,
})
continue
}
}
this
.
logger
.
info
(
`got drip executable status`
,
{
name
,
executable
,
})
this
.
metrics
.
isExecutable
.
set
(
{
name
,
},
executable
?
1
:
0
)
}
}
}
if
(
require
.
main
===
module
)
{
const
service
=
new
DrippieMonService
()
service
.
run
()
}
packages/chain-mon/package.json
View file @
9e68cb0e
...
...
@@ -10,7 +10,6 @@
],
"scripts"
:
{
"dev:balance-mon"
:
"tsx watch ./internal/balance-mon/service.ts"
,
"dev:drippie-mon"
:
"tsx watch ./contrib/drippie/service.ts"
,
"dev:fault-mon"
:
"tsx watch ./src/fault-mon/service.ts"
,
"dev:multisig-mon"
:
"tsx watch ./internal/multisig-mon/service.ts"
,
"dev:replica-mon"
:
"tsx watch ./contrib/replica-mon/service.ts"
,
...
...
@@ -19,7 +18,6 @@
"dev:faultproof-wd-mon"
:
"tsx ./src/faultproof-wd-mon/service.ts"
,
"dev:initialized-upgraded-mon"
:
"tsx watch ./contrib/initialized-upgraded-mon/service.ts"
,
"start:balance-mon"
:
"tsx ./internal/balance-mon/service.ts"
,
"start:drippie-mon"
:
"tsx ./contrib/drippie/service.ts"
,
"start:fault-mon"
:
"tsx ./src/fault-mon/service.ts"
,
"start:multisig-mon"
:
"tsx ./internal/multisig-mon/service.ts"
,
"start:replica-mon"
:
"tsx ./contrib/replica-mon/service.ts"
,
...
...
packages/chain-mon/src/index.ts
View file @
9e68cb0e
export
*
from
'
../internal/balance-mon/service
'
export
*
from
'
../contrib/drippie-mon/service
'
export
*
from
'
./fault-mon/index
'
export
*
from
'
../internal/multisig-mon/service
'
export
*
from
'
./wd-mon/service
'
...
...
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