Skip to content

Instantly share code, notes, and snippets.

@kayvank
Last active August 19, 2022 00:53
Show Gist options
  • Save kayvank/4d33dc7b3c39a4aa1d5f6a331f575195 to your computer and use it in GitHub Desktop.
Save kayvank/4d33dc7b3c39a4aa1d5f6a331f575195 to your computer and use it in GitHub Desktop.
docker system prune --volumes
docker system prune --all
_/build-dars
dc up -d --build
find . -name "*.dar"
#### output of the find command: ###
➜ eleox git:(js-kayvan-EID-17-packageId) ✗ find . -name "*.dar"
./daml/.daml/dist/eleox-do-not-use-0.0.1.dar
./daml/.packages/eleox-triggers/.daml/dist/eleox-triggers-0.0.1.dar
./daml/.packages/eleox/.daml/dist/eleox-0.0.1.dar
./daml/.packages/test/.daml/dist/test-0.0.1.dar
./services/daml-trigger/scripts/dars/eleox-triggers-0.0.1.dar
./services/canton-participant/scripts/dars/eleox-0.0.1.dar
######################## next get pakcage id using daml api ###############
daml damlc inspect-dar --json ./daml/.packages/eleox/.daml/dist/eleox-0.0.1.dar | jq '.main_package_id'
"6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579"
daml damlc inspect-dar --json ./services/canton-participant/scripts/dars/eleox-0.0.1.dar | jq '.main_package_id'
"6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579"
###################################### from PG contracts table ##############
6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579 | Creators:ReferenceDataHelper | 1660867396053277
6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579 | Creators:ReferenceDataHelper | 1660867381089680
6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579 | Creators:ReferenceDataHelper | 1660867366655957
65921e553a353588e950cbc87e98a127730e63295f7ad8d3adae952ef0133b3e | PingPong:Pong | 1660867365622087
65921e553a353588e950cbc87e98a127730e63295f7ad8d3adae952ef0133b3e | PingPong:Ping | 1660867364266310
##################################################
Conclusion, packageid matches between api and PG
@kayvank
Copy link
Author

kayvank commented Aug 19, 2022

daml deploy 2
modified Creators.daml :
observer members ++ [platform]

next :
_/build-dars
and compare the project ids using api:

 daml damlc inspect-dar --json ./services/canton-participant/scripts/dars/eleox-0.0.1.dar | jq '.main_package_id'
"6ace966b605bb0965797d0ed4afc8972015f4d885d1fe8314fefbe0280405ce1"
 daml damlc inspect-dar --json ./services/canton-participant/scripts/dars/eleox-0.0.1.dar | jq '.main_package_id'
"6ace966b605bb0965797d0ed4afc8972015f4d885d1fe8314fefbe0280405ce1"

next restart docker containers :

_/dc down
docker ps  ## made sure all containers were down
dc up -d --build

The contracts table did not change

 6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579 | Creators:ReferenceDataHelper | 1660867396053277
 6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579 | Creators:ReferenceDataHelper | 1660867381089680
 6470fdc04261509b63a6d3b664e6fb252c3d49f0adf49715d1cedb1aeb18d579 | Creators:ReferenceDataHelper | 1660867366655957
 65921e553a353588e950cbc87e98a127730e63295f7ad8d3adae952ef0133b3e | PingPong:Pong                | 1660867365622087
 65921e553a353588e950cbc87e98a127730e63295f7ad8d3adae952ef0133b3e | PingPong:Ping                | 1660867364266310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment