[UPDATE] Middleware status

I see now:

    {
      "block_hash": "mh_2iKjfjJXyPT5Wwars2BbrzNGDsgsvoDUb2KKBaxfLnjvLoQemZ",
      "block_height": 162223,
      "hash": "th_259B1j2hHmg9BbcKyMbTKCB1KXqiddrHTYKBiUwJk8J5hRTSzq",
      "micro_index": 34,
      "micro_time": 1572638969545,
      "signatures": [
        "sg_JzRjEZFkUqLt3YuELMKA6BnxM9DgVCoEhnjWTLJeQkQ5XfKzTH6KKFaEL2yAHpqijZwn5jK5qZmfyeJZ6t5GMH2Kp66As"
      ],
      "tx": {
        "account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
        "client_ttl": 0,
        "fee": 17700000000000,
        "name": "kryptokrauts.chain",
        "name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
        "name_ttl": 0,      # <----- hehe :D
        "nonce": 105,
        "pointers": [
          {
            "id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
            "key": "account_pubkey"
          }
        ],
        "type": "NameUpdateTx",
        "version": 1
      },
      "tx_index": 4749564
    },

Very nice edge case, will fix that.

Thanks for spotting this!

2 Likes

@karol.chain
is the middleware currently able to detect transactions for accounts there were sent to it using the name_id? (https://github.com/aeternity/ae_mdw/issues/24#issuecomment-639497603)

IMO this is an important feature

Yes, we do name resolution in spend txs.

2 Likes

[WEEK 38]

Arthur - Docker configuration merged, Vue-Phoenix integration almost completed
Daniela - finalized performance tests extension with name and block endpoints, working on describing the models for the responses in the swagger spec
Karol - oracles paginable endpoints, name related fixes (“expand” parameter, name in txs queries, update with ttl 0 fix), name owner index tables

No blockers.

Next week - merging Vue-Phoenix integration, replies in swagger spec, name owner support in queries

6 Likes

[WEEK 39]

Arthur - hosting Nuxt frontend framework from Phoenix working (beta status)
Daniela - described models for the responses in the swagger spec, start of work on adding swagger specs for oracles and name owner
Karol - finished oracle and name owner endpoints (with documentation)

No blockers.

Next week - deployment of latest functionality and updated DB to mainnet host, specification of final work packages for approval

2 Likes

@marc0olo mainnet mdw is now deployed and synced with the following changes:

  • name update tx with ttl = 0 behaves as name revoke:
$ curl -s "http://18.156.189.185/mdw/name/kryptokrauts.chain" | jq '.'                
{
  "active": true,
  "info": {
    "active_from": 164809,
    "auction_timeout": null,
    "claims": [
      4910093
    ],
    "expire_height": 337727,
    "ownership": {
      "current": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
      "original": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV"
    },
    "pointers": {
      "account_pubkey": "ak_2QGAAqDXK7g8zCbck7zm25TGAW1hRuVCET2SRCCFCMSMjrVCrF"
    },
    "revoke": null,
    "transfers": [],
    "updates": [
      13654101,
      9992918,
      6685739,
      4968822,
      4968737
    ]
  },
  "name": "kryptokrauts.chain",
  "previous": [
    {
      "active_from": 162210,
      "auction_timeout": null,
      "claims": [
        4713104,
        4712510,
        4677602
      ],
      "expire_height": 162223,
      "ownership": {
        "current": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
        "original": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV"
      },
      "pointers": {
        "account_pubkey": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV"
      },
      "revoke": null,
      "transfers": [],
      "updates": [
        4749564
      ]
    }
  ],
  "status": "name"
}
  • new name/auction endpoint returning json only if the given name IS in auction:
$ curl -s "http://18.156.189.185/mdw/name/auction/jelly.chain" | jq '.'
{
  "active": false,
  "info": {
    "auction_end": 319733,
    "bids": [
      14975730
    ],
    "last_bid": {
      "block_hash": "mh_2k7TrZhwiE71WsSkbiDrFazgKUVLb5d6f1gyndUxtzWVBWXvFB",
      "block_height": 304853,
      "hash": "th_2bcQDLexNBQ3h5YyiBToZVxeWbmiYDg3K7YqPbxaTjae3ScaaU",
      "micro_index": 0,
      "micro_time": 1598447301589,
      "signatures": [
        "sg_RALGbms25MsA7tA8My4JmvKgPpmZ8DrFsCWpNfA15x92sjpjbas8vk9UzyPRvX7wJEz1bAsQAP85sf8rTzkRQMrA5rkpo"
      ],
      "tx": {
        "account_id": "ak_21w2MCs85HavP8tJGnaBYMr8BEmaxhcCvcdWkDxetT8tSrNqDW",
        "fee": 18040000000000,
        "name": "jelly.chain",
        "name_fee": 83204000000000000000,
        "name_id": "nm_23YieeqPnnGbykoLMmpXr4MWwigcLwanhPHZkXQC43wVQxRFMY",
        "name_salt": 7300891473095733,
        "nonce": 4,
        "type": "NameClaimTx",
        "version": 2
      },
      "tx_index": 14975730
    }
  },
  "name": "jelly.chain",
  "previous": [],
  "status": "auction"
}
  • new name/owned_by endpoint showing active names and auctions where the owner has a highest (winning) bid:
$ curl -s "http://18.156.189.185/mdw/names/owned_by/ak_2AVeRypSdS4ZosdKWW1C4avWU4eeC2Yq7oP7guBGy8jkxdYVUy" | jq '.'
{
  "active": [
    {
      "active": true,
      "info": {
        "active_from": 316672,
        "auction_timeout": null,
        "claims": [
          14747888
        ],
        "expire_height": 366672,
        "ownership": {
          "current": "ak_2AVeRypSdS4ZosdKWW1C4avWU4eeC2Yq7oP7guBGy8jkxdYVUy",
          "original": "ak_2AVeRypSdS4ZosdKWW1C4avWU4eeC2Yq7oP7guBGy8jkxdYVUy"
        },
        "pointers": {},
        "revoke": null,
        "transfers": [],
        "updates": []
      },
      "name": "nikita.chain",
      "previous": [],
      "status": "name"
    }
  ],
  "top_bid": []
}

or:

$ curl -s "http://18.156.189.185/mdw/names/owned_by/ak_e1PYvFVDZAXMiNC7ikkhaQsKpXzYi6XeiWwY6apAT2j4Ujjoo" | jq '.'   
{
  "active": [],
  "top_bid": [
    {
      "active": false,
      "info": {
        "auction_end": 337253,
        "bids": [
          15174307,
          13581110,
          12162548,
          10084274,
          10059350,
          7808796,
          7455148,
          5564748
        ],
        "last_bid": {
          "block_hash": "mh_wQhWk5WnmTmaDJbwzQ7TPdtsCQDtEAUzE3mcUqr3x9cNeaSUB",
          "block_height": 307493,
          "hash": "th_qdmJtFngwe2dkeG2iiY5sdDpqCu8qVJQus7PHMNgovjq7vN5L",
          "micro_index": 157,
          "micro_time": 1598932176611,
          "signatures": [
            "sg_7kvm8k2zrR7wp6Cc5A1yYNBu8Q7moMyB1CspLFch2qrmdey2mKEQ4nEKsuQEMBeNgPHkQVhYJaSu885anWcahJEUmhQt3"
          ],
          "tx": {
            "account_id": "ak_e1PYvFVDZAXMiNC7ikkhaQsKpXzYi6XeiWwY6apAT2j4Ujjoo",
            "fee": 16320000000000,
            "name": "5.chain",
            "name_fee": 8.4e+20,
            "name_id": "nm_2G8VVfnRqJjxcpNu8vbHJyaYhCoR9Gys42AvaEK3hMN8tfXCr6",
            "name_salt": 0,
            "nonce": 10,
            "type": "NameClaimTx",
            "version": 2
          },
          "tx_index": 15174307
        }
      },
      "name": "5.chain",
      "previous": [],
      "status": "auction"
    },
    {
      "active": false,
      "info": {
        "auction_end": 337253,
        "bids": [
          15174275,
          13416041,
          11219610,
          10083322,
          10067238,
          10064043,
          10062110,
          10061339,
          7878195,
          5931271,
          4704829
        ],
        "last_bid": {
          "block_hash": "mh_29NaEKGXZyfXidH1wSoFWJg7xMQ3LmH2JJYDujNFxruLzfjQCS",
          "block_height": 307493,
          "hash": "th_VWxLUSTMky9QWrCsRJ9bTV7d82rvCt2pxQk6MdToimAzHSMTM",
          "micro_index": 134,
          "micro_time": 1598932100093,
          "signatures": [
            "sg_HeGUYmL5VRbtYgRsbtkwezN8WQnAQzUPp9soMKAkBhYbNqSZeUjiZAANvDDRZy1LCE1BTeacc5jUuVQJ2cTWahnvGP38j"
          ],
          "tx": {
            "account_id": "ak_e1PYvFVDZAXMiNC7ikkhaQsKpXzYi6XeiWwY6apAT2j4Ujjoo",
            "fee": 16320000000000,
            "name": "8.chain",
            "name_fee": 9.56e+20,
            "name_id": "nm_JPCrtetZKczPFc1nd7eZgZwXM5EcWxs99o4tUA2YdaVevv4rh",
            "name_salt": 0,
            "nonce": 9,
            "type": "NameClaimTx",
            "version": 2
          },
          "tx_index": 15174275
        }
      },
      "name": "8.chain",
      "previous": [],
      "status": "auction"
    },
    {
      "active": false,
      "info": {
        "auction_end": 337254,
        "bids": [
          15174500,
          13420324,
          12162516,
          10084545,
          10062546,
          7880893,
          7878252,
          5961322,
          5931405,
          5583812,
          4801808
        ],
        "last_bid": {
          "block_hash": "mh_AMe7YRgxoc6cCy1iDx2QZxeGb9kkFG9Ukfj8dF7srttr8RfGQ",
          "block_height": 307494,
          "hash": "th_27bjCRSBgXkzWcYqjwJ6CHweyXVft3KeM7e1Suv6sm3LiPsdRx",
          "micro_index": 19,
          "micro_time": 1598932662983,
          "signatures": [
            "sg_W2HJKB5ygvL2X6tcdKx8uP3kd2rFJZhTbDPCt4REG1isqopwXdsRLxxiizB7P8WHbY8tkwRkDR2CjnxQNTdMuyvBw6RqN"
          ],
          "tx": {
            "account_id": "ak_e1PYvFVDZAXMiNC7ikkhaQsKpXzYi6XeiWwY6apAT2j4Ujjoo",
            "fee": 16320000000000,
            "name": "b.chain",
            "name_fee": 1.1e+21,
            "name_id": "nm_26sSGSJdjgNW72dGyctY3PPeFuYtAXd8ySEJTpPK5r5fv2i3sW",
            "name_salt": 0,
            "nonce": 11,
            "type": "NameClaimTx",
            "version": 2
          },
          "tx_index": 15174500
        }
      },
      "name": "b.chain",
      "previous": [],
      "status": "auction"
    }
  ]
}
  • “expand” parameter for name and oracle endpoints replacing the transaction indices with the full detail (note the “claims” field):
$ curl -s "http://18.156.189.185/mdw/name/nikita?expand" | jq '.'
{
  "active": true,
  "info": {
    "active_from": 316672,
    "auction_timeout": null,
    "claims": [
      {
        "block_hash": "mh_gGVCDKzwBP85BGTiionuZrpibThyPUdqn8VWWVzvAVYN2YuGS",
        "block_height": 301792,
        "hash": "th_eWrp3M6REtTmVjGJqEvqXM5ejQ73irAptTtcaqTWNsBYJoxZ5",
        "micro_index": 0,
        "micro_time": 1597894719687,
        "signatures": [
          "sg_E3dyEYE9mrBXbFRN3PjCakpAN1VZbZAuYq8JKVq6ki8vvwsCaDMd947QHBx5pkcwFX1Y1AqiwhcYx5AUpQD1xYoXYHi63"
        ],
        "tx": {
          "account_id": "ak_2AVeRypSdS4ZosdKWW1C4avWU4eeC2Yq7oP7guBGy8jkxdYVUy",
          "fee": 16560000000000,
          "name": "nikita.chain",
          "name_fee": 51422900000000000000,
          "name_id": "nm_2s2gjxQFYzcShL9gva2jWvzZ7mHPe4m6X6pqbyuSipZKCg1DLV",
          "name_salt": 7461157538025441,
          "nonce": 43,
          "type": "NameClaimTx",
          "version": 2
        },
        "tx_index": 14747888
      }
    ],
    "expire_height": 366672,
    "ownership": {
      "current": "ak_2AVeRypSdS4ZosdKWW1C4avWU4eeC2Yq7oP7guBGy8jkxdYVUy",
      "original": "ak_2AVeRypSdS4ZosdKWW1C4avWU4eeC2Yq7oP7guBGy8jkxdYVUy"
    },
    "pointers": {},
    "revoke": null,
    "transfers": [],
    "updates": []
  },
  "name": "nikita.chain",
  "previous": [],
  "status": "name"
}
  • Oracle paginable endpoints are implemented as well

Besides that, non-release specific news would be that we now have a way how to quickly swap DB, so there’s no need to slowly sync public hosts, even if there are DB schema changes.
This process is manual at the moment and will need to be formalized.

1 Like

[WEEK 40]

Arthur - removed Node dependency (beta status), work on CI configuration
Daniela - finished of work on adding swagger specs for oracles and name owner, start work on tests for them
Karol - deployment of latest oracles/name owner, fixing bugs, start of technical architecture doc

No blockers on technical side but we need approval for final work to wrap up development.

Next week - depends on approval

2 Likes

[WEEK 41]

Note - everybody in the team didn’t work the whole week.

@danielaivanova.chain left the team to explore other opportunities - thank you for your work Daniela, your work is very appreciated!

Arthur - frontend integration (this PR is really huge - over 200 changed files)
Daniela - added tests for oracle and name owner endpoints
Karol - technical architecture doc, added CORS headers, expand parameter fix, testing

Next week - depends on approval

2 Likes

[WEEK 42]

Arthur - didn’t work this week
Karol - worked just half of the week - on technical architecture doc and tracking non-deterministic tests

Next week: besides working on the tech arch doc and testing, there’s not much else.

New work needs your approval, @yani.chain

2 Likes

Hi!
What are the plans for introducing some missing features to the frontend:

  • Calldata decoding in contract_create_tx
  • Disassembly of contract bytecode in contract_create_tx
  • Submiting contract source codes and validating them
  • Better decoding of contract logs
1 Like

Hi @gorbak25,

  • decoding call data and call result is already in place - note function, arguments, and result:
$ curl -s "http://localhost:4000/txs/backward?type=contract_call&limit=1" | jq '.'
{
  "data": [
    {
      "block_hash": "mh_2SjCeYciSsXQhcietaPaaVjwhcPK4u5LCb7bKEzwcUjegLCsfS",
      "block_height": 322651,
      "hash": "th_L9gGu1Ez4MtEjTKS6Q9tpsKv63M7UEJCf5X1AGXjiZ2Qnt6X4",
      "micro_index": 195,
      "micro_time": 1601676794972,
      "signatures": [
        "sg_Nog48v1vm4AJuPhmtZYdiEFRidE3iZ5KgqXjyVw1d6CVUZTFywqM4GNQN6gAx4dwGbvnHBfJGfAWNoG9khr3uWVRM5R1V"
      ],
      "tx": {
        "abi_version": 3,
        "amount": 0,
        "arguments": [
          {
            "type": "map",
            "value": [
              {
                "key": {
                  "type": "string",
                  "value": "499a6411-56f5-4f44-9195-ee8dd7707736"
                },
                "val": {
                  "type": "string",
                  "value": "K_wFVyWUKdLf5hBxmf_3eEFbra4="
                }
              },
              {
                "key": {
                  "type": "string",
                  "value": "fb780629-19f8-4358-9164-7a83375eed98"
                },
                "val": {
                  "type": "string",
                  "value": "ccBupfnVvl4Aa3NDwXsXmVbc74s="
                }
              }
            ]
          }
        ],
        "call_data": "cb_KxGu6GgJGy8CkTQ5OWE2NDExLTU2ZjUtNGY0NC05MTk1LWVlOGRkNzcwNzczNnFLX3dGVnlXVUtkTGY1aEJ4bWZfM2VFRmJyYTQ9kWZiNzgwNjI5LTE5ZjgtNDM1OC05MTY0LTdhODMzNzVlZWQ5OHFjY0J1cGZuVnZsNEFhM05Ed1hzWG1WYmM3NHM9pzGwAw==",
        "caller_id": "ak_HzcS4HvhTtiD3KaVXW9umgqCW6dyg3KWgmyxHfir8x9Rads4a",
        "contract_id": "ct_2rtXsV55jftV36BMeR5gtakN2VjcPtZa3PBURvzShSYWEht3Z7",
        "fee": 454760000000000,
        "function": "set_map",
        "gas": 1579000,
        "gas_price": 1000000000,
        "gas_used": 1613,
        "log": [],
        "nonce": 33135,
        "result": {
          "type": "bool",
          "value": true
        },
        "return_type": "ok",
        "type": "ContractCallTx",
        "version": 1
      },
      "tx_index": 16294940
    }
  ],
  "next": "txs/gen/322655-0?limit=1&page=2&type=contract_call"
}
  • disassembly, validation would require Sophia dependency, and probably some wrapper over that… - we didn’t plan to include this, but have no problem to add it if it’s beneficial.
    But ultimately it depends on approval of the proposal.

  • better decoding of contract logs - that’s in current proposal for implementation, but it’s not approved yet

1 Like


@karol.chain Yes, i know it’s there but only for contract calls - contract creation isn’t properly decoded :frowning:

1 Like

Yeah, that one isn’t. To have it everywhere, it would need to go via proposal and inclusion of sophia dependency and probably changing it slightly to export more functionality.

1 Like

[WEEK 43]

Arthur - work 3 days only, stabilizing tests and improving mdw docker startup
Karol - finalizing technical architecture doc and started work on contract logs

Next week: indexing & querying contract logs and updating frontend to query new middleware

3 Likes

[WEEK 44]

We worked roughly half a week.

Arthur - docker support for frontend and further improvements and doc
Karol - integrate Sophia compiler to MDW build system, decompiling contract event datatype

Next week: ideally more progress in builing index over conract logs

2 Likes