Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Aug 28, 2024
1 parent 8315da6 commit 35472b1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions rpcsync/rpc_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ import (
jRPC "github.com/0xPolygon/cdk-rpc/rpc"
)


/*

Check failure on line 13 in rpcsync/rpc_debug.go

View workflow job for this annotation

GitHub Actions / check_version

comment not terminated

Check failure on line 13 in rpcsync/rpc_debug.go

View workflow job for this annotation

GitHub Actions / lint

comment not terminated (typecheck)

Check failure on line 13 in rpcsync/rpc_debug.go

View workflow job for this annotation

GitHub Actions / lint

comment not terminated (typecheck)
To activate this you need the build tag `debug`:
- Example of launch.json entry
"name": "run CARDONA",
"type": "go",
"request": "launch",
"mode": "auto",
"buildFlags": "-tags 'debug'",
"program": "cmd/main.go",


This RPC is deployed on port 1025:
- To execute rollbackBatches: lastBatch, accInputHash, l1BlockNumber
curl -X POST http://localhost:1025/ -H "Con -application/json" -d '{"method":"debug_rollbackBatches", "params":[53992, "0x1234", 5159957], "id":1}'
- To executge forceReorg: firstL1BlockNumberToKeep
curl -X POST http://localhost:1025/ -H "Con -application/json" -d '{"method":"debug_forceReorg", "params":[5159956], "id":1}'


func StartRPC(state interface{}) {
cfg := jRPC.Config{
Port: 1025,
Expand Down

0 comments on commit 35472b1

Please sign in to comment.