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

Ipfs node info #116

Merged
merged 18 commits into from
Aug 19, 2022
Merged

Ipfs node info #116

merged 18 commits into from
Aug 19, 2022

Conversation

zycon91
Copy link
Contributor

@zycon91 zycon91 commented Aug 8, 2022

We changed the get_storage function fields so that it will return the maximum_storage of the IPFS node, instead of the total_files and we changed the fields in the IpfsNode struct to match our needs.

We created a new type UpdateDuration which equals the EraDuration and we are gonna use it for depositing the event. Added a new event, which will be the one that the node-listener will be listening to. The event is still wip.

Added a new function publish_ipfs_node_db_info which will get the info from the our storage, make some type convertions and then publish the results through the deposited event (wip).

Closes #115

zycon91 and others added 3 commits August 8, 2022 17:00
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
UpdateDuration is equal the EraDuration.

Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
Copy link
Contributor

@charmitro charmitro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error[E0277]: the trait bound `u32: From<u64>` is not satisfied
     --> /Users/charmitro/Cherry/Cherry-Node/bin/node/runtime/src/lib.rs:929:24
      |
  929 |     type UpdateDuration = UpdateDuration;
      |                           ^^^^^^^^^^^^^^ the trait `From<u64>` is not implemented for `u32`
      |
      = help: the following other types implement trait `From<T>`:
                <f32 as From<i16>>
                <f32 as From<i8>>
                <f32 as From<u16>>
                <f32 as From<u8>>
                <f64 as From<f32>>
                <f64 as From<i16>>
                <f64 as From<i32>>
                <f64 as From<i8>>
              and 87 others
  note: required because of the requirements on the impl of `hidden_include::traits::Get<u32>` for `UpdateDuration`
     --> /Users/charmitro/Cherry/Cherry-Node/bin/node/runtime/src/lib.rs:918:1
      |
  918 | / parameter_types! {
  919 | |     pub const UpdateDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64 * 6;
  920 | |     pub const MaxIpfsOwned: u32 = 5;
  921 | |     pub const DefaultAssetLifetime: BlockNumber = DEFAULT_ASSET_LIFETIME;
  922 | | }
      | |_^
  note: required by a bound in `pallet_ipfs::Config::UpdateDuration`
     --> /Users/charmitro/Cherry/Cherry-Node/bin/node/pallets/pallet-ipfs/src/lib.rs:168:24
      |
  168 |         type UpdateDuration: Get<Self::BlockNumber>;
      |                              ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_ipfs::Config::UpdateDuration`
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  For more information about this error, try `rustc --explain E0277`.
  error: could not compile `node-runtime` due to previous error

bin/node/pallets/pallet-ipfs/src/lib.rs Outdated Show resolved Hide resolved
bin/node/pallets/pallet-ipfs/src/lib.rs Outdated Show resolved Hide resolved
bin/node/pallets/pallet-ipfs/src/lib.rs Outdated Show resolved Hide resolved
bin/node/pallets/pallet-ipfs/src/functions.rs Outdated Show resolved Hide resolved
zycon91 and others added 2 commits August 8, 2022 19:21
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
@zycon91 zycon91 requested a review from charmitro August 8, 2022 16:32
@charmitro charmitro linked an issue Aug 9, 2022 that may be closed by this pull request
@zycon91 zycon91 marked this pull request as ready for review August 9, 2022 10:41
@charmitro charmitro merged commit c90cf42 into ipfs-dev Aug 19, 2022
@charmitro charmitro deleted the ipfs-node-info branch August 19, 2022 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPFS Node info every Staking Era
3 participants