2 nodes on devnet, same machine

Hey folks!

Just a quick question, is it possible to run 2 nodes that are in sync with the network so as one node works as storage provider and the other as the storage client?

The idea is that I want to test filecoin in real environment but create zero fee contracts for easier testing. I know about the guide in the docs but it doesn’t specify whether it works on the devnet.

Thank you guys for your time, amazing project. Let’s make this happen!

is it possible to run 2 nodes that are in sync with the network so as one node works as storage provider and the other as the storage client?

absolutely

I want to test filecoin in real environment but create zero fee contracts for easier testing.

If you are referring to storage contracts, you can setup a miner that charges 0 filecoin in storage fees. If you run into trouble doing this you can follow up here.

Hey,

I managed to get 2 nodes working on different Vms for easiness. I have a few questions though, after researching both docs, wiki and various github issues here and there.

  1. I haven’t quite grasped the different between storage blocks and storage sectors, I know it’s elementary.
  2. It’s very vague as a storage miner how to pledge X storage for Y time. From what I gather, in essence you pledge enough blocks of size (?) that are burned every 30 seconds, thus 2880 for one day. But what is the difference of pledging X storage for Y time or Y storage for X time.
  3. Since I am using filecoin as part of my thesis, I have been using university resources to host my filecoin nodes. For some reason though, the network map shows my instances in the US while the server is physically located in Greece. It would be cool to know how to fix that in order to have the first filecoin nodes in the region!

Thank you so much for your time, I can’t be more happy for being part of this amazing project. Really love you research vertical and slow pace of progress guys, it’s very thorough.

Cheers :slight_smile:

Could you elaborate what you mean by “storage blocks”? Do you mean blockchain blocks? Or do you mean the the “blocks” of data transferred between clients and miners over bitswap? Sectors are the units of data stored and proved over by storage miners.

Forget about pledging for now. Think about committing. Miners commit storage of size X ( one sector) by hitting the blockchain with a commitSector message. Miners can then decide to keep storing this data for as long as they want. As long as they periodically submit a proof that shows they had this storage over time they are rewarded in network “power”. This power is analogous to stake in PoS systems or hash power in PoW systems.

Using this mental model committing X storage for Y time ends up being clearly different from committing Y storage for X time. In the first case you have (X / Total storage) percentage of block rewards for Y time and the later (Y /Total) for X time.

Likely this is all a bit confusing because the wiki is heavily focused on making storage deals between clients and miners. This is a way for miners to earn FIL by storing useful user defined storage within their sectors. The project’s goal is to incentivize useful storage like this so we’ve built the client defined storage market right into the base blockchain. However storage deals with clients are conceptually decoupled from the verifiable-storage-power idea. It is best to think about sectors, proofs and verifiable storage first, and then think about what is put inside of that storage and the deal making process surrounding that as another conceptual layer on top.

Is this stats.kittyhawk.wtf? If so @mslipper would be the person to ping. @travis might also be a good resource.

Hey @zenground0,

Thank you for your swift response.

  1. Block as of data transferred, in essence I am not sure what I pledge when I set the price for the miner.

  2. I understand ( I think) the logic in high level as I have read the white paper. What I don’t grasp is how in practice one uses the library to commit storage.

From your message, I understand that:

  1. set-sector --> amount of storage you commit to the network, is it partioned into many sectors or one big chunk? (it should be different due to locking mechanism)

2)storage blocks–> uncertain, from the library I gather that I need to commit 2880 blocks so data can be saved for 1 day, not sure what kind of unit blocks are (storage-time?)

All in all, wiki is very vague regarding the actual parameters of the library and how the high level white paper logic is translated into practice. I would be happy to make a pull request as soon as I get a solid grasp and produce some testing results.

P.S My storage deal between the 2 nodes that been staging for a couple of hours, is it normal??

Cheers!

  1. Re: Incorrect IP location for a node in Greece.

The network stats dashboard seems to be using an IP2Location Lite database. My node in Germany is also incorrect and shown to be in France on the map, but in Germany when I check on the IP2Location website. I’m not sure how to fix this but filed an issue here: https://github.com/filecoin-project/filecoin-network-stats/issues/44 for now.

2 Likes

I am not sure what I pledge when I set the price for the miner.

As the wiki says you are setting your price per unit resource. The units are FIL/byte/block. This is how much you charge clients to use the storage you commit and prove, it communicates nothing to the blockchain about your storage commitments. The blockchain doesn’t trust you so it waits until you submit storage proofs to consider your power pledged/committed/proven.

What I don’t grasp is how in practice one uses the library to commit storage.

We are tracking work to directly commit storage from the CLI without accepting deals from clients here. In the meantime the way to commit storage is to setup your node as in the mining wiki and wait for clients to make a deal with you. The go-filecoin code then takes care of committing automatically. You can setup your own client node as described in the storing wiki and make a deal with your mining node if you want to commit right away.

is it partioned into many sectors or one big chunk?

You commit data in many sectors one at a time. However you submit proofs of spacetime over the set of all your sectors.

(it should be different due to locking mechanism)

I don’t understand what this means

storage blocks–> uncertain, from the library I gather that I need to commit 2880 blocks so data can be saved for 1 day, not sure what kind of unit blocks are (storage-time?)

No, as long as you keep submitting PoSts your storage will be tracked by the network continuously. Your go-filecoin node will keep submitting PoSts for you by default. It seems like you are confused by the duration field of propose-storage-deal. Again this is for the client storage deal layer and tells the client how long they can be guaranteed you will keep their data around in your committed storage. The unit is blockchain blocks, i.e. 30s intervals when blocks arrive in the network.

I would be happy to make a pull request as soon as I get a solid grasp and produce some testing results.

awesome, always happy to get help making this clearer.

My storage deal between the 2 nodes that been staging for a couple of hours, is it normal??

That sounds a little long. Did you get this to work? Did the logs of the mining node show green output talking about sealing? If not something might have gone wrong.

Hey @zenground0,

Thank you again for your extremely detailed response.

Now things are much more clear. In essence, when mining at the moment the client will accept any deal. So I just advertise my price and I can get as much storage requests as the machine can physically support. At the moment there is not way to force a hard limit.

Regarding sectors: What is the difference when setting different size of sectors? Why would i care whether it’s the default 256mb or 1024mb per sector?

Regarding storage clients: In order save 1 piece of data for 1 day you need 2280 blocks, and the price of those blocks will be determined by the miner, as also the price of each byte.

So I I want to store 1000 bytes for 4 days, I pay 1000 FIL/block, so I will pay 2280 * 4 * 1000 FIL.

Regarding storage deal: Yes, apparently the client kept crushing because of memory issues, replace the VM with one that has 8GB of RAM. Will test it again.

Final notice: Can you please elaborate on:

Create a miner with 100 FIL as collateral, using the default sector size (256MiB), with a message gas price of 0 FIL/unit and limit of 1000 gas units…

especially the usage of the limit.

Thanks again, will try and PR a more concise walkthrough in the next 15 days. Cheers!

What is the difference when setting different size of sectors? Why would i care whether it’s the default 256mb or 1024mb per sector?

Miner operations will want to reduce the on-chain message overhead to keep their costs low. The network as a whole also scales better if on-chain messages / data stored is lower. Using large sectors (right now we are targetting a max size of around 32 Gib) will be advantageous for both individual operators and the network’s traffic throughput by reducing on-chain messages / data stored.

There are also potential effects on storage deal properties (i.e. smaller sectors might be easier to get data out of, getting data in larger sectors will likely be cheaper) but I have thought very little about that.

So I I want to store 1000 bytes for 4 days, I pay 1000 FIL/block, so I will pay 2280 * 4 * 1000 FIL.

Yes

Can you please elaborate on: …

This is the same gas price / gas limit notion you will find well documented in the ethereum community. FIL and blockchain operations are decoupled by having an abstract gas unit that a message sets a price for. The limit will cause the block miners to stop executing actor (builtin smart contract) code after that much gas is used. This way messages can have hard guarantees on how much FIL they will spend.

will try and PR a more concise walkthrough in the next 15 days.

Awesome! Thanks for sticking with it. Your feedback will be valuable for making the intro experience easier for the next person.

Hi @zenground0. Regarding the block reward. If a miner is elected to attach the next block, do they only get a percentage of the reward (based on their storage power)? Or do they get the entire block reward?

Hey @paustria this is a separate question so please ask out of this thread and I’ll answer.