Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

RpcClient missing state root related methods#644

Merged
superboyiii merged 17 commits intomasterfrom
devhawk/issue635
Oct 8, 2021
Merged

RpcClient missing state root related methods#644
superboyiii merged 17 commits intomasterfrom
devhawk/issue635

Conversation

@devhawk
Copy link
Contributor

@devhawk devhawk commented Sep 15, 2021

Fixes #635
Also fixes #646

Note this is a draft PR until #638 is merged

@devhawk
Copy link
Contributor Author

devhawk commented Sep 29, 2021

@ZhangTao1596 can a proof be verified locally? w/o an RPC call I mean?

@devhawk devhawk marked this pull request as ready for review September 29, 2021 22:39
@ZhangTao1596
Copy link
Collaborator

@ZhangTao1596 can a proof be verified locally? w/o an RPC call I mean?

Locally use

public static TValue VerifyProof(UInt256 root, TKey key, HashSet<byte[]> proof)

Or rpc
public JObject VerifyProof(JArray _params)

@devhawk
Copy link
Contributor Author

devhawk commented Oct 1, 2021

Locally use MPTTrie.Proof.cs

Is there a way to get the MPTTrie code separately from the StateService plugin? At least the proof code?

@devhawk
Copy link
Contributor Author

devhawk commented Oct 5, 2021

Ping @erikzhang @shargon @neo-project/core

Convert.FromBase64String(j["value"].AsString())
))
.ToArray(),
FirstProof = ProofFromJson(json["firstProof"]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lowercase?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should change StateServie, all json is using the same rules except this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't think it's worth the churn to change the casing on a JSON field, but I'm happy to change this PR if we change state service

@ZhangTao1596
Copy link
Collaborator

ZhangTao1596 commented Oct 8, 2021

Is there a way to get the MPTTrie code separately from the StateService plugin? At least the proof code?

You mean put mpt code into a separated nuget package?

@devhawk
Copy link
Contributor Author

devhawk commented Oct 8, 2021

Is there a way to get the MPTTrie code separately from the StateService plugin? At least the proof code?

You mean put mpt code into a separated nuget package?

A separate .NET class library and nuget package yes . I opened #648 to track this

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge it and fix the json in another PR later

@ProDog
Copy link
Contributor

ProDog commented Oct 8, 2021

Tested OK.

@superboyiii superboyiii merged commit 606bd27 into master Oct 8, 2021
@superboyiii superboyiii deleted the devhawk/issue635 branch October 8, 2021 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add synchronous Send/RpcSend methods to RpcClient RpcClient missing state root related methods

5 participants