Thanks. Then what factors divide "valid" / "invalid" transaction and blocks?
The consensus rules implemented in the client software.
For example...
Any transaction such that the sum of the values of the outputs is greater than the sum of the values of the inputs, is an invalid transaction.
Any transaction such that the outputs being spent by the inputs don't exist, is an invalid transaction.
Any transaction such that the concatenation of the Txin-script and the Txout-script don't resolve successfully, is an invalid transaction.
Any block which contains an invalid transaction, is an invalid block.
Any block which does not result in a hash value that is lower than the difficulty target when hashed with SHA256d, is an invalid block.
Any block which has a timestamp outside the allowed range, is an invalid block.
Any block which pays to large of a block reward, is an invalid block.
Any block that exceeds the block size (or block weight) limits, is an invalid block.
Any block that does not have a previous block hash which matches an existing block in the blockchain, is an invalid block.
I'm sure I'm overlooking some rules, but those are the ones that immediately come to mind.