Closed ejMina226 closed 1 month ago
Further feedback and questions regarding implementation:
Can you give quick rationale why it's NestJS instead of node.js or another well known framework?
There are empty files, not used statements, hello world entries -- is it possible to clean it up?
What's the protection of Admin user? It has power to move all tokens
Bridge transactions are represented by Mina transactions -- this has then constraint on Mina TPS. How external entities faster than Mina will co-operate with the bridge?
There is no ZK proof representing and following correct balance of Mina tokens and minted tokens
What is final branch? main or new-token?
The tests are very sparse and not representing functionality of the bridge
Liveness of the bridge depends on the Typeorm availability -- this is a concern
Lack of validation of input data in controllers (e.g. email). Is it validated in the db?
Can you clean up unused methods, imports and not-relevant comments?
Further feedback and questions regarding implementation:
- Can you give quick rationale why it's NestJS instead of node.js or another well known framework?
- There are empty files, not used statements, hello world entries -- is it possible to clean it up?
- What's the protection of Admin user? It has power to move all tokens
- Bridge transactions are represented by Mina transactions -- this has then constraint on Mina TPS. How external entities faster than Mina will co-operate with the bridge?
- There is no ZK proof representing and following correct balance of Mina tokens and minted tokens
- What is final branch? main or new-token?
- The tests are very sparse and not representing functionality of the bridge
- Liveness of the bridge depends on the Typeorm availability -- this is a concern
- Lack of validation of input data in controllers (e.g. email). Is it validated in the db?
- Can you clean up unused methods, imports and not-relevant comments?
Hi @michal0mina i'm here to answer these questions:
Hi, here is some feedback from @harrysolovay and myself.
We liked seeing the runtime validations, attention to swagger / introspectability, and use of type-orm for type-safe bindings to the DB. While we cannot comment on some of the specifics of NestJS usage (such as its method of composition via the Injectable decorator), some things that caught our eyes as potential issues / JS antipatterns:
The TypeScript configuration is very loose. There are several flags that would dramatically enhance the quality of checking. https://www.typescriptlang.org/tsconfig/#noUncheckedIndexedAccess https://www.typescriptlang.org/tsconfig/#strict https://www.typescriptlang.org/tsconfig/#alwaysStrict
Many successful libraries (such as
class-validator
andclass-transformer
) use legacy decorators. These dependencies are not necessarily good choices for new projects. There is a new decorators spec, which has been implemented in JS runtimes. It was introduced in TypeScript 5 (see announcement here). Good blog post about it here.Why do we have these ungraceful exits. The process should automatically terminate when there are no longer any running jobs.
We strongly recommend avoiding augmentation of the global array type here
We are reviewing the source code and will take this information as reference. Thanks.
Hi, here is some feedback from @harrysolovay and myself.
We liked seeing the runtime validations, attention to swagger / introspectability, and use of type-orm for type-safe bindings to the DB. While we cannot comment on some of the specifics of NestJS usage (such as its method of composition via the Injectable decorator), some things that caught our eyes as potential issues / JS antipatterns:
The TypeScript configuration is very loose. There are several flags that would dramatically enhance the quality of checking. https://www.typescriptlang.org/tsconfig/#noUncheckedIndexedAccess https://www.typescriptlang.org/tsconfig/#strict https://www.typescriptlang.org/tsconfig/#alwaysStrict
Many successful libraries (such as
class-validator
andclass-transformer
) use legacy decorators. These dependencies are not necessarily good choices for new projects. There is a new decorators spec, which has been implemented in JS runtimes. It was introduced in TypeScript 5 (see announcement here). Good blog post about it here.Why do we have these ungraceful exits. The process should automatically terminate when there are no longer any running jobs.
We strongly recommend avoiding augmentation of the global array type here