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

Add origin chain explorer #412 #587

Merged

Conversation

apoorv-2204
Copy link
Contributor

@apoorv-2204 apoorv-2204 commented Sep 26, 2022

Description

It adds a new feature origin chain explorer to UI, which includes :origin Tranasction type in chronological order, also mentioning type of origin family .

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Documentation Related Changes, Origin Chain:
    • Arch-ethic Origin Chain is a novel concept to ensure transactions are generated from a valid device.

How Has This Been Tested?

  • For quick test comment this code under pending_transaction_validation.ex
  def validate_network_chain?(:origin, tx = %Transaction{}) do
    # singleton tx chain in network lifespan
    # not parsing orgin pub key for origin family
    case SharedSecrets.genesis_address(:origin) do
      nil ->
        false

      origin_gen_addr_list ->
        first_addr_from_prev_addr =
          tx
          |> Transaction.previous_address()
          |> TransactionChain.get_genesis_address()

        first_addr_from_prev_addr in origin_gen_addr_list
    end
  end

& post at Origin API Ccontroller.


Screenshot_20220927_111415


Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@apoorv-2204 apoorv-2204 self-assigned this Sep 26, 2022
@apoorv-2204 apoorv-2204 added the UI Invole user interface label Sep 26, 2022
lib/archethic/shared_secrets.ex Outdated Show resolved Hide resolved
 - leaves space for merge nss chain
 - change shared secrets origin id determination
 - correct type in origin_chain_index.html.leex
@apoorv-2204 apoorv-2204 marked this pull request as ready for review September 27, 2022 06:09
@samuelmanzanera samuelmanzanera merged commit 4a547d5 into archethic-foundation:develop Sep 29, 2022
@samuelmanzanera samuelmanzanera added the feature New feature request label Oct 3, 2022
@apoorv-2204 apoorv-2204 deleted the origin_explorer branch October 7, 2022 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request UI Invole user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants