thenewboston-blockchain / thenewboston-python

Python library for thenewboston digital currency.
https://thenewboston.com
MIT License
104 stars 35 forks source link

Add "fee" to blocks #54

Closed buckyroberts closed 3 years ago

buckyroberts commented 3 years ago

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

Fee

{
  "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"
}