-
Notifications
You must be signed in to change notification settings - Fork 7
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
API GetTransactionProof, GetReceiptProof #94
Conversation
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.
it need a test script
Yes, please write a test for proofPairList object and deriveTrie function at least |
do we need to put something in web3ext.go for external interface? |
return nil, fmt.Errorf("key not found") | ||
} | ||
|
||
func TestReceiptProof(t *testing.T) { |
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 think it is necessary to call GetReceiptProof function in test script
we need test the function
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 don't know how to write test for calling function like GetReceiptProof or other GetXXX. In the codebase I cannot find any test like this.
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.
if use that way how do we ensure the getReceiptProof will no error when we changed some code
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.
actually I don't know. I can only say that in our codebase (and the ethereum codebase xinfin forked) there is no test for api functions. So it is hard to write test for this api function GetReceiptProof
Trieproof fix
it seems Receipt need to add a parameter XDC-Subnet/core/types/receipt.go Line 99 in 3643104
|
This encoding is written by ethereum yellow paper and I think we should not change it. If we change it, then our code is quite different from ethereum and users may not like it. The code to compute contractAddress is quite simple and we can compute it whenever we want to use it: in
(vmenv.Context.Origin is just tx.Sender()) |
i can only get the receiptrlp the struct only have status bloom log gas i can not get other parameters |
i think if any possible we can implement the |
I find the implementation and can do it. But may I ask when do we need eth_getProof? I thought we only need transaction proof and receipt proof. |
just forget it , this one just is a another way that deal the cross chain system |
* API GetReceiptProof * API GetReceiptProof test * add ext interface * Trieproof fix (#96) Trieproof fix * add GetTransactionProof to api * merge two API into GetTransactionAndReceiptProof --------- Co-authored-by: wanwiset25 <wanwiset25@gmail.com> Co-authored-by: Galaxy <30950645+GalaxySciTech@users.noreply.github.com>
* cicd test * typo * test2 * fix * fix2 * fix3 * trig * change workflow name * chekout step * fix * adjust params * re org files * bug * clean output * Feature testdevelop4 (#113) * final update * name * name * add enable-0x-prefix flag (#102) * enable 0x test flag * rm test file * change script repo * API GetTransactionProof, GetReceiptProof (#94) * API GetReceiptProof * API GetReceiptProof test * add ext interface * Trieproof fix (#96) Trieproof fix * add GetTransactionProof to api * merge two API into GetTransactionAndReceiptProof --------- Co-authored-by: wanwiset25 <wanwiset25@gmail.com> Co-authored-by: Galaxy <30950645+GalaxySciTech@users.noreply.github.com> * first copy v1.10 * fix all errs outside rpc by adding functions * fix rpc errors * upgrade xdc to use gorilla for websocket instead of the native net * upgrade go to 1.14 * fix issue with the duplicated name of max_socket_path_size from c * change to self common * add back the missing committed input parameter * EpochNumber ummarshal --------- Co-authored-by: Daniel Liu <139250065@qq.com> Co-authored-by: wgr523 <wgr523@gmail.com> Co-authored-by: Galaxy <30950645+GalaxySciTech@users.noreply.github.com> Co-authored-by: Jianrong <wjrjerome@gmail.com>
No description provided.