Compare commits

..
Author SHA1 Message Date
Michael 1fcc8b4b93 Merge pull request #32 from vulcanize/geth-rebase-wip
missed ipfs-ethdb version update
2022-07-29 16:31:00 -04:00
Michael Shaw 84e6e8dd28 missed ipfs-ethdb version update 2022-07-29 16:28:24 -04:00
Michael 7e1ed6cb21 Merge pull request #31 from vulcanize/geth-rebase-wip
geth 1.10.21 updates
2022-07-29 16:01:11 -04:00
Michael Shaw d7ea483c42 geth 1.10.21 updates 2022-07-29 16:00:29 -04:00
Michael 134130ad65 Merge pull request #30 from vulcanize/release-v4.0.4-alpha
go-ethereum 1.10.20 version update
2022-07-20 17:01:23 -04:00
Michael Shaw 8596ad8ca6 go-ethereum 1.10.20 version update 2022-07-19 01:28:21 -04:00
Abdul Rabbani f6d7948220 Merge pull request #28 from vulcanize/feature/update-geth-v1.10.19
Update geth versions and vulcanize dependencies
2022-06-17 08:43:29 -04:00
Abdul Rabbani e64788e900 Update geth versions and vulcanize dependencies
```
08:29:49:~/GitHub/cerc/eth-ipfs-state-validator go test ./... -v
?       github.com/vulcanize/eth-ipfs-state-validator/v4        [no test files]
?       github.com/vulcanize/eth-ipfs-state-validator/v4/cmd    [no test files]
=== RUN   TestTrieValidator
Running Suite: IPFS ETH trie validator test
===========================================
Random Seed: 1655469020
Will run 12 of 12 specs

••••••••••••
Ran 12 of 12 Specs in 1.325 seconds
SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestTrieValidator (1.33s)
PASS
ok      github.com/vulcanize/eth-ipfs-state-validator/v4/pkg    1.749s
```
2022-06-17 08:31:15 -04:00
Abdul Rabbani afe207445a Merge pull request #27 from vulcanize/feature/update-go-geth-sharding
Feature/update go geth sharding
2022-05-31 13:23:55 -04:00
Abdul Rabbani f029bb323f Update dependencies 2022-05-31 13:23:08 -04:00
Abdul Rabbani 169229b86c Merge branch 'master' into feature/update-go-geth-sharding 2022-05-31 13:19:27 -04:00
Ashwin Phatak c8813448e9 Merge pull request #22 from deep-stack/pm-v4-schema-updates
Update to use v4 schema
2022-05-12 16:42:01 +05:30
prathamesh bce89d43da Update module path for v4 2022-05-11 19:09:31 +05:30
prathamesh 54f5f4cd9c Upgrade dependencies 2022-05-11 19:05:10 +05:30
prathamesh a42ad0441b Update tests to use v4 schema 2022-05-11 18:58:22 +05:30
8 changed files with 17 additions and 597 deletions
-29
View File
@@ -1,29 +0,0 @@
name: Notion Sync
on:
workflow_dispatch:
issues:
types:
[
opened,
edited,
labeled,
unlabeled,
assigned,
unassigned,
milestoned,
demilestoned,
reopened,
closed,
]
jobs:
notion_job:
runs-on: ubuntu-latest
name: Add GitHub Issues to Notion
steps:
- name: Add GitHub Issues to Notion
uses: vulcanize/notion-github-action@v1.2.4-issueid
with:
notion-token: ${{ secrets.NOTION_TOKEN }}
notion-db: ${{ secrets.NOTION_DATABASE }}
+1 -1
View File
@@ -24,7 +24,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
validator "github.com/vulcanize/eth-ipfs-state-validator/v3/pkg"
validator "github.com/vulcanize/eth-ipfs-state-validator/v4/pkg"
)
// validateTrieCmd represents the validateTrie command
+2 -2
View File
@@ -3,7 +3,7 @@ module github.com/vulcanize/eth-ipfs-state-validator/v4
go 1.18
require (
github.com/ethereum/go-ethereum v1.10.20
github.com/ethereum/go-ethereum v1.10.21
github.com/ipfs/go-blockservice v0.1.7
github.com/ipfs/go-cid v0.0.7
github.com/ipfs/go-ipfs v0.10.0
@@ -18,7 +18,7 @@ require (
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.4.0
github.com/spf13/viper v1.11.0
github.com/vulcanize/ipfs-ethdb/v4 v4.0.3-alpha
github.com/vulcanize/ipfs-ethdb/v4 v4.0.4-alpha
)
require (
+4 -556
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -18,7 +18,7 @@ package main
import (
"github.com/sirupsen/logrus"
"github.com/vulcanize/eth-ipfs-state-validator/v3/cmd"
"github.com/vulcanize/eth-ipfs-state-validator/v4/cmd"
)
func main() {
+2 -2
View File
@@ -29,14 +29,14 @@ import (
)
// PublishRaw derives a cid from raw bytes and provided codec and multihash type, and writes it to the db tx
func PublishRaw(tx *sqlx.Tx, codec, mh uint64, raw []byte) (string, error) {
func PublishRaw(tx *sqlx.Tx, codec, mh uint64, raw []byte, blockNumber uint64) (string, error) {
c, err := RawdataToCid(codec, raw, mh)
if err != nil {
return "", err
}
dbKey := dshelp.MultihashToDsKey(c.Hash())
prefixedKey := blockstore.BlockPrefix.String() + dbKey.String()
_, err = tx.Exec(`INSERT INTO public.blocks (key, data) VALUES ($1, $2) ON CONFLICT (key) DO NOTHING`, prefixedKey, raw)
_, err = tx.Exec(`INSERT INTO public.blocks (key, data, block_number) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING`, prefixedKey, raw, blockNumber)
return c.String(), err
}
+2 -2
View File
@@ -28,8 +28,8 @@ import (
"github.com/jmoiron/sqlx"
"github.com/mailgun/groupcache/v2"
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v3"
pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v3/postgres"
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4"
pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"
)
// Validator is used for validating Ethereum state and storage tries on PG-IPFS
+5 -4
View File
@@ -30,11 +30,12 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
validator "github.com/vulcanize/eth-ipfs-state-validator/v3/pkg"
pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v3/postgres"
validator "github.com/vulcanize/eth-ipfs-state-validator/v4/pkg"
pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"
)
var (
blockNumber = uint64(1)
contractAddr = common.HexToAddress("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476592")
slot0StorageValue = common.Hex2Bytes("94703c4b2bd70c169f5717101caee543299fc946c7")
slot1StorageValue = common.Hex2Bytes("01")
@@ -302,11 +303,11 @@ func loadTrie(stateNodes, storageNodes [][]byte) {
tx, err := db.Beginx()
Expect(err).ToNot(HaveOccurred())
for _, node := range stateNodes {
_, err := validator.PublishRaw(tx, cid.EthStateTrie, multihash.KECCAK_256, node)
_, err := validator.PublishRaw(tx, cid.EthStateTrie, multihash.KECCAK_256, node, blockNumber)
Expect(err).ToNot(HaveOccurred())
}
for _, node := range storageNodes {
_, err := validator.PublishRaw(tx, cid.EthStorageTrie, multihash.KECCAK_256, node)
_, err := validator.PublishRaw(tx, cid.EthStorageTrie, multihash.KECCAK_256, node, blockNumber)
Expect(err).ToNot(HaveOccurred())
}
err = tx.Commit()