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

Hotfix for partial tree update #73

Merged
merged 4 commits into from
Dec 26, 2022
Merged

Conversation

EvgenKor
Copy link
Collaborator

@EvgenKor EvgenKor commented Dec 25, 2022

Here is hotfixes for the client library for errors discovered during latest testing

  1. Birthindex was moved to the Token object (because it's a shielded token property nor account one): UI/console changes required
  2. Changing sibling values byte order (LittleEndian -> BigEndian). This is an urgent issue because currently deployed console isn't working after the latest relayer update.
  3. Disabling partial sync in case of error during the first partial tree update
  4. Loading actual birthindex during an account initialising (we can loose input notes when fetched actual birthindex during the first state sync)
  5. Fixing typo in the PoolLimits structure (dayly -> daily): UI/console changes required

src/client.ts Outdated
// fetch current birthindex right away
try {
let curIndex = Number((await client.info(token.relayerUrl)).deltaIndex);
const OUTPLUSONE = CONSTANTS.OUT + 1;

Choose a reason for hiding this comment

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

you define OUTPLUSONE twice here and at the line 1387. Should we move its definition to the section (lines 27-38) where all constant are defined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, make sense. Moved in 46fc276

src/client.ts Outdated
// set -1 to use the latest index (create _NEW_ account)
birthindex: number | undefined;
// Account birthday [moved to Token object]
//birthindex: number | undefined;
Copy link

Choose a reason for hiding this comment

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

I think there is no need to leave it in the code. Git remembers everything :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. aecdcd2

@akolotov akolotov merged commit fc90736 into develop Dec 26, 2022
@akolotov akolotov deleted the fix/fetch-birthindex-on-init branch December 26, 2022 08:38
akolotov added a commit that referenced this pull request Dec 26, 2022
This merge contains the following set of changes:
- Hotfix for getting partial tree (#73)
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.

5 participants