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

ASTDereferencerError: No node with id 4294967278 of type FunctionDefinition #1128

Open
dnechay opened this issue Feb 18, 2025 · 1 comment
Open

Comments

@dnechay
Copy link

dnechay commented Feb 18, 2025

Related to #1116

Recently we updated dependencies in our project and got @openzeppelin/upgrades-core updated from 1.41.0 to 1.42.1. After that our Solidity project stopped building inside of a node Docker containers, it throws next error:

56.01 Downloading compiler 0.8.23
57.00 Downloading compiler 0.8.23
57.42 Downloading compiler 0.6.2
111.2 An unexpected error occurred:
111.2 
111.2 ASTDereferencerError: No node with id 4294967278 of type FunctionDefinition
111.2     at deref (/usr/src/app/node_modules/solidity-ast/src/ast-dereferencer.ts:82:11)
111.2     at derefNode (/usr/src/app/node_modules/solidity-ast/src/ast-dereferencer.ts:86:12)
111.2     at curried (/usr/src/app/node_modules/solidity-ast/src/ast-dereferencer.ts:107:14)
111.2     at getRecursiveFunctionIds (/usr/src/app/node_modules/@openzeppelin/upgrades-core/src/validate/run/initializer.ts:278:14)
111.2     at getInitializerCallExceptions (/usr/src/app/node_modules/@openzeppelin/upgrades-core/src/validate/run/initializer.ts:181:32)
111.2     at getInitializerCallExceptions.next (<anonymous>)
111.2     at getInitializerExceptions (/usr/src/app/node_modules/@openzeppelin/upgrades-core/src/validate/run/initializer.ts:50:14)
111.2     at getInitializerExceptions.next (<anonymous>)
111.2     at validate (/usr/src/app/node_modules/@openzeppelin/upgrades-core/src/validate/run.ts:247:38)
111.2     at OverriddenTaskDefinition._action (/usr/src/app/node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:148:25) {
111.2   id: 4294967278,
111.2   nodeType: [ 'FunctionDefinition' ]
111.2 }

When we do a rollback to 1.41.0 - everything works fine.

Interesting to note that 4294967278 is 2 ^ 32 - 18, and previous issue had -18 in there.

As a temporary fix we set specific package version for this peerDependency, but it means we won't be able to get updates anymore.
Could you please check this?

Project for reference in case you need to test out: https://github.com/humanprotocol/human-protocol/tree/develop/packages/core

@ericglau
Copy link
Member

ericglau commented Feb 20, 2025

Thanks for reporting. The original fix was to ignore negative AST id references, but I don't think we can differentiate this "underflowed" notation with regular ids. We'll plan to fix this by omitting nodes ids that are not found in the AST for this scenario.

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

No branches or pull requests

2 participants