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

Validations for celo txs in txpool #31

Merged
merged 6 commits into from
Nov 21, 2023
Merged

Validations for celo txs in txpool #31

merged 6 commits into from
Nov 21, 2023

Conversation

hbandura
Copy link

Validates and accepts celo transactions in the txpool.

(Extracted from the bigger PR of celo's txpool for clarity)

Missing: actual contract calling code to get fee balance & whitelisted status.

@hbandura hbandura requested a review from carterqw2 November 14, 2023 05:27
@carterqw2 carterqw2 requested review from palango and karlb November 14, 2023 11:12
Copy link

@karlb karlb left a comment

Choose a reason for hiding this comment

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

With the FeeCurrencyValidator having no state yet, it is hard to tell whether it is stored and initialized in the right place. So I'll just assume for now that it is.

Feel free to ignore some of the nitpicky comments!

core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Show resolved Hide resolved
@karlb
Copy link

karlb commented Nov 15, 2023

Is there a reason why the tests should fail with

(code: -32000, message: transaction type not supported: tx type 2 not supported by this pool, data: None)

in this stage? I don't see it from the code.

core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Outdated Show resolved Hide resolved
core/txpool/validation.go Outdated Show resolved Hide resolved
core/txpool/celo_validation.go Show resolved Hide resolved
@hbandura
Copy link
Author

Is there a reason why the tests should fail with

(code: -32000, message: transaction type not supported: tx type 2 not supported by this pool, data: None)

in this stage? I don't see it from the code.

Yeap, it was a bug

@hbandura hbandura enabled auto-merge (squash) November 21, 2023 16:16
@hbandura hbandura requested a review from carterqw2 November 21, 2023 16:18
@hbandura hbandura merged commit 613d9c3 into celo2 Nov 21, 2023
5 checks passed
@hbandura hbandura deleted the hbandura/validations branch November 21, 2023 16:27
palango pushed a commit that referenced this pull request Jan 31, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
palango pushed a commit that referenced this pull request Jan 31, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Feb 20, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Feb 20, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
palango pushed a commit that referenced this pull request Apr 30, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
palango pushed a commit that referenced this pull request Apr 30, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
palango pushed a commit that referenced this pull request Apr 30, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
palango pushed a commit that referenced this pull request May 8, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
palango pushed a commit that referenced this pull request May 31, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
carterqw2 pushed a commit that referenced this pull request Jun 11, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Jul 10, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Jul 10, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Jul 12, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Aug 20, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Aug 26, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Aug 30, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Oct 11, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Dec 13, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Dec 16, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
karlb pushed a commit that referenced this pull request Dec 17, 2024
* Validations for celo txs in txpool

* Add stateDB usage for celo validation

* CRU

* Change method name && hardcode true for iswhitelisted for tests

* fix wrong negation

* Fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants