-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1407 from iotaledger/develop
Merge v0.7.0 changes to master
- Loading branch information
Showing
94 changed files
with
6,239 additions
and
896 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: GoShimmer mdBook | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
package client | ||
|
||
import ( | ||
"encoding/csv" | ||
"fmt" | ||
"net/http" | ||
|
||
"github.com/iotaledger/goshimmer/plugins/webapi/tools" | ||
) | ||
|
||
// GetDiagnosticsMessages runs full message diagnostics | ||
// Returns CSV with the following fields: | ||
// | ||
// ID IssuerID IssuerPublicKey IssuanceTime ArrivalTime SolidTime ScheduledTime BookedTime OpinionFormedTime | ||
// FinalizedTime StrongParents WeakParents StrongApprovers WeakApprovers BranchID InclusionState Scheduled Booked | ||
// Eligible Invalid Finalized Rank IsPastMarker PastMarkers PMHI PMLI FutureMarkers FMHI FMLI PayloadType TransactionID | ||
// PayloadOpinionFormed TimestampOpinionFormed MessageOpinionFormed MessageOpinionTriggered TimestampOpinion | ||
// TimestampLoK | ||
func (api *GoShimmerAPI) GetDiagnosticsMessages() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticMessages) | ||
} | ||
|
||
// GetDiagnosticsFirstWeakMessageReferences runs diagnostics over weak references only. | ||
// Returns CSV with the following fields: | ||
// | ||
// ID IssuerID IssuerPublicKey IssuanceTime ArrivalTime SolidTime ScheduledTime BookedTime OpinionFormedTime | ||
// FinalizedTime StrongParents WeakParents StrongApprovers WeakApprovers BranchID InclusionState Scheduled Booked | ||
// Eligible Invalid Finalized Rank IsPastMarker PastMarkers PMHI PMLI FutureMarkers FMHI FMLI PayloadType TransactionID | ||
// PayloadOpinionFormed TimestampOpinionFormed MessageOpinionFormed MessageOpinionTriggered TimestampOpinion | ||
// TimestampLoK | ||
func (api *GoShimmerAPI) GetDiagnosticsFirstWeakMessageReferences() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsFirstWeakMessageReferences) | ||
} | ||
|
||
// GetDiagnosticsMessagesByRank run diagnostics for messages whose markers are equal or above a certain rank | ||
// Returns CSV with the following fields: | ||
// | ||
// ID IssuerID IssuerPublicKey IssuanceTime ArrivalTime SolidTime ScheduledTime BookedTime OpinionFormedTime | ||
// FinalizedTime StrongParents WeakParents StrongApprovers WeakApprovers BranchID InclusionState Scheduled Booked | ||
// Eligible Invalid Finalized Rank IsPastMarker PastMarkers PMHI PMLI FutureMarkers FMHI FMLI PayloadType TransactionID | ||
// PayloadOpinionFormed TimestampOpinionFormed MessageOpinionFormed MessageOpinionTriggered TimestampOpinion | ||
// TimestampLoK | ||
func (api *GoShimmerAPI) GetDiagnosticsMessagesByRank(rank uint64) (*csv.Reader, error) { | ||
return api.diagnose(fmt.Sprintf("%s?rank=%d", tools.RouteDiagnosticMessages, rank)) | ||
} | ||
|
||
// GetDiagnosticsUtxoDag runs diagnostics over utxo dag. | ||
// Returns csv with the following fields: | ||
// | ||
// ID,IssuanceTime,SolidTime,OpinionFormedTime,AccessManaPledgeID,ConsensusManaPledgeID,Inputs,Outputs,Attachments, | ||
// BranchID,BranchLiked,BranchMonotonicallyLiked,Conflicting,InclusionState,Finalized,LazyBooked,Liked,LoK,FCOB1Time, | ||
// FCOB2Time | ||
func (api *GoShimmerAPI) GetDiagnosticsUtxoDag() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsUtxoDag) | ||
} | ||
|
||
// GetDiagnosticsBranches runs diagnostics over branches. | ||
// Returns csv with the following fields: | ||
// | ||
// ID,ConflictSet,IssuanceTime,SolidTime,OpinionFormedTime,Liked,MonotonicallyLiked,InclusionState,Finalized, | ||
// LazyBooked,TransactionLiked | ||
func (api *GoShimmerAPI) GetDiagnosticsBranches() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsBranches) | ||
} | ||
|
||
// GetDiagnosticsLazyBookedBranches runs diagnostics over lazy booked branches. | ||
// Returns csv with the following fields: | ||
// | ||
// ID,ConflictSet,IssuanceTime,SolidTime,OpinionFormedTime,Liked,MonotonicallyLiked,InclusionState,Finalized, | ||
// LazyBooked,TransactionLiked | ||
func (api *GoShimmerAPI) GetDiagnosticsLazyBookedBranches() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsLazyBookedBranches) | ||
} | ||
|
||
// GetDiagnosticsInvalidBranches runs diagnostics over invalid branches. | ||
// Returns csv with the following fields: | ||
// | ||
// ID,ConflictSet,IssuanceTime,SolidTime,OpinionFormedTime,Liked,MonotonicallyLiked,InclusionState,Finalized, | ||
// LazyBooked,TransactionLiked | ||
func (api *GoShimmerAPI) GetDiagnosticsInvalidBranches() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsInvalidBranches) | ||
} | ||
|
||
// GetDiagnosticsTips runs diagnostics over tips | ||
// Returns csv with the following fields: | ||
// | ||
// tipType,ID,IssuerID,IssuerPublicKey,IssuanceTime,ArrivalTime,SolidTime,ScheduledTime,BookedTime,OpinionFormedTime, | ||
// FinalizedTime,StrongParents,WeakParents,StrongApprovers,WeakApprovers,BranchID,InclusionState,Scheduled,Booked, | ||
// Eligible,Invalid,Finalized,Rank,IsPastMarker,PastMarkers,PMHI,PMLI,FutureMarkers,FMHI,FMLI,PayloadType,TransactionID, | ||
// PayloadOpinionFormed,TimestampOpinionFormed,MessageOpinionFormed,MessageOpinionTriggered,TimestampOpinion,TimestampLoK | ||
func (api *GoShimmerAPI) GetDiagnosticsTips() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsTips) | ||
} | ||
|
||
// GetDiagnosticsStrongTips runs diagnostics over strong tips | ||
// Returns csv with the following fields: | ||
// | ||
// tipType,ID,IssuerID,IssuerPublicKey,IssuanceTime,ArrivalTime,SolidTime,ScheduledTime,BookedTime,OpinionFormedTime, | ||
// FinalizedTime,StrongParents,WeakParents,StrongApprovers,WeakApprovers,BranchID,InclusionState,Scheduled,Booked, | ||
// Eligible,Invalid,Finalized,Rank,IsPastMarker,PastMarkers,PMHI,PMLI,FutureMarkers,FMHI,FMLI,PayloadType,TransactionID, | ||
// PayloadOpinionFormed,TimestampOpinionFormed,MessageOpinionFormed,MessageOpinionTriggered,TimestampOpinion,TimestampLoK | ||
func (api *GoShimmerAPI) GetDiagnosticsStrongTips() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsStrongTips) | ||
} | ||
|
||
// GetDiagnosticsWeakTips runs diagnostics over weak tips | ||
// Returns csv with the following fields: | ||
// | ||
// tipType,ID,IssuerID,IssuerPublicKey,IssuanceTime,ArrivalTime,SolidTime,ScheduledTime,BookedTime,OpinionFormedTime, | ||
// FinalizedTime,StrongParents,WeakParents,StrongApprovers,WeakApprovers,BranchID,InclusionState,Scheduled,Booked, | ||
// Eligible,Invalid,Finalized,Rank,IsPastMarker,PastMarkers,PMHI,PMLI,FutureMarkers,FMHI,FMLI,PayloadType,TransactionID, | ||
// PayloadOpinionFormed,TimestampOpinionFormed,MessageOpinionFormed,MessageOpinionTriggered,TimestampOpinion,TimestampLoK | ||
func (api *GoShimmerAPI) GetDiagnosticsWeakTips() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsWeakTips) | ||
} | ||
|
||
// GetDiagnosticsDRNG runs diagnostics for DRNG | ||
// Returns csv with the following fields: | ||
// | ||
// ID,IssuerID,IssuerPublicKey,IssuanceTime,ArrivalTime,SolidTime,ScheduledTime,BookedTime,OpinionFormedTime, | ||
// dRNGPayloadType,InstanceID,Round,PreviousSignature,Signature,DistributedPK | ||
func (api *GoShimmerAPI) GetDiagnosticsDRNG() (*csv.Reader, error) { | ||
return api.diagnose(tools.RouteDiagnosticsDRNG) | ||
} | ||
|
||
// run an api call on a certain route and return a csv | ||
func (api *GoShimmerAPI) diagnose(route string) (*csv.Reader, error) { | ||
reader := &csv.Reader{} | ||
if err := api.do(http.MethodGet, route, nil, reader); err != nil { | ||
return nil, err | ||
} | ||
return reader, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.