WIP: Resolve json rpc #57

Merged
jeffreypicard merged 8 commits from resolve-json-rpc into master 2022-09-07 20:36:07 +02:00
9 changed files with 139 additions and 8 deletions
Showing only changes of commit 49057e0f95 - Show all commits

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.idea/
.vscode/
.DS_Store
.venv

2
go.mod
View file

@ -8,6 +8,8 @@ require (
github.com/ReneKroon/ttlcache/v2 v2.8.1
github.com/akamensky/argparse v1.2.2
github.com/go-restruct/restruct v1.2.0-alpha
github.com/gorilla/mux v1.7.3
github.com/gorilla/rpc v1.2.0
github.com/lbryio/lbry.go/v3 v3.0.1-beta
github.com/linxGnu/grocksdb v1.6.42
github.com/olivere/elastic/v7 v7.0.24

8
go.sum
View file

@ -235,8 +235,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
@ -252,7 +252,9 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR
github.com/gopherjs/gopherjs v0.0.0-20190915194858-d3ddacdb130f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk=
github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
@ -764,7 +766,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210909193231-528a39cd75f3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab h1:rfJ1bsoJQQIAoAxTxB7bme+vHrNkRw8CqfsYh9w54cw=
golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@ -817,12 +818,11 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023 h1:0c3L82FDQ5rt1bjTBlchS8t6RQ6299/+5bWMnRLh+uI=
golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=

View file

@ -39,9 +39,13 @@ func main() {
defer func() {
log.Println("Shutting down server...")
if !s.Args.DisableEs {
s.EsClient.Stop()
}
s.GrpcServer.GracefulStop()
if !s.Args.DisableResolve {
s.DB.Shutdown()
}
log.Println("Returning from main...")
}()

16
requirements.txt Normal file
View file

@ -0,0 +1,16 @@
certifi==2022.6.15
cffi==1.15.1
charset-normalizer==2.1.0
cryptography==37.0.4
github3.py==3.2.0
grpcio==1.47.0
grpcio-tools==1.47.0
idna==3.3
protobuf==3.20.1
pycparser==2.21
PyJWT==2.4.0
python-dateutil==2.8.2
requests==2.28.1
six==1.16.0
uritemplate==4.1.1
urllib3==1.26.11
moodyjon commented 2022-09-06 21:24:23 +02:00 (Migrated from github.com)
Review

Is this needed by scripts/version.py? Did it get created inadvertently?

Is this needed by scripts/version.py? Did it get created inadvertently?
jeffreypicard commented 2022-09-07 07:16:46 +02:00 (Migrated from github.com)
Review

Yes, this is needed by the version.py, it was intentional.

Yes, this is needed by the version.py, it was intentional.

View file

@ -43,6 +43,7 @@ type Args struct {
DisableResolve bool
DisableBlockingAndFiltering bool
DisableStartNotifier bool
DisableStartJSONRPC bool
}
const (
@ -67,6 +68,7 @@ const (
DefaultDisableResolve = false
DefaultDisableBlockingAndFiltering = false
DisableStartNotifier = false
DisableStartJSONRPC = false
)
var (
@ -131,6 +133,7 @@ func ParseArgs(searchRequest *pb.SearchRequest) *Args {
disableResolve := parser.Flag("", "disable-resolve", &argparse.Options{Required: false, Help: "Disable resolve endpoint (and rocksdb loading)", Default: DefaultDisableRockDBRefresh})
disableBlockingAndFiltering := parser.Flag("", "disable-blocking-and-filtering", &argparse.Options{Required: false, Help: "Disable blocking and filtering of channels and streams", Default: DefaultDisableBlockingAndFiltering})
disableStartNotifier := parser.Flag("", "disable-start-notifier", &argparse.Options{Required: false, Help: "Disable start notifier", Default: DisableStartNotifier})
disableStartJSONRPC := parser.Flag("", "disable-start-jsonrpc", &argparse.Options{Required: false, Help: "Disable start jsonrpc endpoint", Default: DisableStartJSONRPC})
text := parser.String("", "text", &argparse.Options{Required: false, Help: "text query"})
name := parser.String("", "name", &argparse.Options{Required: false, Help: "name"})
@ -175,6 +178,7 @@ func ParseArgs(searchRequest *pb.SearchRequest) *Args {
DisableResolve: *disableResolve,
DisableBlockingAndFiltering: *disableBlockingAndFiltering,
DisableStartNotifier: *disableStartNotifier,
DisableStartJSONRPC: *disableStartJSONRPC,
}
if esHost, ok := environment["ELASTIC_HOST"]; ok {

49
server/jsonrpc_service.go Normal file
View file

@ -0,0 +1,49 @@
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
package server
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
import (
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
"log"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
"net/http"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
"github.com/gorilla/mux"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
"github.com/gorilla/rpc"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
"github.com/gorilla/rpc/json"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
"github.com/lbryio/herald.go/db"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
pb "github.com/lbryio/herald.go/protobuf/go"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
)
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
type JSONServer struct {
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
DB *db.ReadOnlyDBColumnFamily
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
}
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
type ResolveData struct {
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
Data []string `json:"data"`
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
}
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
type Result struct {
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
Data string `json:"data"`
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
}
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
//func (t *JSONServer) Resolve2(r *http.Request, args *ResolveData, result *Result) error {
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
func (t *JSONServer) Resolve2(r *http.Request, args *ResolveData, result **pb.Outputs) error {
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
log.Println("Resolve2")
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
res, err := InternalResolve(args.Data, t.DB)
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
*result = res
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
return err
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
}
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
func (s *Server) StartJsonRPC111() error {
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
server := new(JSONServer)
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
server.DB = s.DB
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
port := ":8080"
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
s1 := rpc.NewServer() // Create a new RPC server
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
s1.RegisterCodec(json.NewCodec(), "application/json") // Register the type of data requested as JSON
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
s1.RegisterService(server, "") // Register the service by creating a new JSON server
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
r := mux.NewRouter()
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
r.Handle("/rpc", s1)
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
log.Fatal(http.ListenAndServe(port, r))
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
return nil
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.
}
moodyjon commented 2022-09-06 21:12:56 +02:00 (Migrated from github.com)
Review

JSON port number should be a new thing in args.go, defaulting to 50001.

Then pass the args struct (or json parts of it) into StartJsonRPC111().

JSON port number should be a new thing in args.go, defaulting to 50001. Then pass the args struct (or json parts of it) into StartJsonRPC111().
jeffreypicard commented 2022-09-07 07:17:25 +02:00 (Migrated from github.com)
Review

Yup, I just added that. It's already carried in through the Server struct.

Yup, I just added that. It's already carried in through the Server struct.

View file

@ -4,6 +4,7 @@ import (
"context"
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"hash"
"io/ioutil"
@ -307,6 +308,14 @@ func MakeHubServer(ctx context.Context, args *Args) *Server {
}
}()
}
if !args.DisableStartJSONRPC {
go func() {
err := s.StartJsonRPC111()
if err != nil {
log.Println("JSONRPC Server failed!", err)
}
}()
}
// Load peers from disk and subscribe to one if there are any
if !args.DisableLoadPeers {
go func() {
@ -447,13 +456,49 @@ func (s *Server) HeightHashSubscribe() error {
}
func (s *Server) Resolve(ctx context.Context, args *pb.StringArray) (*pb.Outputs, error) {
// metrics.RequestsCount.With(prometheus.Labels{"method": "resolve"}).Inc()
// allTxos := make([]*pb.Output, 0)
// allExtraTxos := make([]*pb.Output, 0)
// for _, url := range args.Value {
// res := s.DB.Resolve(url)
// txos, extraTxos, err := res.ToOutputs()
// if err != nil {
// return nil, err
// }
// // TODO: there may be a more efficient way to do this.
// allTxos = append(allTxos, txos...)
// allExtraTxos = append(allExtraTxos, extraTxos...)
// }
// res := &pb.Outputs{
// Txos: allTxos,
// ExtraTxos: allExtraTxos,
// Total: uint32(len(allTxos) + len(allExtraTxos)),
// Offset: 0, //TODO
// Blocked: nil, //TODO
// BlockedTotal: 0, //TODO
// }
// logrus.Warn(res)
// return res, nil
return InternalResolve(args.Value, s.DB)
}
func InternalResolve(urls []string, DB *db.ReadOnlyDBColumnFamily) (*pb.Outputs, error) {
if DB == nil {
return nil, errors.New("db is nil")
// return nil, nil
}
metrics.RequestsCount.With(prometheus.Labels{"method": "resolve"}).Inc()
allTxos := make([]*pb.Output, 0)
allExtraTxos := make([]*pb.Output, 0)
for _, url := range args.Value {
res := s.DB.Resolve(url)
for _, url := range urls {
res := DB.Resolve(url)
txos, extraTxos, err := res.ToOutputs()
if err != nil {
return nil, err

10
test_rpc.sh Normal file
View file

@ -0,0 +1,10 @@
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
#!/bin/bash
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
curl --request POST 'localhost:8686/' \
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
--http1.1 \
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
--header 'Content-Type: application/json' \
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
--data-raw '{
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
"jsonrpc":"2.0",
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
"method":"resolve",
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
"params":{"data": "asdf"},
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
"id":1
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.
}'
moodyjon commented 2022-09-06 21:24:59 +02:00 (Migrated from github.com)
Review

Where does this port number come from? I would expect to see 8080 (or 50001)

Also does this need "/rpc" to match line 45 of jsonrpc_service.go?

I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).

Where does this port number come from? I would expect to see 8080 (or 50001) Also does this need "/rpc" to match line 45 of jsonrpc_service.go? I haven't been able to determine whether (Python) herald uses "/rpc" or any other path(s).
jeffreypicard commented 2022-09-07 07:18:11 +02:00 (Migrated from github.com)
Review

This is an old script added in by mistake, I'll move and change it.

This is an old script added in by mistake, I'll move and change it.