Do call #11
No reviewers
Labels
No Label
bug
critical
documentation
duplicate
enhancement
Epic
good first issue
help wanted
Integration tests
invalid
question
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/ipld-eth-server#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "do_call"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adding
eth_Call
endpoint to ipld-eth-server.See #10
Included in this work are some Postgres functions for retrieving the canonical header at a provided height (based on weight).
https://github.com/vulcanize/ipld-eth-server/issues/10
This is ostensibly completed, but I need to write unit tests. This is cumbersome because we need to generate sufficient state to perform the eth_Call operations on to test them.
In addition to tests, #13 and #14 required to consider this complete
https://github.com/vulcanize/ipld-eth-indexer/issues/27 is blocking this, otherwise the tests are passing
@ -29,3 +34,4 @@
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
ipfsethdb "github.com/vulcanize/pg-ipfs-ethdb"
this repo was renamed to
github.com/vulcanize/ipfs-ethdb
shouldn't we update import as well?Isn't better to return some error/exception/panic?
@ -0,0 +148,4 @@
}
res, err := api.Call(context.Background(), callArgs, rpc.BlockNumberOrHashWithNumber(2), nil)
Expect(err).ToNot(HaveOccurred())
expectedRes := hexutil.Bytes(common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000001"))
where is the definition that for
data
input and block number 2 we will have this result?@ -29,3 +34,4 @@
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
ipfsethdb "github.com/vulcanize/pg-ipfs-ethdb"
We're using an early tagged release of that repo where the package is exported as
github.com/vulcanize/pg-ipfs-ethdb
, because it is the version that is compatible with geth 1.9.11 (what our statediffing geth is currently rebased ontop of)ethash.NewFaker() is the correct thing to return in the case of mainnet and some other PoW chains, but PoA (Clique) chains need to return a different engine.
@ -0,0 +148,4 @@
}
res, err := api.Call(context.Background(), callArgs, rpc.BlockNumberOrHashWithNumber(2), nil)
Expect(err).ToNot(HaveOccurred())
expectedRes := hexutil.Bytes(common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000001"))
This is the value set in the contract init: https://github.com/vulcanize/ipld-eth-server/blob/do_call/pkg/eth/test_helpers/test_contract.sol#L18
The other values are set in the chain maker txs: e.g. https://github.com/vulcanize/ipld-eth-server/blob/do_call/pkg/eth/test_helpers/chain_maker.go#L85
@ -0,0 +148,4 @@
}
res, err := api.Call(context.Background(), callArgs, rpc.BlockNumberOrHashWithNumber(2), nil)
Expect(err).ToNot(HaveOccurred())
expectedRes := hexutil.Bytes(common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000001"))
Thanks!
Full path doesn't work in CI
Yeah I had to wait for https://github.com/vulcanize/ipld-eth-indexer/releases/tag/v0.6.0-alpha, was just stashing on the remote, updated it now
https://github.com/vulcanize/ipld-eth-indexer/releases/tag/v0.6.0-alpha is cut. Updated to use it and eth_call and rest of the tests are passing.