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

Add "fee" to blocks #54

Closed
buckyroberts opened this issue Feb 8, 2021 · 0 comments
Closed

Add "fee" to blocks #54

buckyroberts opened this issue Feb 8, 2021 · 0 comments
Assignees

Comments

@buckyroberts
Copy link
Collaborator

Update block structure to include a "fee" field. Related validation/logic updates need to be updated on Bank and Validator repos as well.

Fee

  • required unless senders account_number matches nodes account_number - meaning they are the owners of that node (in that case the Tx would be excluded entirely, don't need to pay yourself fees)
  • allowed values are BANK or PRIMARY_VALIDATOR
  • duplicates not allowed (for example 2 BANK fees)
{
  "account_number": "0cdd4ba04456ca169baca3d66eace869520c62fe84421329086e03d91a68acdb",
  "message": {
    "balance_key": "ce51f0d9facaa7d3e69657429dd3f961ce70077a8efb53dcda508c7c0a19d2e3",
    "txs": [
      {
        "amount": 12,
        "recipient": "484b3176c63d5f37d808404af1a12c4b9649cd6f6769f35bdf5a816133623fbc"
      },
      {
        "amount": 1,
        "fee": "BANK",
        "recipient": "5e12967707909e62b2bb2036c209085a784fabbc3deccefee70052b6181c8ed8"
      },
      {
        "amount": 2,
        "fee": "PRIMARY_VALIDATOR",
        "recipient": "ad1f8845c6a1abb6011a2a434a079a087c460657aad54329a84b406dce8bf314"
      }
    ]
  },
  "signature": "ee5a2f2a2f5261c1b633e08dd61182fd0db5604c853ebd8498f6f28ce8e2ccbbc38093918610ea88a7ad47c7f3192ed955d9d1529e7e390013e43f25a5915c0f"
}
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

2 participants