A high pool difficulty is for high power mining equipment. What this does is lowers the bandwidth amount for both the pool and the miner. Because the difficulty is higher, the miner will find valid shares less frequently, resulting in less data transmitted from the miner to the pool.
Lower difficulties are for lower powered mining equipment, so that the ...
Usually that error means the share your miner submitted was garbage, and didn't actually verify on the pool. Sometimes it means the share was submitted too late, and the pool has already moved on to the next block. But if you keep getting it over and over, then your miner code is broken (or you're using the wrong algorithm).
You can find the difficulty of a submitted hash (which is just a big endian hex encoded string) by dividing the base difficulty (2^256-1) by your hash.
As such, nodejs-pool (the most common pool software), checks your submitted hash difficulty as follows:
let hashArray = hash.toByteArray().reverse();
let hashNum = bignum.fromBuffer(new Buffer(hashArray));
To target a block time of a day, difficulty would be adjusted to make the likelihood of finding a block require a days worth of hashing (work). The big drawback to such a large block time would be slow confirmation of transactions.
The port used defines the starting difficulty.
From the pool doc you referenced:
The Port is used in conjunciton with the url and is used to specify the starting difficulty.
As soon as you submit a result, the pool updates your difficulty for the next job it sends you based on how long it took you to hash the last (or to be more accurate, it averages ...
You're are correct in assuming target is the same as difficulty
Question 1: You are just credited for the difficulty nothing more. You are set with a threshold to meet to prove you are mining however these shares hold no value unless they are the solution to the current block so you will not be rewarded extra for mining below the threshold, neither will you ...