Git Product home page Git Product logo

mesh-geth-sdk's People

Contributors

ash-krishnan avatar dependabot[bot] avatar geekarthur avatar jiangchuan-he-cb avatar jingweicb avatar mdehoog avatar qiwu7 avatar racbc avatar shrimalmadhur avatar songge-cb avatar xiangliu-cb avatar xiaying-peng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mesh-geth-sdk's Issues

Unreviewed commit on main!

Unreviewed commit(s) COMPARE was merged to main by shrimalmadhur.

Comment with appropriate number of ๐Ÿ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

rosetta-cli check:data failed with "cannot remove oldest index: unable to remove block from storage"

Describe the bug
I am trying to run rosetta-cli check:data to an example app connected to a Ethereum node. CLI is able to bootstrap the balance but immediately failed with some storage error.

To Reproduce

  1. Run the example app
    env GETH={GETH_URL} SKIP_GETH_ADMIN=true FILTER=false make run-rosetta
    
  2. Run check:data
    rosetta-cli check:data --configuration-file ./examples/ethereum/rosetta-cli-conf/mainnet/config.json
    
  3. Error occurs
    Command Failed: unable to process blocks: unable to process block: unable to delete block: cannot remove oldest index: unable to remove block from storage 0x9e48f97a1de79e30ebcf688a24e5e0081dda509062340e7ac95065f5ae2d451f:1: unable to sync to 4752062
    

Expected behavior
I expect the check:data should pass

Additional context

2022/09/22 22:01:31 8891 Balances Bootstrapped
2022/09/22 22:01:31 check:data status server running on port 9090
2022/09/22 22:01:31 Syncing 0-4752062
oldestIndex 1
2022/09/22 22:01:31 check:data status server shutting down
[MEMORY] Heap: 4791.668770MB Stack: 1.937500MB System: 4986.894707MB GCs: 3


Error: unable to process blocks: unable to process block: unable to delete block: cannot remove oldest index: unable to remove block from storage 0x9e48f97a1de79e30ebcf688a24e5e0081dda509062340e7ac95065f5ae2d451f:1: unable to sync to 4752062
github.com/coinbase/rosetta-cli/pkg/results.ExitData
        /Users/calvinlau/playground/rosetta-cli/pkg/results/data_results.go:713
github.com/coinbase/rosetta-cli/pkg/tester.(*DataTester).HandleErr
        /Users/calvinlau/playground/rosetta-cli/pkg/tester/data.go:962
github.com/coinbase/rosetta-cli/cmd.runCheckDataCmd
        /Users/calvinlau/playground/rosetta-cli/cmd/check_data.go:193
github.com/spf13/cobra.(*Command).execute
        /Users/calvinlau/go/pkg/mod/github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        /Users/calvinlau/go/pkg/mod/github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
        /Users/calvinlau/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/coinbase/rosetta-cli/cmd.Execute
        /Users/calvinlau/playground/rosetta-cli/cmd/root.go:184
main.main
        /Users/calvinlau/playground/rosetta-cli/main.go:26
runtime.main
        /usr/local/go/src/runtime/proc.go:250
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1571

+--------------------+--------------------------------+------------+
|  CHECK:DATA TESTS  |          DESCRIPTION           |   STATUS   |
+--------------------+--------------------------------+------------+
| Request/Response   | Rosetta implementation         | PASSED     |
|                    | serviced all requests          |            |
+--------------------+--------------------------------+------------+
| Response Assertion | All responses are correctly    | PASSED     |
|                    | formatted                      |            |
+--------------------+--------------------------------+------------+
| Block Syncing      | Blocks are connected into a    | FAILED     |
|                    | single canonical chain         |            |
+--------------------+--------------------------------+------------+
| Balance Tracking   | Account balances did not go    | PASSED     |
|                    | negative                       |            |
+--------------------+--------------------------------+------------+
| Reconciliation     | No balance discrepancies were  | NOT TESTED |
|                    | found between computed and     |            |
|                    | live balances                  |            |
+--------------------+--------------------------------+------------+

+--------------------------+--------------------------------+-----------+
|     CHECK:DATA STATS     |          DESCRIPTION           |   VALUE   |
+--------------------------+--------------------------------+-----------+
| Blocks                   | # of blocks synced             |         1 |
+--------------------------+--------------------------------+-----------+
| Orphans                  | # of blocks orphaned           |         0 |
+--------------------------+--------------------------------+-----------+
| Transactions             | # of transaction processed     |         1 |
+--------------------------+--------------------------------+-----------+
| Operations               | # of operations processed      |         1 |
+--------------------------+--------------------------------+-----------+
| Accounts                 | # of accounts seen             |      8892 |
+--------------------------+--------------------------------+-----------+
| Active Reconciliations   | # of reconciliations performed |         0 |
|                          | after seeing an account in a   |           |
|                          | block                          |           |
+--------------------------+--------------------------------+-----------+
| Inactive Reconciliations | # of reconciliations performed |         0 |
|                          | on randomly selected accounts  |           |
+--------------------------+--------------------------------+-----------+
| Exempt Reconciliations   | # of reconciliation failures   |         0 |
|                          | considered exempt              |           |
+--------------------------+--------------------------------+-----------+
| Failed Reconciliations   | # of reconciliation failures   |         0 |
+--------------------------+--------------------------------+-----------+
| Skipped Reconciliations  | # of reconciliations skipped   |         0 |
+--------------------------+--------------------------------+-----------+
| Reconciliation Coverage  | % of accounts that have been   | 0.000000% |
|                          | reconciled                     |           |
+--------------------------+--------------------------------+-----------+

badger 2022/09/22 22:01:32 INFO: Storing value log head: {Fid:0 Len:30 Offset:7583114}
badger 2022/09/22 22:01:32 INFO: [Compactor: 173] Running compaction: {level:0 score:1.73 dropPrefixes:[]} for level: 0
badger 2022/09/22 22:01:32 INFO: LOG Compact 0->1, del 1 tables, add 1 tables, took 67.976567ms
badger 2022/09/22 22:01:32 INFO: [Compactor: 173] Compaction for level: 0 DONE
badger 2022/09/22 22:01:32 INFO: Force compaction on level 0 done
Error: unable to process blocks: unable to process block: unable to delete block: cannot remove oldest index: unable to remove block from storage 0x9e48f97a1de79e30ebcf688a24e5e0081dda509062340e7ac95065f5ae2d451f:1: unable to sync to 4752062
Usage:
  rosetta-cli check:data [flags]

Flags:
      --asserter-configuration-file string   Check that /network/options matches contents of file at this path
      --data-dir string                      Data-dir configures the location of logs and data for validation. This will override the data_directory from configuration file
      --end-block int                        End-block configures the syncer to stop once reaching a particular block height. This will override the index from configuration file (default -1)
  -h, --help                                 help for check:data
      --in-memory-mode                       In-memory-mode configures badger DB inMeomry option. Only when in-memory-mode=true, this will override the all_in_memory_enabled
      --online-url string                    Override online node url in configuration file
      --result-file string                   Result-file configures the location of validation result. This will override the results_output_file from configuration file
      --start-block int                      Start-block is the block height to start syncing from. This will override the start_index from configuration file (default -1)
      --table-size int                       Table-size configures the TableSize for badger DB. If table-size != -1, this will override the table_size from configuration file (default -1)

Global Flags:
      --block-profile string        Save the pprof block profile in the specified file
      --configuration-file string   Configuration file that provides connection and test settings.
                                    If you would like to generate a starter configuration file (populated
                                    with the defaults), run rosetta-cli configuration:create.
                                    
                                    Any fields not populated in the configuration file will be populated with
                                    default values.
      --cpu-profile string          Save the pprof cpu profile in the specified file
      --mem-profile string          Save the pprof mem profile in the specified file

Command Failed: unable to process blocks: unable to process block: unable to delete block: cannot remove oldest index: unable to remove block from storage 0x9e48f97a1de79e30ebcf688a24e5e0081dda509062340e7ac95065f5ae2d451f:1: unable to sync to 4752062

ERC20 Voting Delegation

Is your feature request related to a problem? Please describe.
Support ERC20Votes delegation as a built-in operation type.

Describe the solution you'd like
The interface can be similar to ERC20_TRANSFER operations. When a user queries the /construction/preprocess endpoint for token delegation, they'll need to provide operations with the following schema:

 "operations": [
    {
      "operation_identifier": {
        "index": 0
      },
      "type": "ERC20VOTES_DELEGATE",
      "account": { "address": "<sender>"},
      "amount": {
        "value": "0",
        "currency": {
          "symbol": "TOKEN",
          "decimals": 18,
          "metadata": {
            "contractAddress": "0x..."
          }
        }
      }
    },
    {
      "operation_identifier": {
        "index": 1
      },
      "type": "ERC20VOTES_DELEGATE",
      "account": { "address": "<delegatee>"},
      "amount": {
        "value": "0",
        "currency": {
          "symbol": "TOKEN",
          "decimals": 18,
          "metadata": {
            "contractAddress": "0x..."
          }
        }
      }
    }
  ]
  1. A new operation type, ERC20VOTERS_DELEGATE, is introduced to describe the intent of an ERC20Votes delegate call.
  2. There must be exactly two operations for an ERC20Votes delegate call; the first representing an account that's delegating votes, and the second represents the account that's being delegated votes to.
  3. The type of each operation must be set to ERC20VOTES_DELEGATE.
  4. The value of each operation must be set to zero.
  5. The currency must contain a valid contractAddress in its metadata.
    The contractAddress should point to an ERC20Votes compatible token.

Once the metadata is created, it can be forwarded through the usual flow to construct, sign and submit the tx.

Describe alternatives you've considered

Additional context
The outlined schema is based off of the design used in optimism-rosetta.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.