Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nil/services/relayer/internal/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"golang.org/x/sync/errgroup"
)

const RPCNamespace = "relayer_debug"
const RPCNamespace = "relayerDebug"

type RelayerStats struct {
// address of the smart account used by relayer to operate on L2
Expand Down Expand Up @@ -98,7 +98,7 @@ func (p *RPCListener) Run(ctx context.Context, started chan struct{}) error {
apiList := []transport.API{
{
Namespace: RPCNamespace,
Public: false,
Public: true,
Service: p.statsAPI,
Version: "1.0",
},
Expand Down Expand Up @@ -152,8 +152,11 @@ func NewRelayerStatsAPI(
func (p *RelayerStatsAPI) runRefreshLoop(ctx context.Context, started chan struct{}) error {
ticker := p.clock.NewTicker(15 * time.Second)
defer ticker.Stop()

close(started)

if err := p.refresh(ctx); err != nil {
return err
}
for {
select {
case <-ctx.Done():
Expand Down
5 changes: 4 additions & 1 deletion rollup-bridge-contracts/test_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pids=()

cleanup() {
echo "→ cleaning up ${#pids[@]} processes"
cat $LOG_DIR/geth.log
cat $LOG_DIR/relayer.log

for pid in "${pids[@]}"; do
if kill -0 "$pid" 2>/dev/null; then
Expand Down Expand Up @@ -129,6 +129,9 @@ $RELAYER_BIN run \
pids+=("$!")
wait_for_http_service "http://127.0.0.1:7777"

# example query to get relayer stats
curl -XPOST http://127.0.0.1:7777 -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"relayerDebug_getStats", "params": [], "id": 1}'

echo "TODO: L2 contract deployment is not ready yet"

echo "Triggering L1 deposit event"
Expand Down