alastria / alastriaID-truffle-contracts

Alastria ID truffle Smart Contracts
MIT License
2 stars 5 forks source link

Deploy Upgradeable Smart Contract in Besu Network #25

Closed VictorNS69 closed 2 years ago

VictorNS69 commented 3 years ago

Deploy Upgradeable Smart Contract in Besu Network.

Modify trufle-config.json if needed.

alejandroalffer commented 3 years ago

WIP in https://github.com/alastria/temp-alastriaID-truffle-contracts/pull/30

alejandroalffer commented 3 years ago

@VictorNS69 , just to be sure. This is the right version, right?

  compilers: {
    solc: {
      version: "0.4.23",
      settings: {
      evmVersion: "byzantium"
      }
    }
  },
rober12 commented 3 years ago

@alejandroalffer Actually the version of the compiler being used in the upgradeable smart contracts is pragma solidity 0.5.17

VictorNS69 commented 3 years ago

As @rober12 says, you can check the compiler settings here: https://github.com/alastria/temp-alastriaID-truffle-contracts/blob/develop/truffle-config.js#L103-L114

alejandroalffer commented 3 years ago

@anthares101 please... any explain of using testing?

Anthares101 commented 3 years ago

@anthares101 please... any explain of using testing?

You should be able to use this repository https://github.com/alastria/alastria-identity-example to test the smart contracts. Change this file to point to the node you want to use.

Im working on this: https://github.com/alastria/alastria-identity-example/pull/120 to have a fast way to check all examples. The only problem is that the keystores used by the examples are in redT not besu right @VictorNS69 ?

VictorNS69 commented 3 years ago

The keystores used should be the same in both networks I think, as we are giving them the specific use and the role we want.

The only important keystores are the "admin" (accounts that deploys SCs) and "firstIdentityWallet" (first identity created).

@anthares101 about the https://github.com/alastria/alastria-identity-example/pull/120, I have some questions I will ask you at the next meeting.

alejandroalffer commented 3 years ago

The smartcontracts has been deployed. Now woking in running examples, https://github.com/alastria/alastria-identity-example/issues/47

VictorNS69 commented 3 years ago

@alejandroalffer you closed this issue, but I see no PR with the changes made to the code. Are all the changes in the main branch?

If not, can you create the pull request?

alejandroalffer commented 3 years ago

Address for AlastriaB network, generated in generated addresses.json:

"Eidas":"0xb8bCaFdEb78Ae5Aa686c5D00616e1561Db0309d4",
"AlastriaServiceProvider":"0x83D65fAc900dB0A27B45854AC64DA3D25d97864d",
"AlastriaIdentityIssuer":"0xE8Dc811f7D05c44EfDD998FFfC26D610B0E5471e",
"AlastriaCredentialRegistry":"0x2f384716e73ae165bC3427Fd60550c26e6CB91c6",
"AlastriaPresentationRegistry":"0x95bC1119b764Bd678B68A1c03Cd8c06EfA27Df81",
"AlastriaPublicKeyRegistry":"0x19e33b2424c1D7B5E563E0A74d8b10CE3812469C",
"AlastriaIdentityManager":"0xE9B9a6E7700672DBbCe59664457D7E6F1dc00F3c",
"AlastriaNameService":"0xC1b1Fc2434D50966c28C8573AbdF3c7842a2Abb4"
alejandroalffer commented 3 years ago

@alejandroalffer you closed this issue, but I see no PR with the changes made to the code. Are all the changes in the main branch?

If not, can you create the pull request?

Yes! At least, here's a clena PullRequest with the needed changes https://github.com/alastria/alastriaID-truffle-contracts/pull/33

VictorNS69 commented 2 years ago

Reopened as we want to re-test the implementation of the develop branch.

Currently it seems that the contracts are not being deployed correctly.

alejandroalffer commented 2 years ago

Updated configuration for deploy contracts in alastraB network in https://github.com/alastria/alastriaID-truffle-contracts/tree/deploy-b-network branch.

Deploy fails in the last step:

❯ npm run updateRedB

> alastria-identity@1.0.0 updateRedB
> ./node_modules/.bin/truffle migrate --f 6 --to 6 --network=red-b-identity-admin

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

Starting migrations...
======================
> Network name:    'red-b-identity-admin'
> Network id:      2020
> Block gas limit: 10485760 (0xa00000)

6_update_logic.js
=================

StatusError: Transaction: 0x5054d835435ea2aaa66a0a6ffdfd2d9c1b47be30edfe7ef464300f1cf1685527 exited with an error (status 0). 
    at module.exports (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/migrations/6_update_logic.js:29:33)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Migration._deploy (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:73:1)
    at Migration._load (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:55:1)
    at Migration.run (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:171:1)
    at Object.runMigrations (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
    at Object.runFrom (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
    at runMigrations (/Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:264:1)
    at /Users/alejandro.alfonso/dev.alastria/alastriaID-truffle-contracts/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:231:1
Truffle v5.1.53 (core: 5.1.53)
Node v14.16.1

Previous actions finish allright.

VictorNS69 commented 2 years ago

Smart Contract deployed and tested.

Related issue: https://github.com/alastria/alastria-identity-example/issues/47

VictorNS69 commented 2 years ago

Tested by me, and working both in T and B network.

Related info:

Everything seems to be working fine :rocket: