Caqti upgrade with fix for rosetta
Reimplementing caqti upgrade after revertion (https://github.com/MinaProtocol/mina/pull/16694).
PR Structure
- (8a8e1b5) First commit is pure re-implementation without any fix and will fail in CI
- (0dbf7429) Second commit is fix for rosetta
- (98e019a4) Third commit is fix for toolchain update
Previous PR was reverted as it introduced regression in rosetta. Lesson was learnt and we added more E2E tests for rosetta which now will catch it (https://github.com/MinaProtocol/mina/pull/16692). What is more, we stabilized tests here (https://github.com/MinaProtocol/mina/pull/16695).
Regarding source of the issue:
After caqti update postgres postgres lost information about type of parameter in some cases. Especially in where clause in search command:
... WHERE ($1 IS NULL OR (b.height <= $1)) AND (($2 IS NULL OR (u.hash = $2)) ....
Which resulted in postgres error
could not determine data type of parameter IS NULL
Solution
The possible solution is to always add ::{type} suffix to parameter when using it. For example $1::int or $2::text. For this purpose is modified a bit code responsible for formatting parameter and always use ::{type} suffix for checking for null and CAST when comparing with expected value
How it is tested:
Currently All known rosetta tests (maybe apart from load tests) are automated in CI:
- unit tests
- indexer unit tests
- api tests
- integration tests (using rosetta-cli)
- connectivity tests (devnet,mainnet)
- e2e command sanity tests
!ci-build-me
!ci-build-me
!ci-build-me
!ci-nightly-me
Nightly: https://buildkite.com/o-1-labs-2/mina-end-to-end-nightlies/builds/3463
!ci-toolchain-me
!ci-build-me
!ci-toolchain-me
Is this PR still relevant?
!ci-build-me
!ci-toolchain-me
!ci-build-me
!ci-build-me
!ci-build-me
!ci-nightly-me
!ci-build-me
!ci-build-me
!ci-nigthly-me
!ci-build-me
!ci-build-me
Although I'm not requested to review this: This is too big, is it possible to break it down to several smaller PRs?
@glyh I thought about it, but it is a library bump PR so it is hard/artificial to do it partially
!ci-build-me