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

Using AlastriaID permisioned node #155

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alejandroalffer
Copy link
Member

Quick documentation for the use and deployment of SmartContracts in the AlastriaID development node

```

```
truffle migrate --network alastriat  INT ✘  at 00:09:05  

Choose a reason for hiding this comment

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

at the end of the line there is some output from the terminal

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the feedback: fixed!


These examples are based on the repository https://github.com/alastria/smart-contract-deployment:

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be a good idea to put not only the configuration of the environment variables, if not indicate what changes to make in the truffle.js so that when running truffle migrate --network alastriat you get the IP of the node of the environment variable instead of the truffle.js. Don't you think @alejandroalffer ?

Copy link
Member Author

@alejandroalffer alejandroalffer Apr 17, 2023

Choose a reason for hiding this comment

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

Hello!

Thanks for the feedback. I personally think it's better that sensitive information is always in environment variables (...or some alternative like AWS KMS).

In other words, make sensitive information independent of code: especially when it works in different environments (development/pre-production/production...). This way we also avoid the risk of unintentionally committing sensitive information, or in order the developers do not have access to sensitive company information.

That can be easily consumed from any language, and that is easy to fix in Docker (and alternatives) and establish, for example, automatic access renewal policies, without involving the development teams,

In any case, you can always store sensitive information in a file and retrieve it in this way in truffle-config.js:

const fs = require("fs");
//const keythereum = require('keythereum');
//const HDWalletProvider = require("@truffle/hdwallet-provider");
//...
const wallet_key = fs.readFileSync(".wallet_key").toString().trim();
const node_access = fs.readFileSync(".node_access").toString().trim();

//module.exports = {
//...

Where .wallet_key:

https://red-*.alastria.io/v0/94...

And .node_access (64 bytes):

ae0... 

But it would be necessary to take great care of the .gitingore ;-)

Copy link
Contributor

@jftavira jftavira left a comment

Choose a reason for hiding this comment

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

Deberíamos mencionar que "donde aparece la marca verde es dónde hay que poner el APIKey", parece obvio pero...

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.

6 participants