-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem Description
Building smart contract with docker mode, pchain-compile will create a temporary .tar.gz file to collect
- files inside smart contract source code directory
- manifests (dependencies)
and compress them, then copy them into docker container. It is possible, that pchain-compile the temporary .tar.gz become a infinite size growthing file until eats up all hard disc memory.
Problem analyzing
Source code files and manifest files are collected GZencoded, and copied by BFS on directory given by flag "--source". If run pchain-compile inside the smart-contract's source code directory, since final .tar.gz file will kept increasing during the whole compress file creation process,and itself is also file will be counted into the process, the whole prosess will not be stop forever.
Fix
- Good thing is the library "tar.rs" which we plugin to create the
.tar.gzprovide theToo many levels of symbolic linkscheck inside. Therefore, we do not need to take care case, that circulation dependency in manifest or infinite loop caused symbolic links. - Change the location where the temp file
.tar.gzcreated, to avoid creating a infinite increasing file when user runpchian-compileinsde the smart-contract's source code directory. - "target" directory should not be collected, since it might make the
.tar.gzbecome very large
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working