Spinoza defines substance and related concepts in Part I of Ethics as:

III. By substance, I mean that which is in itself, and is conceived through itself: in other words, that of which a conception can be formed independently of any other conception.

IV. By attribute, I mean that which the intellect perceives as constituting the essence of substance.

V. By mode, I mean the modifications[1] of substance, or that which exists in, and is conceived through, something other than itself. [1] "Affectiones"

VI. By God, I mean a being absolutely infinite—that is, a substance consisting in infinite attributes, of which each expresses eternal and infinite essentiality.

Explanation—I say absolutely infinite, not infinite after its kind: for, of a thing infinite only after its kind, infinite attributes may be denied; but that which is absolutely infinite, contains in its essence whatever expresses reality, and involves no negation.

VII. That thing is called free, which exists solely by the necessity of its own nature, and of which the action is determined by itself alone. On the other hand, that thing is necessary, or rather constrained, which is determined by something external to itself to a fixed and definite method of existence or action.

VIII. By eternity, I mean existence itself, in so far as it is conceived necessarily to follow solely from the definition of that which is eternal.

Explanation—Existence of this kind is conceived as an eternal truth, like the essence of a thing, and, therefore, cannot be explained by means of continuance or time, though continuance may be conceived without a beginning or end.

Here the most problematic definition seems substance as thing in itself and conceived through itself.

Any conception of human mind is conceived through differentiation that is by change in natural impulses, like the color, sound, etc. If one believes that there are substances that can be known independently of other substances, these are by definition infinite.

I think this is a relic from idealistic world view, that says, there is some kind of idea or knowledge independent of the human mind and perception.

Suppose there is such a knowledge beyond the reach of human mind. This means, there is some kind of knowledge without a knower. This knowledge, however it may be, exists independent of a knower but also has some affect in the world that some human knowers must discover.

These knowers should also know that the knowledge caused by substance is independent of their perception and mind. Otherwise, either they should identify some knowledge as substantial by their minds, or they should label all knowledge as substantial without their mind. In the first case, substantial knowledge is ambigious, we can't know whether some knowledge is substantial, or not via human mind. In the second case, all knowledge should be substantial but this doesn't bring any relief to know substance.

Because, as we all know, there is no such thing as knowledge without knower.

Knowledge happens between a mind and matter. These are like two poles, one negative, one positive and knowledge is the effect between these two. Instead of saying mind plus substance creates knowledge, I prefer substance minus mind creates knowledge. Why so?

Because when you say mind + substance = knowledge, you assume there is some independent mind and independent substance and knowledge is the thing when we mix these two. No, it's not. Knowledge is like electricity, without two opposite poles, it can't happen. Without substance you can't know what to be known and without mind, you don't have a tool to know.

Looking at the knowledge problem this way has also another benefit: Mind cannot know itself because for it to know itself, itself should be something other. This is a contradiction. If mind knows something, the known is not mind, it's something other than mind.

By this negative view of knowledge, we can proceed to other definitions of Ethics.

IV. By attribute, I mean that which the intellect perceives as constituting the essence of substance.

The distinction between essence and existence mostly seemed as linguistic for me. It's not readily translated to other languages and mostly a made-up concept.

The problem is the same as we find in substance. If we can find a way to describe the essence from existence, it's through our minds and perceptions. The intellect labels an attribute as essential and it is so, by circular logic. If thing $Z$ has the essential attribute $a$, then a $Z$ without $a$ is not $Z$ anyway. When two speakers of a language find an attribute $a$ for $Z$ as essential, then it is so, otherwise it is not. So, how can we differentiate an attribute as essential or existential, independent of the language?

When we look at the problem in the negative light we can come up with a solution: The attributes are not related with essence of a substance, they are possible ways for mind to know a substance. Suppose we have more kinds of electrical charge, other than negative and positive. Mind has a set of charges, like $m_1, m_2, m_3, ...$ and substance has a set of charges $s_1, s_2, s_3, ...$ If we can create a discharge between an attribute $s_i$ and mental faculty $m_j$, it's called an attribute.

We can give a crude example: Suppose $m_i$ are five senses, like sight and hearing, $s_j$ are attributes of a bee, its stripes, its buzz, its movements, etc. If $m_1$ (sight) can related with $s_3$ (black/yellow stripes) of a bee, we can call this an attribute of a thing.

The problem of enumerating $s_i$ remains, though. Can we know how many attributes a bee has? To know this, we have to invent infinitely different mental faculties, like, seeing infrared light or hearing lower frequencies. $m_i$ for a human mind are limited, so enumerating essence of a substance is beyond the human mind. It can only enumerate what it can detect and attributes it detects may not constitute the essence of a substance.

We may proceed to this by other definitions.