Skip to content
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

Worker Proposal voting is broken. Can someone confirm? #746

Closed
jcalfee opened this issue Feb 20, 2016 · 14 comments
Closed

Worker Proposal voting is broken. Can someone confirm? #746

jcalfee opened this issue Feb 20, 2016 · 14 comments

Comments

@jcalfee
Copy link

jcalfee commented Feb 20, 2016

At OpenLedger I try to vote for a worker proposal. The UI tries to send this to the server under get_required_fees and gets an error (below):

[
  [
    [
      6,
      {
        "fee": {
          "amount": "0",
          "asset_id": "1.3.0"
        },
        "account": "1.2.34958",
        "owner": {
          "weight_threshold": 1,
          "account_auths": [

          ],
          "key_auths": [
            [
              "BTS6Lc3swzX43dZ5qGbNG1eyxKVgMmJHuQwWp6h57vXofUcDW2gdd",
              1
            ]
          ],
          "address_auths": [

          ]
        },
        "active": {
          "weight_threshold": 1,
          "account_auths": [

          ],
          "key_auths": [
            [
              "BTS8GimhseNzW8KhBqBr4WXySnSdE9YLN2Y9VUjdChLBHnQyTGdzb",
              1
            ]
          ],
          "address_auths": [

          ]
        },
        "new_options": {
          "memo_key": "BTS8GimhseNzW8KhBqBr4WXySnSdE9YLN2Y9VUjdChLBHnQyTGdzb",
          "voting_account": "1.2.5",
          "num_witness": 0,
          "num_committee": 0,
          "votes": [
            "2:117"
          ],
          "extensions": [

          ]
        },
        "extensions": [

        ]
      }
    ]
  ],
  "1.3.0"
]

Error reply:

{
  "code": 1,
  "message": "7 bad_cast_exception: Bad Cast\nInvalid cast from type 'array_type' to Object\n    {\"type\":\"array_type\"}\n    th_a  variant.cpp:575 get_object",
  "data": {
    "code": 7,
    "name": "bad_cast_exception",
    "message": "Bad Cast",
    "stack": [
      {
        "context": {
          "level": "error",
          "file": "variant.cpp",
          "line": 575,
          "method": "get_object",
          "hostname": "",
          "thread_name": "th_a",
          "timestamp": "2016-02-20T21:21:46"
        },
        "format": "Invalid cast from type '${type}' to Object",
        "data": {
          "type": "array_type"
        }
      }
    ]
  }
}

A transfer works fine...

@jcalfee
Copy link
Author

jcalfee commented Feb 20, 2016

The transfer below (it works) .. It must be something in the vote transaction format. I don't see any code changes that might cause this .. I'm drawing a blank on this one at the moment.

[
  [
    [
      0,
      {
        "fee": {
          "amount": "0",
          "asset_id": "1.3.0"
        },
        "from": "1.2.34958",
        "to": "1.2.34235",
        "amount": {
          "amount": "100000",
          "asset_id": "1.3.0"
        },
        "extensions": [

        ]
      }
    ]
  ],
  "1.3.0"
]

@roadscape
Copy link

I think it's the same problem as these 2. Not clear if the issue is in GUI or cli_wallet..
#745
cryptonomex/graphene#593

@abitmore
Copy link
Contributor

I'd suggest revert the backend of OL to last version, until the hard fork date AND GUI is fixed.

@abitmore
Copy link
Contributor

I can make a patch on the witness_node to address this issue. But if you transaction got passed, imo it may cause network forking, since upgraded (block producing witnesses) will accept your transaction but non-upgraded witnesses will reject it.

@abitmore
Copy link
Contributor

Update: it's not dangerous to enable the new format before hard fork date if keep the extensions field empty , according to @pmconrad's comment in this thread. So GUi can be updated safely.

@abitmore
Copy link
Contributor

@jcalfee type of the extensions field of account_create_operation and account_update_operation has changed from an array to a struct in witness_node-2.0.160216, so need to replace [] to {} in the GUI code.

@jcalfee
Copy link
Author

jcalfee commented Feb 21, 2016

I'll rebuild the develop branch so I can get any serializer updates (there is a generated file) and close this ticket if it works. Thanks! Odd that extensions is not consistent now (the transfer has an extension [] in it too).

@jcalfee
Copy link
Author

jcalfee commented Feb 21, 2016

The serialized code is the same. Looks like the extensions have not changed since July (see link).

https://github.com/cryptonomex/graphene/blame/f85dec1c23f6bf9259ad9f15311b2e4aac4f9d44/libraries/chain/include/graphene/chain/protocol/account.hpp#L114

@valzav
Copy link

valzav commented Feb 21, 2016

@jcalfee
Copy link
Author

jcalfee commented Feb 21, 2016

There, this change is not on the develop branch! That explains it.. I need some branch training from @theoreticalbts ...

@abitmore
Copy link
Contributor

And also master branch of cryptonomex/graphene repo is abandoned imo.

@theoreticalbts
Copy link
Contributor

This is broken because account update operation is affected by cryptonomex/graphene#593

@svk31
Copy link
Contributor

svk31 commented Feb 24, 2016

Fixed in graphene core, closing.

@svk31 svk31 closed this as completed Feb 24, 2016
xeroc pushed a commit to BitSharesEurope/testnet.bitshares.eu that referenced this issue Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants