mirror of
https://github.com/zkitter/zkitterd.git
synced 2026-01-09 13:47:56 -05:00
fix zkpr
This commit is contained in:
@@ -260,6 +260,8 @@ export default class DBService extends GenericService {
|
||||
// await this.app?.updateLastArbitrumBlock(9317700);
|
||||
}
|
||||
|
||||
await this.app?.updateLastGroup42BlockScanned(7660170);
|
||||
|
||||
// await this.app?.updateLastArbitrumBlock(2193241);
|
||||
// await this.app?.updateLastInterrepBlock(27202837);
|
||||
}
|
||||
|
||||
@@ -544,9 +544,9 @@ export default class HttpService extends GenericService {
|
||||
|
||||
handleGetProofs = async (req: Request, res: Response) => {
|
||||
const { idCommitment } = req.params;
|
||||
const { group = '' } = req.query;
|
||||
const { group = '', proofType = '' } = req.query;
|
||||
|
||||
const proof = await this.call('merkle', 'findProof', idCommitment, group);
|
||||
const proof = await this.call('merkle', 'findProof', idCommitment, group, proofType);
|
||||
|
||||
res.send(
|
||||
makeResponse({
|
||||
|
||||
@@ -73,7 +73,7 @@ export default class MerkleService extends GenericService {
|
||||
return null;
|
||||
};
|
||||
|
||||
findProof = async (idCommitment: string, group?: string) => {
|
||||
findProof = async (idCommitment: string, group?: string, proofType?: string) => {
|
||||
if (!group) {
|
||||
const row = await this.semaphore.findOneByCommitment(idCommitment);
|
||||
if (!row) throw new Error(`${idCommitment} is not in any groups`);
|
||||
@@ -87,7 +87,7 @@ export default class MerkleService extends GenericService {
|
||||
await this.call('interrep', 'syncOne', group).catch(() => null);
|
||||
}
|
||||
|
||||
const tree = await this.makeTree(group, service === 'taz' ? 'semaphore' : 'rln');
|
||||
const tree = await this.makeTree(group, proofType || service === 'taz' ? 'semaphore' : 'rln');
|
||||
const proof = await tree.createProof(tree.indexOf(BigInt('0x' + idCommitment)));
|
||||
|
||||
if (!proof) {
|
||||
|
||||
@@ -46,7 +46,7 @@ export default class Group42 extends GenericService {
|
||||
const idCommitmentHex = BigInt(identityCommitment).toString(16);
|
||||
const exist = await this.semaphore?.findOne(idCommitmentHex, 'semaphore_taz_members');
|
||||
|
||||
if (!exist && groupId === '42') {
|
||||
if (!exist && (groupId === '10806' || groupId === '42' || groupId === '10807')) {
|
||||
await this.semaphore?.addID(
|
||||
idCommitmentHex,
|
||||
'semaphore_taz_members',
|
||||
|
||||
@@ -19,7 +19,7 @@ const logger = winston.createLogger({
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.add(
|
||||
new winston.transports.Console({
|
||||
level: 'info',
|
||||
level: 'error',
|
||||
format: winston.format.simple(),
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user