automata-network / automata

Automata Network is a modular attestation layer that extends machine trust to Ethereum with TEE Coprocessors.
https://ata.network
Apache License 2.0
94 stars 19 forks source link

Rpc for geode #10

Closed Ljiacheng closed 3 years ago

Ljiacheng commented 3 years ago
  1. Add two jsonrpc for geode. Both functions have no params.

    1. attestor_list() -> Vec<(Vec<u8>, Vec<u8>)> Return the registered attestors' “url” and “pubkey” by vector

    2. registered_geodes() -> Vec<Geodes> Return the registered(not attested) geodes' record by vector

  2. Set time limit to u64::max_value() in case that geode which registered but can't get enough attestors at limited blocks will be deleted. This is because we need a long time runing geode which is registered but not attested currently.

melynx commented 3 years ago

Looks good. Not part of the commit but can you do a quick fix on the check failures?

Ljiacheng commented 3 years ago

Well, I find that check failures(by clippy) can't be found all together at one time. When I fix them, there will be more at another commit.

These warnings and errors are caused by redundant syntax and some unimplemented logics. And the clippy check rule is strict. You can check the annotations at actions.

Maybe we should fix those warings together and create a new PR next time? @Gnnng @melynx @Kayryu

melynx commented 3 years ago

Merged the PR into master. Let's address the CI errors in another PR.