Do call #11

Merged
telackey merged 7 commits from do_call into master 2020-10-21 02:21:33 +00:00
Member

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).

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).
AFDudley reviewed 2020-09-25 14:00:38 +00:00
ramilexe commented 2020-09-29 15:53:53 +00:00 (Migrated from github.com)
https://github.com/vulcanize/ipld-eth-server/issues/10
Author
Member

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.

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.
Author
Member

In addition to tests, #13 and #14 required to consider this complete

In addition to tests, #13 and #14 required to consider this complete
Author
Member

https://github.com/vulcanize/ipld-eth-indexer/issues/27 is blocking this, otherwise the tests are passing

https://github.com/vulcanize/ipld-eth-indexer/issues/27 is blocking this, otherwise the tests are passing
ramilexe (Migrated from github.com) reviewed 2020-10-14 15:07:13 +00:00
@ -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"
ramilexe (Migrated from github.com) commented 2020-10-14 14:54:32 +00:00

this repo was renamed to github.com/vulcanize/ipfs-ethdb shouldn't we update import as well?

this repo was renamed to `github.com/vulcanize/ipfs-ethdb` shouldn't we update import as well?
ramilexe (Migrated from github.com) commented 2020-10-14 15:01:43 +00:00

Isn't better to return some error/exception/panic?

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"))
ramilexe (Migrated from github.com) commented 2020-10-14 15:05:11 +00:00

where is the definition that for data input and block number 2 we will have this result?

where is the definition that for `data` input and block number 2 we will have this result?
i-norden reviewed 2020-10-14 16:50:00 +00:00
@ -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"
Author
Member

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)

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)
i-norden reviewed 2020-10-14 16:53:16 +00:00
Author
Member

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.

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.
i-norden reviewed 2020-10-14 16:54:37 +00:00
@ -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"))
Author
Member
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
ramilexe (Migrated from github.com) reviewed 2020-10-14 18:12:16 +00:00
@ -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"))
ramilexe (Migrated from github.com) commented 2020-10-14 18:12:16 +00:00

Thanks!

Thanks!
ramilexe (Migrated from github.com) reviewed 2020-10-21 00:07:37 +00:00
ramilexe (Migrated from github.com) commented 2020-10-21 00:07:36 +00:00

Full path doesn't work in CI

Full path doesn't work in CI
i-norden reviewed 2020-10-21 02:14:38 +00:00
Author
Member

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

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
Author
Member

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.

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.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-server#11
No description provided.