-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rpc): chain RPCs #1147
feat(rpc): chain RPCs #1147
Conversation
@@ -6,8 +6,7 @@ import ( | |||
"time" | |||
|
|||
"github.com/kwilteam/kwil-db/core/log" | |||
ktypes "github.com/kwilteam/kwil-db/core/types" | |||
"github.com/kwilteam/kwil-db/node/types" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be simplify to just use core types
@@ -68,14 +68,6 @@ func (svc *Service) Methods() map[jsonrpc.Method]rpcserver.MethodDef { | |||
} | |||
} | |||
|
|||
func (svc *Service) Handlers() map[jsonrpc.Method]rpcserver.MethodHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is not used
4a35406
to
e12bf7c
Compare
17b1807
to
f5d3a19
Compare
@@ -30,6 +30,8 @@ type ConsensusEngine interface { | |||
blkRequester consensus.BlkRequester, stateResetter consensus.ResetStateBroadcaster, discoveryBroadcaster consensus.DiscoveryReqBroadcaster) error | |||
|
|||
CheckTx(ctx context.Context, tx *ktypes.Transaction) error | |||
|
|||
ConsensusParams() *ktypes.ConsensusParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind awkward, I have to define this on both ConsensusEngine and Node to pass over to chain rpc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this point, I think we are likely to have block executor provide. OK for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we could have one more interface using BlockProcessor to provide these functions.
need to implement the client as well, don't review/merge yet |
OK, I think it's ready to be reviewed |
f0930ca
to
4bbe029
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glanced through it, LGTM!
@charithabandi resolution for the RecheckTxs issue? |
Just update the interface I suppose? |
yeah, merge conflict issue, we fixed it, @Yaiba pushing the updates |
This resolves #1121
All APIs listed in the issue are implemented under
chain
rpc namespace.These APIs are not implemented:
/num_unconfirmed_txs
,chain.unconfirmed_txs
returned the total txs/tx_search
, it's more useful for tx subscription, we don't have the needs yet/block_search
, it's more useful for block subscription/check_tx
/commit
, I don't think we have this kind of info