Skip to content

Conversation

@gyan-sharma
Copy link
Contributor

@gyan-sharma gyan-sharma commented Mar 27, 2025

Platform documentation upgrade
March 2025

Summary by Sourcery

Perform a comprehensive documentation style and formatting update across multiple markdown files in the SettleMint documentation repository. The changes focus on consistent capitalization, title formatting, and minor text refinements while maintaining the original content's intent.

Documentation:

  • Updated documentation files to use consistent title casing and formatting
  • Standardized capitalization in headings and section titles
  • Refined text to improve readability and consistency

Chores:

  • Removed unnecessary keyword sections at the end of some files
  • Cleaned up whitespace and formatting across multiple documentation files

gyan-sharma and others added 30 commits March 26, 2025 15:06
## Summary by Sourcery

New Features:
- Adds documentation for AWS Secret Manager, including setup
instructions, IAM user creation, access key generation, and Helm chart
values configuration.

## Summary by Sourcery

Documentation:
- Add documentation for AWS Secret Manager, including setup
instructions, IAM user creation, access key generation, and Helm chart
values configuration.

Co-authored-by: Oleksandr Hrab <oleksandr@settlemint.com>
saeeddawod and others added 11 commits March 27, 2025 11:23
## Summary by Sourcery

Add documentation for two new blockchain networks: Sonic (L1) and
Soneium (L2), expanding the platform's supported blockchain
infrastructure.

New Features:
- Added comprehensive documentation for Sonic, a high-performance Layer
1 blockchain with sub-second finality
- Added detailed documentation for Soneium, an Ethereum Layer 2 scaling
solution

Documentation:
- Updated network manager documentation to include Sonic and Soneium in
the list of supported networks
- Created new documentation pages for Sonic and Soneium blockchain
networks
- Updated formatting and list styles in existing blockchain
documentation
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 27, 2025

Reviewer's Guide by Sourcery

This pull request upgrades the platform documentation with detailed guides and technical overviews for public blockchains, blockchain technology, SettleMint platform components, and deployment processes. It includes architecture deep dives, code examples, and best practices for building and managing blockchain solutions.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated documentation content for public blockchains, including architecture deep dives for Bitcoin, Ethereum, and Polygon, along with network comparisons and use cases.
  • Added sections on Bitcoin's block structure, transaction format, and mining.
  • Included details on Ethereum's account model, block structure, and transaction lifecycle.
  • Described Polygon's hybrid layer-2 architecture and consensus mechanism.
  • Compared Solana, Avalanche, Cardano, and Polkadot in terms of consensus, finality, and scalability.
  • Expanded on use cases like DeFi, NFTs, and DAOs.
  • Added technical considerations for network selection, infrastructure, and development.
content/docs/knowledge-bank/public-blockchains.mdx
Expanded the introduction to blockchain technology with a technical overview, covering cryptographic foundations, block structure, transactions, wallets, nodes, consensus mechanisms, forks, network models, data immutability, Merkle trees, chain reorganization, smart contracts, and enterprise blockchain platforms.
  • Added sections on cryptographic hashing, nonces, and public/private key pairs.
  • Included details on transaction structure, validation, and signing.
  • Described different types of wallets and their key storage mechanisms.
  • Explained node types, peer-to-peer communication, and the transaction pool.
  • Detailed consensus mechanisms like Proof of Work, Proof of Stake, and Byzantine Fault Tolerance.
  • Discussed hard forks, soft forks, and protocol upgrades.
  • Explained public, private, and consortium blockchain network models.
  • Covered data immutability, append-only design, and Merkle trees.
  • Described chain reorganization and finality.
  • Explained smart contracts and their execution environment.
  • Compared Hyperledger Fabric and Hyperledger Besu as enterprise blockchain platforms.
content/docs/knowledge-bank/blockchain-introduction.mdx
Revised the planning and decisions guide for building blockchain solutions with SettleMint, focusing on implementation approaches, custom development processes, and strategic decision-making.
  • Updated the strategic decision framework.
  • Clarified development path options, including pre-built solutions and custom development.
  • Detailed the custom development process with four steps: blockchain network infrastructure, smart contract logic, middleware and integration studio, and DB, storage, UI deployment.
  • Added information about AI-assisted development.
  • Updated links to relevant documentation and resources.
content/docs/building-with-settlemint/planning-and-decisions.mdx
Updated the guide on deploying chaincode in Hyperledger Fabric using SettleMint, focusing on the chaincode lifecycle management and providing a TypeScript example.
  • Replaced Solidity example with a TypeScript example.
  • Detailed the chaincode lifecycle management process, including packaging, installing, approving, committing, initializing, querying, and invoking.
  • Provided a table mapping CRUD operations to chaincode functions.
  • Updated the steps for compiling, packaging, and deploying chaincode.
  • Added helpful queries and channel management commands.
content/docs/building-with-settlemint/hyperledger-fabric-guide/deploy-chain-code.mdx
Updated the guide on setting up Graph middleware for Ethereum, focusing on indexing smart contract events and querying them using GraphQL.
  • Clarified the process of setting up Graph middleware and API portal.
  • Detailed the subgraph folder structure in Code Studio IDE.
  • Updated the steps for codegen, building, and deploying the subgraph.
  • Provided an example query implementation.
  • Added information about using the Attestation Indexer and Integration Studio.
content/docs/building-with-settlemint/hedera-hashgraph-guide/setup-graph-middleware.mdx
Updated the guide on setting up the Ethereum Attestation Indexer, focusing on tracking, storing, and querying verifiable claims using the Ethereum Attestation Service (EAS).
  • Clarified the purpose and benefits of the Ethereum Attestation Service (EAS).
  • Detailed the core components of EAS, including SchemaRegistry, EAS Contract, Attestations, and Resolvers.
  • Updated the steps for contract deployment, schema registration, and attestation creation.
  • Provided methods for verifying attestations using the EAS SDK and custom smart contract resolvers.
  • Added information about using the Attestation Indexer and Integration Studio.
content/docs/building-with-settlemint/hedera-hashgraph-guide/attestation-indexer.mdx
Updated the guide on adding blockchain networks and nodes, focusing on setting up EVM-based and Hyperledger Fabric networks and managing nodes and load balancers.
  • Clarified the process of adding blockchain networks and nodes.
  • Detailed the configuration options for EVM-based private networks (Besu, Quorum) and Hyperledger Fabric networks.
  • Updated the steps for managing networks and nodes using the SDK CLI and Platform UI.
  • Added information about adding load balancers and blockchain explorers.
  • Provided details on node types, core components, and connection details.
content/docs/platform-components/blockchain-infrastructure/network-manager.mdx
content/docs/building-with-settlemint/evm-chains-guide/add-network-and-nodes.mdx
Updated the guide on setting up Code Studio for developing and deploying chaincodes and subgraphs, focusing on the Fabric IDE project structure and task manager.
  • Clarified the purpose and benefits of Code Studio.
  • Detailed the Fabric IDE project structure and task manager.
  • Updated the steps for customizing chaincodes and using the chaincode template library.
  • Provided information about creating custom chaincode templates for a consortium.
content/docs/building-with-settlemint/hyperledger-fabric-guide/setup-code-studio.mdx
Updated the guide on deploying custom services, focusing on hosting frontend applications and other custom services using Docker images.
  • Clarified the purpose and benefits of custom deployments.
  • Updated the steps for creating a custom deployment, configuring DNS for custom domains, and managing custom deployments.
  • Provided limitations and considerations for using custom deployments.
  • Added best practices for designing and deploying custom services.
content/docs/building-with-settlemint/evm-chains-guide/deploy-custom-services.mdx
Updated the guide on secret management, focusing on configuring secret management for a self-hosted platform.
  • Clarified the purpose and benefits of secret management.
  • Updated the steps for configuring secret management using GCP Secret Manager, HCP Vault, Self-Hosted Vault, and AWS Secret Manager.
  • Provided information on required values for platform installation and troubleshooting.
content/docs/launching-the-platform/self-hosted-onprem/prerequisites/secret-management.mdx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gyan-sharma gyan-sharma requested a review from SaeeDawod March 27, 2025 12:52
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @gyan-sharma - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The documentation is becoming very detailed, consider breaking it down into smaller, more focused documents to improve readability and maintainability.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

To remove the platform:

```bash
helm delete settlemint --namespace settlemint
Copy link

Choose a reason for hiding this comment

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

suggestion: Namespace capitalization appears inconsistent.

In the installation steps the release is upgraded as "SettleMint" and the namespace is sometimes lower-cased. Verify whether the namespace and release naming should both be capitalized or follow a specific convention to avoid confusion in commands.

Suggested implementation:

kubectl logs -n settlemint <pod-name>

helm delete settlemint --namespace settlemint

Comment on lines 31 to -33
Replace `<username>` and `<password>` with your provided credentials.

### 2. Review Configuration Options
Copy link

Choose a reason for hiding this comment

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

suggestion: Repository name change should be verified for correctness.

The repository name has been updated from a lower-case version to "SettleMint". It would be good to double-check that this change aligns with the official repository naming, and that it is consistently applied throughout all installation commands.

Suggested change
Replace `<username>` and `<password>` with your provided credentials.
### 2. Review Configuration Options
Replace `<username>` and `<password>` with your provided credentials.
<!-- Note: Please verify that the repository name "SettleMint" is correct and consistently applied in all installation commands. -->
### 2. Review configuration options

);
};

function preserveAbbreviations(text: string): {
Copy link

Choose a reason for hiding this comment

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

issue (complexity): Consider refactoring the abbreviation preservation to use a counter-based approach with a single regex to avoid random placeholder generation and improve determinism.

Consider refactoring the abbreviation preservation to avoid generating random placeholders (which can lead to non‐determinism and extra mapping overhead). One idea is to use a counter-based approach with a regex that directly captures only what you need. For example:

// Build a single regex for all abbreviations
const ABBR_REGEX = new RegExp(`\\b(${ABBREVIATIONS.join("|")})\\b`, "gi");

function preserveAbbreviations(text: string): { text: string; replacements: Record<string, string> } {
  let counter = 0;
  const replacements: Record<string, string> = {};
  // Use a deterministic placeholder with a counter
  const processedText = text.replace(ABBR_REGEX, (match) => {
    const placeholder = `__ABBR_${counter++}__`;
    // Store the exact casing you expect
    replacements[placeholder] = match.toUpperCase();
    return placeholder;
  });
  return { text: processedText, replacements };
}

function restoreAbbreviations(text: string, replacements: Record<string, string>): string {
  return Object.entries(replacements).reduce(
    (acc, [placeholder, value]) => acc.replace(placeholder, value),
    text
  );
}

Actionable steps:

  1. Replace the random placeholder generation with a counter-based system.
  2. Collapse the multiple regex patterns into one that matches abbreviations as whole words.
  3. Use a plain object for mappings, which simplifies restoration.

These changes maintain the functionality and make the flow easier to test and reason about.

sentenceCaseText = restoreAbbreviations(sentenceCaseText, replacements);

// Restore formatting
if (startsWithAsterisks) sentenceCaseText = "**" + sentenceCaseText;
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces)

Suggested change
if (startsWithAsterisks) sentenceCaseText = "**" + sentenceCaseText;
if (startsWithAsterisks) {


ExplanationIt is recommended to always use braces and create explicit statement blocks.

Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).


// Restore formatting
if (startsWithAsterisks) sentenceCaseText = "**" + sentenceCaseText;
if (endsWithAsterisks) sentenceCaseText = sentenceCaseText + "**";
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces)

Suggested change
if (endsWithAsterisks) sentenceCaseText = sentenceCaseText + "**";
if (endsWithAsterisks) {


ExplanationIt is recommended to always use braces and create explicit statement blocks.

Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).


// Restore formatting
if (startsWithAsterisks) sentenceCaseText = "**" + sentenceCaseText;
if (endsWithAsterisks) sentenceCaseText = sentenceCaseText + "**";
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Replace assignment with assignment operator (assignment-operator)

Suggested change
if (endsWithAsterisks) sentenceCaseText = sentenceCaseText + "**";
if (endsWithAsterisks) sentenceCaseText += "**";


ExplanationThe augmented assignment operators, such as += are a more streamlined and easy to understand way
to add values. Using them removes a little bit of repetition and makes the code slightly easier to
understand.

@SaeeDawod SaeeDawod merged commit 7fe4158 into main Mar 27, 2025
3 checks passed
@SaeeDawod SaeeDawod deleted the dev branch March 27, 2025 13:01
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.

5 participants